Changeset 4309 for trunk/bp-core/admin/bp-core-update.php
- Timestamp:
- 04/30/2011 10:41:47 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/admin/bp-core-update.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/admin/bp-core-update.php
r4293 r4309 1139 1139 } 1140 1140 1141 /**1142 * A better version of add_admin_menu_page() that allows positioning of menus.1143 *1144 * @package BuddyPress Core1145 */1146 function bp_core_update_add_admin_menu_page( $args = '' ) {1147 global $menu, $admin_page_hooks, $_registered_pages;1148 1149 $defaults = array(1150 'page_title' => '',1151 'menu_title' => '',1152 'capability' => 'manage_options',1153 'menu_slug' => '',1154 'function' => false,1155 'icon_url' => false,1156 'position' => 1001157 );1158 1159 $r = wp_parse_args( $args, $defaults );1160 extract( $r, EXTR_SKIP );1161 1162 if ( is_multisite() )1163 add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position );1164 else1165 add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position );1166 }1167 1168 1141 function bp_core_wizard_message() { 1169 1142 if ( isset( $_GET['updated'] ) ) … … 1227 1200 1228 1201 // Add the administration tab under the "Site Admin" tab for site administrators 1229 bp_core_update_add_admin_menu_page( array( 1230 'menu_title' => __( 'BuddyPress', 'buddypress' ), 1231 'page_title' => __( 'BuddyPress', 'buddypress' ), 1232 'capability' => 'manage_options', 1233 'menu_slug' => 'bp-wizard', 1234 'function' => '', 1235 'position' => 3 1236 ) ); 1237 1202 add_menu_page( __( 'BuddyPress', 'buddypress' ), __( 'BuddyPress', 'buddypress' ), 'manage_options', 'bp-wizard', '', '', 3 ); 1238 1203 $hook = add_submenu_page( 'bp-wizard', $status, $status, 'manage_options', 'bp-wizard', array( $bp_wizard, 'html' ) ); 1239 1204
Note: See TracChangeset
for help on using the changeset viewer.