' . __('Select menu items (pages, categories, links) from the boxes at left to begin building your custom menu.') . '
'; + $result .= '' . __( 'Add menu items from the column on the left.' ) . '
'; $result .= 'X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/8f374b7233bc2815ccc387e448d208c5434eb961..61343b82c4f0da4c68e4c6373daafff4a81efdd1:/wp-admin/includes/nav-menu.php diff --git a/wp-admin/includes/nav-menu.php b/wp-admin/includes/nav-menu.php index 5fc73fcb..7e9fe6ad 100644 --- a/wp-admin/includes/nav-menu.php +++ b/wp-admin/includes/nav-menu.php @@ -14,7 +14,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { * * @param string $output Passed by reference. */ - function start_lvl(&$output) {} + function start_lvl( &$output, $depth = 0, $args = array() ) {} /** * @see Walker_Nav_Menu::end_lvl() @@ -22,8 +22,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { * * @param string $output Passed by reference. */ - function end_lvl(&$output) { - } + function end_lvl( &$output, $depth = 0, $args = array() ) {} /** * @see Walker::start_el() @@ -34,7 +33,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { * @param int $depth Depth of menu item. Used for padding. * @param object $args */ - function start_el(&$output, $item, $depth, $args) { + function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { global $_wp_nav_menu_max_depth; $_wp_nav_menu_max_depth = $depth > $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth; @@ -79,13 +78,17 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { $title = sprintf( __('%s (Pending)'), $item->title ); } - $title = empty( $item->label ) ? $title : $item->label; + $title = ( ! isset( $item->label ) || '' == $item->label ) ? $title : $item->label; + + $submenu_text = ''; + if ( 0 == $depth ) + $submenu_text = 'style="display: none;"'; ?>
+ +
+@@ -182,10 +196,10 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { 'action' => 'delete-menu-item', 'menu-item' => $item_id, ), - remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) ) + admin_url( 'nav-menus.php' ) ), 'delete-menu_item_' . $item_id - ); ?>"> | |
' . sprintf( _n('Your theme supports %s menu. Select which menu you would like to use.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n($num_locations) ) . '
'; + echo '' . _n( 'Select a menu to use within your theme.', 'Select the menus you will use in your theme.', $num_locations ) . '
'; foreach ( $locations as $location => $description ) { ?> @@ -499,10 +516,7 @@ function wp_nav_menu_locations_meta_box() { + value="term_id; ?>">name, 40, '…' ); ?> @@ -511,12 +525,32 @@ function wp_nav_menu_locations_meta_box() { } ?>- - + +
$_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1; - - $current_tab = 'create'; - if ( isset( $_REQUEST['customlink-tab'] ) && in_array( $_REQUEST['customlink-tab'], array('create', 'all') ) ) { - $current_tab = $_REQUEST['customlink-tab']; - } - $removed_args = array( - 'action', - 'customlink-tab', - 'edit-menu-item', - 'menu-item', - 'page-tab', - '_wpnonce', - ); + $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1; ?>+ +
- -- -
- -- -
++ +
- - class="button-secondary submit-add-to-menu" value="" name="add-custom-menu-item" id="submit-customlinkdiv" /> + class="button-secondary submit-add-to-menu right" value="" name="add-custom-menu-item" id="submit-customlinkdiv" /> +
@@ -660,10 +680,22 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) { ?>- - class="button-secondary submit-add-to-menu" value="" name="add-post-type-menu-item" id="submit-posttype-" /> + class="button-secondary submit-add-to-menu right" value="" name="add-post-type-menu-item" id="" /> +
@@ -871,10 +902,22 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) { ?>- - 'submit-quick-search-taxonomy-' . $taxonomy_name ) ); ?> + + 'submit-quick-search-taxonomy-' . $taxonomy_name ) ); ?>
-' . __('Select menu items (pages, categories, links) from the boxes at left to begin building your custom menu.') . '
'; + $result .= '' . __( 'Add menu items from the column on the left.' ) . '
'; $result .= '' . $menu_item_db_id->get_error_message() . '
' . sprintf( __( '%1$s has been updated.' ), $nav_menu_selected_title ) . '