Customize: Link "widget areas" to widgets panel in menu locations section description.

Props celloexpressions.
Fixes #36796.

git-svn-id: https://develop.svn.wordpress.org/trunk@37900 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2016-06-28 22:43:31 +00:00
parent 2e9bb996b9
commit c174aa2b6f
1 changed files with 8 additions and 3 deletions

View File

@ -496,6 +496,7 @@ final class WP_Customize_Nav_Menus {
// Create a panel for Menus.
$description = '<p>' . __( 'This panel is used for managing navigation menus for content you have already published on your site. You can create menus and add items for existing content such as pages, posts, categories, tags, formats, or custom links.' ) . '</p>';
if ( current_theme_supports( 'widgets' ) ) {
/* translators: URL to the widgets panel of the customizer */
$description .= '<p>' . sprintf( __( 'Menus can be displayed in locations defined by your theme or in <a href="%s">widget areas</a> by adding a &#8220;Custom Menu&#8221; widget.' ), "javascript:wp.customize.panel( 'widgets' ).focus();" ) . '</p>';
} else {
$description .= '<p>' . __( 'Menus can be displayed in locations defined by your theme.' ) . '</p>';
@ -512,11 +513,15 @@ final class WP_Customize_Nav_Menus {
$locations = get_registered_nav_menus();
$num_locations = count( array_keys( $locations ) );
if ( 1 == $num_locations ) {
$description = '<p>' . __( 'Your theme supports one menu. Select which menu you would like to use.' );
$description = '<p>' . __( 'Your theme supports one menu. Select which menu you would like to use.' ) . '</p>';
} else {
$description = '<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 ) );
/* translators: %s: number of menu locations */
$description = '<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>';
}
if ( current_theme_supports( 'widgets' ) ) {
/* translators: URL to the widgets panel of the customizer */
$description .= '<p>' . sprintf( __( 'You can also place menus in <a href="%s">widget areas</a> with the &#8220;Custom Menu&#8221; widget.' ), "javascript:wp.customize.panel( 'widgets' ).focus();" ) . '</p>';
}
$description .= '</p><p>' . __( 'You can also place menus in widget areas with the Custom Menu widget.' ) . '</p>';
$this->manager->add_section( 'menu_locations', array(
'title' => __( 'Menu Locations' ),