Changeset 401856
- Timestamp:
- 06/27/2011 09:46:02 PM (15 years ago)
- Location:
- wordpress-admin-bar-improved
- Files:
-
- 1 edited
- 1 copied
-
tags/3.1.7/wpabi.php (copied) (copied from wordpress-admin-bar-improved/trunk/wpabi.php) (1 diff)
-
trunk/wpabi.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wordpress-admin-bar-improved/tags/3.1.7/wpabi.php
r400475 r401856 212 212 } 213 213 wp_enqueue_style('theme-editor'); 214 add_action('admin_menu', array( &$this, 'admin_menu' )); 214 $hook = (version_compare($wp_version, '3.1', '>=')) ? 'network_admin_menu' : 'admin_menu' ; 215 add_action($hook, array( &$this, 'admin_menu' )); 215 216 } 216 217 217 218 public function admin_menu() 218 219 { 219 global $wpdb, $wp_roles, $wp_version, $current_user; 220 221 if ( is_multisite() && is_site_admin() ) 222 { 223 $where_to_place = (version_compare($wp_version, '3.1', '>=')) ? 'settings.php' : 'ms-admin.php' ; 224 add_submenu_page($where_to_place, 'WPABI', 'WPABI', 'manage_options', 'wpabi', array(&$this, 'admin_page_render')); 225 } 226 else 227 { 228 add_options_page('WPABI', 'WPABI', 'manage_options', 'wpabi', array(&$this, 'admin_page_render')); 229 } 220 add_options_page('WPABI', 'WPABI', 'manage_options', 'wpabi', array(&$this, 'admin_page_render')); 230 221 } 231 222 -
wordpress-admin-bar-improved/trunk/wpabi.php
r400475 r401856 212 212 } 213 213 wp_enqueue_style('theme-editor'); 214 add_action('admin_menu', array( &$this, 'admin_menu' )); 214 $hook = (version_compare($wp_version, '3.1', '>=')) ? 'network_admin_menu' : 'admin_menu' ; 215 add_action($hook, array( &$this, 'admin_menu' )); 215 216 } 216 217 217 218 public function admin_menu() 218 219 { 219 global $wpdb, $wp_roles, $wp_version, $current_user; 220 221 if ( is_multisite() && is_site_admin() ) 222 { 223 $where_to_place = (version_compare($wp_version, '3.1', '>=')) ? 'settings.php' : 'ms-admin.php' ; 224 add_submenu_page($where_to_place, 'WPABI', 'WPABI', 'manage_options', 'wpabi', array(&$this, 'admin_page_render')); 225 } 226 else 227 { 228 add_options_page('WPABI', 'WPABI', 'manage_options', 'wpabi', array(&$this, 'admin_page_render')); 229 } 220 add_options_page('WPABI', 'WPABI', 'manage_options', 'wpabi', array(&$this, 'admin_page_render')); 230 221 } 231 222
Note: See TracChangeset
for help on using the changeset viewer.