From ecda236cedb6a882965977764f53de0af715aea1 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Tue, 28 Jun 2016 22:44:30 +0000 Subject: [PATCH] Customize: Link "widget areas" to widgets panel in menu locations section description. Props celloexpressions. Fixes #36796. Built from https://develop.svn.wordpress.org/trunk@37900 git-svn-id: http://core.svn.wordpress.org/trunk@37841 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-nav-menus.php | 11 ++++++++--- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/wp-includes/class-wp-customize-nav-menus.php b/wp-includes/class-wp-customize-nav-menus.php index d84ee9e936..f9832a69b2 100644 --- a/wp-includes/class-wp-customize-nav-menus.php +++ b/wp-includes/class-wp-customize-nav-menus.php @@ -496,6 +496,7 @@ final class WP_Customize_Nav_Menus { // Create a panel for Menus. $description = '

' . __( '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.' ) . '

'; if ( current_theme_supports( 'widgets' ) ) { + /* translators: URL to the widgets panel of the customizer */ $description .= '

' . sprintf( __( 'Menus can be displayed in locations defined by your theme or in widget areas by adding a “Custom Menu” widget.' ), "javascript:wp.customize.panel( 'widgets' ).focus();" ) . '

'; } else { $description .= '

' . __( 'Menus can be displayed in locations defined by your theme.' ) . '

'; @@ -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 = '

' . __( 'Your theme supports one menu. Select which menu you would like to use.' ); + $description = '

' . __( 'Your theme supports one menu. Select which menu you would like to use.' ) . '

'; } else { - $description = '

' . 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 = '

' . 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 ) ) . '

'; + } + if ( current_theme_supports( 'widgets' ) ) { + /* translators: URL to the widgets panel of the customizer */ + $description .= '

' . sprintf( __( 'You can also place menus in widget areas with the “Custom Menu” widget.' ), "javascript:wp.customize.panel( 'widgets' ).focus();" ) . '

'; } - $description .= '

' . __( 'You can also place menus in widget areas with the Custom Menu widget.' ) . '

'; $this->manager->add_section( 'menu_locations', array( 'title' => __( 'Menu Locations' ), diff --git a/wp-includes/version.php b/wp-includes/version.php index b47ff7f11b..e5c84955c8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37899'; +$wp_version = '4.6-alpha-37900'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.