Ticket #44286: 44286.patch
| File 44286.patch, 2.3 KB (added by , 7 years ago) |
|---|
-
src/wp-admin/css/nav-menus.css
65 65 position: relative; 66 66 } 67 67 68 .blank-slate .menu-settings {69 border: none;70 margin-top: 0;71 padding-top: 0;72 overflow: hidden;73 }74 75 68 .is-submenu { 76 69 color: #555d66; /* #fafafa background */ 77 70 font-style: italic; … … 741 734 float: right; 742 735 } 743 736 744 .nav-menus-php .blank-slate .menu-settings {745 display: none;746 }747 748 737 /* Same as the Publish Meta Box #delete-action */ 749 738 .nav-menus-php .delete-action { 750 739 float: left; -
src/wp-admin/nav-menus.php
324 324 if ( isset( $_REQUEST['menu-item'] ) ) { 325 325 wp_save_nav_menu_items( $nav_menu_selected_id, absint( $_REQUEST['menu-item'] ) ); 326 326 } 327 if ( isset( $_REQUEST['zero-menu-state'] ) ) { 327 // Set the menu_location value correctly for the newly created menu 328 foreach ( $menu_locations as $location => $id ) { 329 if ( 0 === $id ) { 330 $menu_locations[ $location ] = $nav_menu_selected_id; 331 } 332 } 333 set_theme_mod( 'nav_menu_locations', $menu_locations ); 334 if ( isset( $_REQUEST['zero-menu-state'] ) || ! empty( $_POST['auto-add-pages'] ) ) { 328 335 // If there are menu items, add them 329 336 wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selected_title ); 337 } 338 if ( isset( $_REQUEST['zero-menu-state'] ) ) { 330 339 // Auto-save nav_menu_locations 331 340 $locations = get_nav_menu_locations(); 332 341 foreach ( $locations as $location => $menu_id ) { … … 853 862 <div id="menu-management-liquid"> 854 863 <div id="menu-management"> 855 864 <form id="update-nav-menu" method="post" enctype="multipart/form-data"> 856 <?php857 $new_screen_class = '';858 if ( $add_new_screen ) {859 $new_screen_class = 'blank-slate';860 }861 ?>862 865 <h2><?php _e( 'Menu structure' ); ?></h2> 863 <div class="menu-edit <?php echo $new_screen_class; ?>">866 <div class="menu-edit"> 864 867 <input type="hidden" name="nav-menu-data"> 865 868 <?php 866 869 wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );