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:
Sergey Biryukov
2015-11-20 17:45:57 +00:00
parent 85dc4bcb63
commit b0e225b619
3 changed files with 16 additions and 5 deletions
+8 -2
View File
@@ -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; ?>