Changeset 3706 for trunk/bp-core.php
- Timestamp:
- 01/14/2011 07:35:58 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r3675 r3706 299 299 require ( BP_PLUGIN_DIR . '/bp-core/admin/bp-core-admin.php' ); 300 300 } 301 add_action( 'admin_menu', 'bp_core_admin_menu_init' );301 is_multisite() ? add_action( 'network_admin_menu', 'bp_core_admin_menu_init' ) : add_action( 'admin_menu', 'bp_core_admin_menu_init' ); 302 302 303 303 /** … … 315 315 return false; 316 316 317 / * Add the administration tab under the "Site Admin" tab for site administrators */317 // Add the administration tab under the "Site Admin" tab for site administrators 318 318 $hook = bp_core_add_admin_menu_page( array( 319 'menu_title' => __( 'BuddyPress', 'buddypress' ), 320 'page_title' => __( 'BuddyPress', 'buddypress' ), 321 'access_level' => 10, 'file' => 'bp-general-settings', 322 'function' => 'bp_core_admin_dashboard', 323 'position' => 2 319 'menu_title' => __( 'BuddyPress', 'buddypress' ), 320 'page_title' => __( 'BuddyPress', 'buddypress' ), 321 'capability' => 'manage_options', 322 'file' => 'bp-general-settings', 323 'function' => 'bp_core_admin_dashboard', 324 'position' => 2 324 325 ) ); 325 326 326 327 add_submenu_page( 'bp-general-settings', __( 'BuddyPress Dashboard', 'buddypress' ), __( 'Dashboard', 'buddypress' ), 'manage_options', 'bp-general-settings', 'bp_core_admin_dashboard' ); 327 add_submenu_page( 'bp-general-settings', __( 'Settings', 'buddypress' ), __( 'Settings', 'buddypress' ), 'manage_options', 'bp-settings', 'bp_core_admin_settings');328 329 / * Add a hook for css/js */328 add_submenu_page( 'bp-general-settings', __( 'Settings', 'buddypress' ), __( 'Settings', 'buddypress' ), 'manage_options', 'bp-settings', 'bp_core_admin_settings' ); 329 330 // Add a hook for css/js 330 331 add_action( "admin_print_styles-$hook", 'bp_core_add_admin_menu_styles' ); 331 332 } 332 add_action( 'admin_menu', 'bp_core_add_admin_menu' );333 is_multisite() ? add_action( 'network_admin_menu', 'bp_core_add_admin_menu' ) : add_action( 'admin_menu', 'bp_core_add_admin_menu' ); 333 334 334 335 /** … … 1816 1817 1817 1818 $defaults = array( 1818 'page_title' => '',1819 'menu_title' => '',1820 ' access_level' => 2,1821 'file' => false,1822 'function' => false,1823 'icon_url' => false,1824 'position' => 1001819 'page_title' => '', 1820 'menu_title' => '', 1821 'capability' => 'manage_options', 1822 'file' => false, 1823 'function' => false, 1824 'icon_url' => false, 1825 'position' => 100 1825 1826 ); 1826 1827 … … 1845 1846 } while ( !empty( $menu[$position] ) ); 1846 1847 1847 $menu[$position] = array ( $menu_title, $ access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url );1848 $menu[$position] = array ( $menu_title, $capability, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); 1848 1849 1849 1850 $_registered_pages[$hookname] = true;
Note: See TracChangeset
for help on using the changeset viewer.