Make WordPress Core


Ignore:
Timestamp:
10/11/2017 07:37:10 PM (9 years ago)
Author:
westonruter
Message:

Customize: Vary description for nav menu locations control based on whether it is shown during menu creation.

Also fix issue with initial visibility of notice when there are no menus.

Amends [41823].
Props bpayton, melchoyce, westonruter.
See #42116.
Fixes #42113.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-nav-menu-locations-control.php

    r41768 r41832  
    3636         */
    3737        public function content_template() {
    38                 if ( current_theme_supports( 'menus' ) ):
     38                if ( current_theme_supports( 'menus' ) ) :
    3939                        ?>
    4040                        <# var elementId; #>
    4141                        <ul class="menu-location-settings">
    4242                                <li class="customize-control assigned-menu-locations-title">
    43                                         <span class="customize-control-title"><?php _e( 'Menu Locations' ); ?></span>
    44                                         <p><?php _e( 'Here\'s where this menu appears. If you\'d like to change that, pick another location.' ); ?></p>
     43                                        <span class="customize-control-title">{{ wp.customize.Menus.data.l10n.locationsTitle }}</span>
     44                                        <# if ( data.isCreating ) { #>
     45                                                <p>
     46                                                        <?php echo _x( 'Where do you want this menu to appear?', 'menu locations' ); ?>
     47                                                        <em class="new-menu-locations-widget-note">
     48                                                                <?php
     49                                                                printf(
     50                                                                        /* translators: 1: Codex URL, 2: additional link attributes, 3: accessibility text */
     51                                                                        _x( '(If you plan to use a menu <a href="%1$s" %2$s>widget%3$s</a>, skip this step.)', 'menu locations' ),
     52                                                                        __( 'https://codex.wordpress.org/WordPress_Widgets' ),
     53                                                                        ' class="external-link" target="_blank"',
     54                                                                        sprintf( '<span class="screen-reader-text"> %s</span>',
     55                                                                                /* translators: accessibility text */
     56                                                                                __( '(opens in a new window)' )
     57                                                                        )
     58                                                                );
     59                                                                ?>
     60                                                        </em>
     61                                                </p>
     62                                        <# } else { #>
     63                                                <p><?php echo _x( 'Here&#8217;s where this menu appears. If you&#8217;d like to change that, pick another location.', 'menu locations' ); ?></p>
     64                                        <# } #>
    4565                                </li>
    4666
Note: See TracChangeset for help on using the changeset viewer.