X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/wordpress.git/blobdiff_plain/699231ae09f7057a4d0000cdf32e50a3df6a04ca..5aa86a9053fb0fa15846bb60aac2fb8fdfff524a:/wp-admin/nav-menus.php diff --git a/wp-admin/nav-menus.php b/wp-admin/nav-menus.php index 5b4bd44e..90a1e873 100644 --- a/wp-admin/nav-menus.php +++ b/wp-admin/nav-menus.php @@ -10,7 +10,7 @@ */ /** Load WordPress Administration Bootstrap */ -require_once( 'admin.php' ); +require_once( './admin.php' ); // Load all the nav menu interface functions require_once( ABSPATH . 'wp-admin/includes/nav-menu.php' ); @@ -22,11 +22,7 @@ if ( ! current_theme_supports( 'menus' ) && ! current_theme_supports( 'widgets' if ( ! current_user_can('edit_theme_options') ) wp_die( __( 'Cheatin’ uh?' ) ); -// Nav Menu CSS -wp_admin_css( 'nav-menu' ); - // jQuery -wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'jquery-ui-draggable' ); wp_enqueue_script( 'jquery-ui-droppable' ); wp_enqueue_script( 'jquery-ui-sortable' ); @@ -70,7 +66,7 @@ switch ( $action ) { $ordered_menu_items = wp_get_nav_menu_items( $menu_id ); $menu_item_data = (array) wp_setup_nav_menu_item( get_post( $menu_item_id ) ); - // setup the data we need in one pass through the array of menu items + // set up the data we need in one pass through the array of menu items $dbids_to_orders = array(); $orders_to_dbids = array(); foreach( (array) $ordered_menu_items as $ordered_menu_item_object ) { @@ -144,7 +140,7 @@ switch ( $action ) { $ordered_menu_items = wp_get_nav_menu_items( $menu_id ); $menu_item_data = (array) wp_setup_nav_menu_item( get_post( $menu_item_id ) ); - // setup the data we need in one pass through the array of menu items + // set up the data we need in one pass through the array of menu items $dbids_to_orders = array(); $orders_to_dbids = array(); foreach( (array) $ordered_menu_items as $ordered_menu_item_object ) { @@ -290,9 +286,6 @@ switch ( $action ) { if ( is_wp_error( $_nav_menu_selected_id ) ) { $messages[] = '
' . $_nav_menu_selected_id->get_error_message() . '
' . __('The current theme does not natively support menus, but you can use the “Custom Menu” widget to add any menus you create here to the theme’s sidebar.') . '
' . __('This feature is new in version 3.0; to use a custom menu in place of your theme’s default menus, support for this feature must be registered in the theme’s functions.php file. If your theme does not support the custom menus feature yet (the new default theme, Twenty Ten, does), you can learn about adding support yourself by following the below link.') . '
'; -$help .= '' . __('You can create custom menus for your site. These menus may contain links to pages, categories, custom links or other content types (use the Screen Options tab to decide which ones to show on the screen). You can specify a different navigation label for a menu item as well as other attributes. You can create multiple menus. If your theme includes more than one menu, you can choose which custom menu to associate with each. You can also use custom menus in conjunction with the Custom Menus widget.') . '
'; -$help .= '' . __('To create a new custom menu, click on the + tab, give the menu a name, and click Create Menu. Next, add menu items from the appropriate boxes. You’ll be able to edit the information for each menu item, and can drag and drop to put them in order. You can also drag a menu item a little to the right to make it a submenu, to create menus with hierarchy. You’ll see when the position of the drop target shifts over to create the nested placement. Don’t forget to click Save when you’re finished.') . '
'; -$help .= '' . __('For more information:') . '
'; -$help .= '' . __('Menus Documentation') . '
'; -$help .= '' . __('Support Forums') . '
'; - -add_contextual_help($current_screen, $help); + $messages[] = '' . __('The current theme does not natively support menus, but you can use the “Custom Menu” widget to add any menus you create here to the theme’s sidebar.') . '
' . __('This feature allows you to use a custom menu in place of your theme’s default menus.') . '
' . + '' . __('Custom menus may contain links to pages, categories, custom links or other content types (use the Screen Options tab to decide which ones to show on the screen). You can specify a different navigation label for a menu item as well as other attributes. You can create multiple menus. If your theme includes more than one menu, you can choose which custom menu to associate with each. You can also use custom menus in conjunction with the Custom Menus widget.') . '
' . + '' . __('If your theme does not support the custom menus feature yet (the default themes, Twenty Eleven and Twenty Ten, do), you can learn about adding this support by following the Documentation link to the side.') . '
' +) ); +get_current_screen()->add_help_tab( array( +'id' => 'create-menus', +'title' => __('Create Menus'), +'content' => + '' . __('To create a new custom menu, click on the + tab, give the menu a name, and click Create Menu. Next, add menu items from the appropriate boxes. You’ll be able to edit the information for each menu item, and can drag and drop to put them in order. You can also drag a menu item a little to the right to make it a submenu, to create menus with hierarchy. Drop the item into its new nested placement when the dotted rectangle target shifts over, also a little to the right. Don’t forget to click Save when you’re finished.') . '
' +) ); + +get_current_screen()->set_help_sidebar( + '' . __('For more information:') . '
' . + '' . __('Documentation on Menus') . '
' . + '' . __('Support Forums') . '
' +); // Get the admin header -require_once( 'admin-header.php' ); +require_once( './admin-header.php' ); ?>