Customizer: Use correct context and translator comments for menu location strings.
See #33431. git-svn-id: https://develop.svn.wordpress.org/trunk@35722 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
85dc4bcb63
commit
b0e225b619
@ -798,9 +798,15 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
<dt class="howto"><?php _e( 'Theme locations' ); ?></dt>
|
||||
<?php foreach ( $locations as $location => $description ) : ?>
|
||||
<dd class="checkbox-input">
|
||||
<input type="checkbox"<?php checked( isset( $menu_locations[ $location ] ) && $menu_locations[ $location ] == $nav_menu_selected_id ); ?> name="menu-locations[<?php echo esc_attr( $location ); ?>]" id="locations-<?php echo esc_attr( $location ); ?>" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" /> <label for="locations-<?php echo esc_attr( $location ); ?>"><?php echo $description; ?></label>
|
||||
<input type="checkbox"<?php checked( isset( $menu_locations[ $location ] ) && $menu_locations[ $location ] == $nav_menu_selected_id ); ?> name="menu-locations[<?php echo esc_attr( $location ); ?>]" id="locations-<?php echo esc_attr( $location ); ?>" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
|
||||
<label for="locations-<?php echo esc_attr( $location ); ?>"><?php echo $description; ?></label>
|
||||
<?php if ( ! empty( $menu_locations[ $location ] ) && $menu_locations[ $location ] != $nav_menu_selected_id ) : ?>
|
||||
<span class="theme-location-set"> <?php printf( __( "(Currently set to: %s)" ), wp_get_nav_menu_object( $menu_locations[ $location ] )->name ); ?> </span>
|
||||
<span class="theme-location-set"><?php
|
||||
/* translators: %s: menu name */
|
||||
printf( _x( '(Currently set to: %s)', 'menu location' ),
|
||||
wp_get_nav_menu_object( $menu_locations[ $location ] )->name
|
||||
);
|
||||
?></span>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endforeach; ?>
|
||||
|
@ -336,8 +336,8 @@ final class WP_Customize_Nav_Menus {
|
||||
'untitled' => _x( '(no label)', 'missing menu item navigation label' ),
|
||||
'unnamed' => _x( '(unnamed)', 'Missing menu name.' ),
|
||||
'custom_label' => __( 'Custom Link' ),
|
||||
/* translators: %s: Current menu location */
|
||||
'menuLocation' => _x( '(Currently set to: %s)', 'Current menu location' ),
|
||||
/* translators: %s: menu location slug */
|
||||
'menuLocation' => _x( '(Currently set to: %s)', 'menu' ),
|
||||
'menuNameLabel' => __( 'Menu Name' ),
|
||||
'itemAdded' => __( 'Menu item added' ),
|
||||
'itemDeleted' => __( 'Menu item deleted' ),
|
||||
|
@ -71,7 +71,12 @@ class WP_Customize_Nav_Menu_Control extends WP_Customize_Control {
|
||||
<li class="customize-control customize-control-checkbox assigned-menu-location">
|
||||
<label>
|
||||
<input type="checkbox" data-menu-id="{{ data.menu_id }}" data-location-id="<?php echo esc_attr( $location ); ?>" class="menu-location" /> <?php echo $description; ?>
|
||||
<span class="theme-location-set"><?php printf( /* translators: %s: menu name */ _x( '(Current: %s)', 'Current menu location' ), '<span class="current-menu-location-name-' . esc_attr( $location ) . '"></span>' ); ?></span>
|
||||
<span class="theme-location-set"><?php
|
||||
/* translators: %s: menu name */
|
||||
printf( _x( '(Current: %s)', 'menu location' ),
|
||||
'<span class="current-menu-location-name-' . esc_attr( $location ) . '"></span>'
|
||||
);
|
||||
?></span>
|
||||
</label>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
|
Loading…
Reference in New Issue
Block a user