Make WordPress Core

Ticket #33743: 33743.patch

File 33743.patch, 4.5 KB (added by sabernhardt, 20 months ago)

Replacing "theme location" and "display location"

  • src/wp-admin/nav-menus.php

     
    486486$page_count = wp_count_posts( 'page' );
    487487
    488488/*
    489  * If we have one theme location, and zero menus, we take them right
     489 * If we have one registered menu location, and zero menus, we take them right
    490490 * into editing their first menu.
    491491 */
    492492if ( 1 === count( get_registered_nav_menus() ) && ! $add_new_screen
     
    529529wp_localize_script( 'nav-menu', 'menus', $nav_menus_l10n );
    530530
    531531/*
    532  * Redirect to add screen if there are no menus and this users has either zero,
    533  * or more than 1 theme locations.
     532 * Redirect to add screen if there are no menus and this user has either zero
     533 * or more than one registered menu location.
    534534 */
    535535if ( 0 === $menu_count && ! $add_new_screen && ! $one_theme_location_no_menus ) {
    536536        wp_redirect( admin_url( 'nav-menus.php?action=edit&menu=0' ) );
     
    645645        $menu_management  = '<p>' . __( 'The menu management box at the top of the screen is used to control which menu is opened in the editor below.' ) . '</p>';
    646646        $menu_management .= '<ul><li>' . __( 'To edit an existing menu, <strong>choose a menu from the dropdown and click Select</strong>' ) . '</li>';
    647647        $menu_management .= '<li>' . __( 'If you have not yet created any menus, <strong>click the &#8217;create a new menu&#8217; link</strong> to get started' ) . '</li></ul>';
    648         $menu_management .= '<p>' . __( 'You can assign theme locations to individual menus by <strong>selecting the desired settings</strong> at the bottom of the menu editor. To assign menus to all theme locations at once, <strong>visit the Manage Locations tab</strong> at the top of the screen.' ) . '</p>';
     648        $menu_management .= '<p>' . __( 'You can assign individual menus to the theme&#8217;s menu locations by <strong>selecting the desired settings</strong> at the bottom of the menu editor. To assign menus to all theme menu locations at once, <strong>visit the Manage Locations tab</strong> at the top of the screen.' ) . '</p>';
    649649
    650650        get_current_screen()->add_help_tab(
    651651                array(
     
    671671        );
    672672else : // Locations tab.
    673673        $locations_overview  = '<p>' . __( 'This screen is used for globally assigning menus to locations defined by your theme.' ) . '</p>';
    674         $locations_overview .= '<ul><li>' . __( 'To assign menus to one or more theme locations, <strong>select a menu from each location&#8217;s dropdown</strong>. When you are finished, <strong>click Save Changes</strong>' ) . '</li>';
    675         $locations_overview .= '<li>' . __( 'To edit a menu currently assigned to a theme location, <strong>click the adjacent &#8217;Edit&#8217; link</strong>' ) . '</li>';
    676         $locations_overview .= '<li>' . __( 'To add a new menu instead of assigning an existing one, <strong>click the &#8217;Use new menu&#8217; link</strong>. Your new menu will be automatically assigned to that theme location' ) . '</li></ul>';
     674        $locations_overview .= '<ul><li>' . __( 'To assign menus to one or more theme menu locations, <strong>select a menu from each location&#8217;s dropdown</strong>. When you are finished, <strong>click Save Changes</strong>' ) . '</li>';
     675        $locations_overview .= '<li>' . __( 'To edit a menu currently assigned to a theme menu location, <strong>click the adjacent &#8217;Edit&#8217; link</strong>' ) . '</li>';
     676        $locations_overview .= '<li>' . __( 'To add a new menu instead of assigning an existing one, <strong>click the &#8217;Use new menu&#8217; link</strong>. Your new menu will be automatically assigned to that location in the theme.' ) . '</li></ul>';
    677677
    678678        get_current_screen()->add_help_tab(
    679679                array(
     
    767767                        <table class="widefat fixed" id="menu-locations-table">
    768768                                <thead>
    769769                                <tr>
    770                                         <th scope="col" class="manage-column column-locations"><?php _e( 'Theme Location' ); ?></th>
     770                                        <th scope="col" class="manage-column column-locations"><?php _e( 'Menu Location' ); ?></th>
    771771                                        <th scope="col" class="manage-column column-menus"><?php _e( 'Assigned Menu' ); ?></th>
    772772                                </tr>
    773773                                </thead>
     
    11131113                                                                <?php if ( current_theme_supports( 'menus' ) ) : ?>
    11141114
    11151115                                                                        <fieldset class="menu-settings-group menu-theme-locations">
    1116                                                                                 <legend class="menu-settings-group-name howto"><?php _e( 'Display location' ); ?></legend>
     1116                                                                                <legend class="menu-settings-group-name howto"><?php _e( 'Menu location' ); ?></legend>
    11171117                                                                                <?php
    11181118                                                                                foreach ( $locations as $location => $description ) :
    11191119                                                                                        $checked = false;