Changeset 369599
- Timestamp:
- 04/06/2011 03:23:07 PM (15 years ago)
- Location:
- wpmu-theme-usage-info/trunk
- Files:
-
- 2 edited
-
cets_theme_info.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpmu-theme-usage-info/trunk/cets_theme_info.php
r202244 r369599 9 9 Description: WordPress plugin for letting site admins easily see what themes are actively used on their site 10 10 11 Version: 1. 112 13 Author: Kevin Graeme & Deanna Schneider 11 Version: 1.2 12 13 Author: Kevin Graeme & Deanna Schneider & Jason Lemahieu 14 14 15 15 … … 27 27 28 28 function cets_theme_info() { 29 30 31 add_filter('theme_action_links', array(&$this, 'action_links'), 9, 2);32 add_action('admin_menu', array(&$this, 'theme_info_add_page'));33 add_action('switch_theme', array(&$this, 'on_switch_theme'));34 35 if ( in_array( basename($_SERVER['PHP_SELF']), array('themes.php') )) {36 37 wp_enqueue_script('jquery');38 wp_enqueue_script('thickbox');39 40 // run the function to generate the theme blog list (this runs whenever the theme page reloads, but only regenerates the list if it's more than an hour old or not set yet)41 $gen_time = get_site_option('cets_theme_info_data_freshness');42 43 44 if ((time() - $gen_time) > 3600 || strlen($gen_time) == 0) {45 $this->generate_theme_blog_list();46 }29 global $wp_version; 30 31 if ( version_compare( $wp_version, '3.0', '>=' ) ) { 32 // Add the site admin config page 33 34 if (function_exists('is_network_admin')) { 35 //3.1+ 36 add_action('network_admin_menu', array(&$this, 'theme_info_add_page')); 37 } 38 else { 39 //-3.1 40 add_action('admin_menu', array(&$this, 'theme_info_add_page')); 41 } 42 43 add_filter('theme_action_links', array(&$this, 'action_links'), 9, 2); 44 add_action('switch_theme', array(&$this, 'on_switch_theme')); 45 46 if ( in_array( basename($_SERVER['PHP_SELF']), array('themes.php') )) { 47 47 48 } 49 50 48 wp_enqueue_script('jquery'); 49 wp_enqueue_script('thickbox'); 50 51 // run the function to generate the theme blog list (this runs whenever the theme page reloads, but only regenerates the list if it's more than an hour old or not set yet) 52 $gen_time = get_site_option('cets_theme_info_data_freshness'); 53 54 55 if ((time() - $gen_time) > 3600 || strlen($gen_time) == 0) { 56 $this->generate_theme_blog_list(); 57 } 58 59 } 60 61 } 51 62 } 52 63 … … 157 168 // Add a submenu 158 169 if(is_site_admin()) { 159 $page= add_submenu_page('wpmu-admin.php', 'Theme Usage Info', 'Theme Usage Info', 0, basename(__FILE__), array(&$this, 'theme_info_page')); 160 161 } 170 171 172 if (function_exists('is_network_admin')) { 173 $page= add_submenu_page('themes.php', 'Theme Usage Info', 'Theme Usage Info', 0, basename(__FILE__), array(&$this, 'theme_info_page')); 174 } 175 else{ 176 $page= add_submenu_page('wpmu-admin.php', 'Theme Usage Info', 'Theme Usage Info', 0, basename(__FILE__), array(&$this, 'theme_info_page')); 177 } 178 } 179 180 181 162 182 163 183 } -
wpmu-theme-usage-info/trunk/readme.txt
r260907 r369599 1 === WPMU Theme Info ===2 Contributors: DeannaS, kgraeme 1 === WPMU Theme Info === 2 Contributors: DeannaS, kgraeme, MadtownLems 3 3 Tags: WPMU, Wordpress Mu, Wordpress Multiuser, Theme Stats 4 Requires at least: 2.75 Tested up to: 3. 04 Requires at least: 3.0 5 Tested up to: 3.1.1 6 6 Stable tag: trunk 7 7 … … 16 16 * cets\_theme\_info folder - lib folder - tablesort.js 17 17 18 WPMU has two ways to activate themes – either sitewide, or on a blog-by-blog basis. But, there’s no convenient way built-in to know which themes are actually being used, or by whom. This plugin addresses that issue by creating a “Theme Usage Info” sub-menu of the Site Admin menu. Included on the page are two tables of data –one of themes currently being used, and one of themes not currently being used. The currently used themes table provides information on how many blogs are using the theme, which blogs are using it, and whether or not the theme is currently activated site-wide. The table of unused themes provides information on whether the theme is currently activated sitewide.18 WPMU has two ways to activate themes either sitewide, or on a blog-by-blog basis. But, there's no convenient way built-in to know which themes are actually being used, or by whom. This plugin addresses that issue by creating a "Theme Usage Info" sub-menu of the Site Admin menu. Included on the page are two tables of data - one of themes currently being used, and one of themes not currently being used. The currently used themes table provides information on how many blogs are using the theme, which blogs are using it, and whether or not the theme is currently activated site-wide. The table of unused themes provides information on whether the theme is currently activated sitewide. 19 19 20 20 In addition, site admins can choose to provide this information to their users via a toggle on the administration page. … … 41 41 42 42 == Changelog == 43 44 43 1.1 Adding Show/Hide blogs on the administrative page.
Note: See TracChangeset
for help on using the changeset viewer.