' . __('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/5aa86a9053fb0fa15846bb60aac2fb8fdfff524a..9441756a895fb4fdc4bcf20e0d228cef622663ca:/wp-admin/includes/nav-menu.php diff --git a/wp-admin/includes/nav-menu.php b/wp-admin/includes/nav-menu.php index 7c338027..16b157e7 100644 --- a/wp-admin/includes/nav-menu.php +++ b/wp-admin/includes/nav-menu.php @@ -1,272 +1,17 @@ $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth; - - $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; - - ob_start(); - $item_id = esc_attr( $item->ID ); - $removed_args = array( - 'action', - 'customlink-tab', - 'edit-menu-item', - 'menu-item', - 'page-tab', - '_wpnonce', - ); - - $original_title = ''; - if ( 'taxonomy' == $item->type ) { - $original_title = get_term_field( 'name', $item->object_id, $item->object, 'raw' ); - if ( is_wp_error( $original_title ) ) - $original_title = false; - } elseif ( 'post_type' == $item->type ) { - $original_object = get_post( $item->object_id ); - $original_title = $original_object->post_title; - } - - $classes = array( - 'menu-item menu-item-depth-' . $depth, - 'menu-item-' . esc_attr( $item->object ), - 'menu-item-edit-' . ( ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? 'active' : 'inactive'), - ); - - $title = $item->title; - - if ( ! empty( $item->_invalid ) ) { - $classes[] = 'menu-item-invalid'; - /* translators: %s: title of menu item which is invalid */ - $title = sprintf( __( '%s (Invalid)' ), $item->title ); - } elseif ( isset( $item->post_status ) && 'draft' == $item->post_status ) { - $classes[] = 'pending'; - /* translators: %s: title of menu item in draft status */ - $title = sprintf( __('%s (Pending)'), $item->title ); - } - - $title = empty( $item->label ) ? $title : $item->label; - - ?> -
' . __('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.') . '
'; - return; - } + if ( $one_theme_location_no_menus ) + return false; - $locations = get_registered_nav_menus(); - $menus = wp_get_nav_menus(); - $menu_locations = get_nav_menu_locations(); - $num_locations = count( array_keys($locations) ); - - echo '' . 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) ) . '
'; - - foreach ( $locations as $location => $description ) { - ?> -- -
- - - $_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; ?>