Make WordPress Core

Changeset 33036


Ignore:
Timestamp:
07/01/2015 07:34:17 PM (9 years ago)
Author:
westonruter
Message:

Customizer: Add link to Widgets panel from Menus panel description.

Props celloexpressions.
Fixes #32742.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-nav-menus.php

    r33035 r33036  
    400400
    401401        // Create a panel for Menus.
     402        $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>';
     403        if ( current_theme_supports( 'widgets' ) ) {
     404            $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>';
     405        } else {
     406            $description .= '<p>' . __( 'Menus can be displayed in locations defined by your theme.' ) . '</p>';
     407        }
    402408        $this->manager->add_panel( new WP_Customize_Nav_Menus_Panel( $this->manager, 'nav_menus', array(
    403409            'title'       => __( 'Menus' ),
    404             '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><p>' . __( 'Menus can be displayed in locations defined by your theme or in widget areas by adding a "Custom Menu" widget.' ) . '</p>',
     410            'description' => $description,
    405411            'priority'    => 100,
    406412            // 'theme_supports' => 'menus|widgets', @todo allow multiple theme supports
Note: See TracChangeset for help on using the changeset viewer.