Ticket #23119: 23119.8.diff
| File 23119.8.diff, 5.8 KB (added by lessbloat, 4 months ago) |
|---|
-
wp-admin/includes/nav-menu.php
383 383 function wp_nav_menu_setup() { 384 384 // Register meta boxes 385 385 if ( wp_get_nav_menus() ) 386 add_meta_box( 'nav-menu-theme-locations', __( ' Theme Locations' ), 'wp_nav_menu_locations_meta_box' , 'nav-menus', 'side', 'default' );386 add_meta_box( 'nav-menu-theme-locations', __( 'Menus within your theme' ), 'wp_nav_menu_locations_meta_box' , 'nav-menus', 'side', 'default' ); 387 387 add_meta_box( 'add-custom-links', __('Custom Links'), 'wp_nav_menu_item_link_meta_box', 'nav-menus', 'side', 'default' ); 388 388 wp_nav_menu_post_type_meta_boxes(); 389 389 wp_nav_menu_taxonomy_meta_boxes(); … … 489 489 $menu_locations = get_nav_menu_locations(); 490 490 $num_locations = count( array_keys($locations) ); 491 491 492 echo '<p class="howto">' . 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)) . '</p>';492 echo '<p class="howto">' . _n('Select a menu to use within your theme.', 'Select the menus you will use in your theme.', $num_locations ) . '</p>'; 493 493 494 494 foreach ( $locations as $location => $description ) { 495 495 ?> -
wp-admin/js/nav-menu.js
245 245 menuEdge = api.menuList.offset().left, 246 246 body = $('body'), maxChildDepth, 247 247 menuMaxDepth = initialMenuMaxDepth(); 248 249 if( 0 != $('#menu-to-edit li').length ) 250 $('.drag-instructions').show(); 248 251 249 252 // Use the right edge if RTL. 250 253 menuEdge += api.isRTL ? api.menuList.width() : 0; … … 461 464 if( '' == $t.val() ) 462 465 $t.addClass( name ).val( $t.data(name) ); 463 466 }); 467 468 $('.blank-slate .input-with-default-title').focus(); 464 469 }, 465 470 466 471 attachThemeLocationsListeners : function() { … … 572 577 $.post( ajaxurl, params, function(menuMarkup) { 573 578 var ins = $('#menu-instructions'); 574 579 processMethod(menuMarkup, params); 580 $('.drag-instructions').show(); 575 581 if( ! ins.hasClass('menu-instructions-inactive') && ins.siblings().length ) 576 582 ins.addClass('menu-instructions-inactive'); 577 583 callback(); … … 945 951 var ins = $('#menu-instructions'); 946 952 el.remove(); 947 953 children.shiftDepthClass(-1).updateParentMenuItemDBId(); 948 if( ! ins.siblings().length ) 954 if( 0 == $('#menu-to-edit li').length ) { 955 $('.drag-instructions').hide(); 949 956 ins.removeClass('menu-instructions-inactive'); 957 } 950 958 }); 951 959 }, 952 960 -
wp-admin/nav-menus.php
531 531 <form id="update-nav-menu" action="<?php echo admin_url( 'nav-menus.php' ); ?>" method="post" enctype="multipart/form-data"> 532 532 <div id="nav-menu-header"> 533 533 <div id="submitpost" class="submitbox"> 534 <div class="major-publishing-actions ">534 <div class="major-publishing-actions <?php if ( isset( $_GET['menu'] ) && 0 == $_GET['menu'] || empty( $nav_menus ) ) echo 'blank-slate'; ?>"> 535 535 <label class="menu-name-label howto open-label" for="menu-name"> 536 536 <span><?php _e('Menu Name'); ?></span> 537 537 <input name="menu-name" id="menu-name" type="text" class="menu-name regular-text menu-item-textbox input-with-default-title" title="<?php esc_attr_e('Enter menu name here'); ?>" value="<?php echo esc_attr( $nav_menu_selected_title ); ?>" /> … … 574 574 <div id="post-body"> 575 575 <div id="post-body-content"> 576 576 <?php 577 if ( isset( $edit_markup ) ) { 577 $drag_instructions = ''; 578 if ( empty( $ordered_menu_items ) ) 579 $drag_instructions = 'style="display: none;"'; 580 581 if ( isset( $edit_markup ) ) { 582 echo '<div class="drag-instructions post-body-plain" ' . $drag_instructions . '>'; 583 echo '<p>' . __('Drag each item into the order you prefer. Click an item to reveal additional configuration options.') . '</p>'; 584 echo '</div>'; 585 578 586 if ( ! is_wp_error( $edit_markup ) ) 579 587 echo $edit_markup; 580 588 } else if ( empty( $nav_menu_selected_id ) ) { 581 589 echo '<div class="post-body-plain">'; 582 echo '<p>' . __('To create a custom menu, give it a name above and click Create Menu. Then choose items like pages, categories or custom links from the left column to add to this menu.') . '</p>'; 583 echo '<p>' . __('After you have added your items, drag and drop to put them in the order you want. You can also click each item to reveal additional configuration options.') . '</p>'; 584 echo '<p>' . __('When you have finished building your custom menu, make sure you click the Save Menu button.') . '</p>'; 590 echo '<p>' . __('Give your custom menu a name above, then click Create Menu.') . '</p>'; 585 591 echo '</div>'; 586 592 } 587 593 ?> -
wp-admin/css/wp-admin.css
6785 6785 position: relative; 6786 6786 } 6787 6787 6788 .blank-slate br { 6789 display: none; 6790 } 6791 6792 .blank-slate .menu-name { 6793 height: 2em; 6794 } 6795 6788 6796 /* Menu Container */ 6789 6797 #menu-management-liquid { 6790 6798 float: left; … … 7080 7088 } 7081 7089 7082 7090 #menu-to-edit { 7083 padding: 1em 0;7091 padding: 0.1em 0; 7084 7092 } 7085 7093 7086 7094 .menu ul { … … 7326 7334 margin: 5px 0 1px; 7327 7335 } 7328 7336 7337 .nav-menus-php .blank-slate .publishing-action { 7338 float: left; 7339 margin: 1px 0 0; 7340 } 7341 7329 7342 .nav-menus-php .major-publishing-actions .delete-action { 7330 7343 vertical-align: middle; 7331 7344 text-align: left;
