Changeset 43571 for trunk/src/wp-admin/nav-menus.php
- Timestamp:
- 08/17/2018 01:50:26 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/nav-menus.php
r43569 r43571 612 612 array( 'autofocus' => $focus ), 613 613 'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), 614 ), admin_url( 'customize.php' ) 614 ), 615 admin_url( 'customize.php' ) 615 616 ) 616 617 ), … … 653 654 echo '<p>' . sprintf( _n( 'Your theme supports %s menu. Select which menu appears in each location.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . '</p>'; 654 655 } 655 ?>656 ?> 656 657 <div id="menu-locations-wrap"> 657 658 <form method="post" action="<?php echo esc_url( add_query_arg( array( 'action' => 'locations' ), admin_url( 'nav-menus.php' ) ) ); ?>"> … … 693 694 'action' => 'edit', 694 695 'menu' => $menu_locations[ $_location ], 695 ), admin_url( 'nav-menus.php' ) 696 ), 697 admin_url( 'nav-menus.php' ) 696 698 ) 697 699 ); … … 711 713 'menu' => 0, 712 714 'use-location' => $_location, 713 ), admin_url( 'nav-menus.php' ) 715 ), 716 admin_url( 'nav-menus.php' ) 714 717 ) 715 718 ); … … 730 733 </form> 731 734 </div><!-- #menu-locations-wrap --> 732 <?php733 /**734 * Fires after the menu locations table is displayed.735 *736 * @since 3.6.0737 */738 do_action( 'after_menu_locations_table' );739 ?>735 <?php 736 /** 737 * Fires after the menu locations table is displayed. 738 * 739 * @since 3.6.0 740 */ 741 do_action( 'after_menu_locations_table' ); 742 ?> 740 743 <?php else : ?> 741 744 <div class="manage-menus"> … … 744 747 <?php 745 748 printf( 746 __( 'Edit your menu below, or <a href="%s">create a new menu</a>. Don’t forget to save your changes!' ), esc_url( 749 __( 'Edit your menu below, or <a href="%s">create a new menu</a>. Don’t forget to save your changes!' ), 750 esc_url( 747 751 add_query_arg( 748 752 array( 749 753 'action' => 'edit', 750 754 'menu' => 0, 751 ), admin_url( 'nav-menus.php' ) 755 ), 756 admin_url( 'nav-menus.php' ) 752 757 ) 753 758 ) 754 759 ); 755 ?>760 ?> 756 761 <span class="screen-reader-text"><?php _e( 'Click the Save Menu button to save your changes.' ); ?></span> 757 762 </span><!-- /add-edit-menu-action --> … … 803 808 <?php 804 809 printf( 805 __( 'or <a href="%s">create a new menu</a>. Don’t forget to save your changes!' ), esc_url( 810 __( 'or <a href="%s">create a new menu</a>. Don’t forget to save your changes!' ), 811 esc_url( 806 812 add_query_arg( 807 813 array( 808 814 'action' => 'edit', 809 815 'menu' => 0, 810 ), admin_url( 'nav-menus.php' ) 816 ), 817 admin_url( 'nav-menus.php' ) 811 818 ) 812 819 ) 813 820 ); 814 ?>821 ?> 815 822 <span class="screen-reader-text"><?php _e( 'Click the Save Menu button to save your changes.' ); ?></span> 816 823 </span><!-- /add-new-menu-action --> … … 820 827 821 828 $metabox_holder_disabled_class = ''; 822 823 824 825 829 if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) { 830 $metabox_holder_disabled_class = ' metabox-holder-disabled'; 831 } 832 ?> 826 833 </div><!-- /manage-menus --> 827 834 <div id="nav-menus-frame" class="wp-clearfix"> … … 844 851 <?php 845 852 $new_screen_class = ''; 846 847 848 853 if ( $add_new_screen ) { 854 $new_screen_class = 'blank-slate'; 855 } 849 856 ?> 850 857 <h2><?php _e( 'Menu structure' ); ?></h2> … … 860 867 if ( $one_theme_location_no_menus ) { 861 868 $menu_name_val = 'value="' . esc_attr( 'Menu 1' ) . '"'; 862 ?>869 ?> 863 870 <input type="hidden" name="zero-menu-state" value="true" /> 864 <?php871 <?php 865 872 } else { 866 873 $menu_name_val = 'value="' . esc_attr( $nav_menu_selected_title ) . '"'; … … 881 888 <div id="post-body-content" class="wp-clearfix"> 882 889 <?php if ( ! $add_new_screen ) : ?> 883 <?php890 <?php 884 891 $hide_style = ''; 885 if ( isset( $menu_items ) && 0 == count( $menu_items ) ) {886 $hide_style = 'style="display: none;"';887 }892 if ( isset( $menu_items ) && 0 == count( $menu_items ) ) { 893 $hide_style = 'style="display: none;"'; 894 } 888 895 $starter_copy = ( $one_theme_location_no_menus ) ? __( 'Edit your default menu by adding or removing items. Drag each item into the order you prefer. Click Create Menu to save your changes.' ) : __( 'Drag each item into the order you prefer. Click the arrow on the right of the item to reveal additional configuration options.' ); 889 ?>896 ?> 890 897 <div class="drag-instructions post-body-plain" <?php echo $hide_style; ?>> 891 898 <p><?php echo $starter_copy; ?></p> 892 899 </div> 893 <?php894 if ( isset( $edit_markup ) && ! is_wp_error( $edit_markup ) ) {895 echo $edit_markup;896 } else {897 ?>900 <?php 901 if ( isset( $edit_markup ) && ! is_wp_error( $edit_markup ) ) { 902 echo $edit_markup; 903 } else { 904 ?> 898 905 <ul class="menu" id="menu-to-edit"></ul> 899 <?php } ?>906 <?php } ?> 900 907 <?php endif; ?> 901 908 <?php if ( $add_new_screen ) : ?> … … 904 911 <input type="hidden" name="use-location" value="<?php echo esc_attr( $_GET['use-location'] ); ?>" /> 905 912 <?php endif; ?> 906 <?php913 <?php 907 914 endif; 908 915 909 916 $no_menus_style = ''; 910 911 912 913 917 if ( $one_theme_location_no_menus ) { 918 $no_menus_style = 'style="display: none;"'; 919 } 920 ?> 914 921 <div class="menu-settings" <?php echo $no_menus_style; ?>> 915 922 <h3><?php _e( 'Menu Settings' ); ?></h3> … … 974 981 'action' => 'delete', 975 982 'menu' => $nav_menu_selected_id, 976 ), admin_url( 'nav-menus.php' ) 977 ), 'delete-nav_menu-' . $nav_menu_selected_id 983 ), 984 admin_url( 'nav-menus.php' ) 985 ), 986 'delete-nav_menu-' . $nav_menu_selected_id 978 987 ) 979 988 );
Note: See TracChangeset
for help on using the changeset viewer.