From 552879c8420d695dfdccf86b9321133d8a437c89 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Wed, 1 Jul 2015 19:34:17 +0000 Subject: [PATCH] Customizer: Add link to Widgets panel from Menus panel description. Props celloexpressions. Fixes #32742. git-svn-id: https://develop.svn.wordpress.org/trunk@33036 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-customize-nav-menus.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-customize-nav-menus.php b/src/wp-includes/class-wp-customize-nav-menus.php index eec35ee7c6..16531c1574 100644 --- a/src/wp-includes/class-wp-customize-nav-menus.php +++ b/src/wp-includes/class-wp-customize-nav-menus.php @@ -399,9 +399,15 @@ final class WP_Customize_Nav_Menus { $this->manager->register_control_type( 'WP_Customize_Nav_Menu_Item_Control' ); // 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' ) ) { + $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.' ) . '

'; + } $this->manager->add_panel( new WP_Customize_Nav_Menus_Panel( $this->manager, 'nav_menus', array( 'title' => __( '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.' ) . '

' . __( 'Menus can be displayed in locations defined by your theme or in widget areas by adding a "Custom Menu" widget.' ) . '

', + 'description' => $description, 'priority' => 100, // 'theme_supports' => 'menus|widgets', @todo allow multiple theme supports ) ) );