Make WordPress Core

Changeset 37900


Ignore:
Timestamp:
06/28/2016 10:43:31 PM (7 years ago)
Author:
ocean90
Message:

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

Props celloexpressions.
Fixes #36796.

File:
1 edited

Legend:

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

    r37679 r37900  
    497497        $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>';
    498498        if ( current_theme_supports( 'widgets' ) ) {
     499            /* translators: URL to the widgets panel of the customizer */
    499500            $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>';
    500501        } else {
     
    513514        $num_locations = count( array_keys( $locations ) );
    514515        if ( 1 == $num_locations ) {
    515             $description = '<p>' . __( 'Your theme supports one menu. Select which menu you would like to use.' );
     516            $description = '<p>' . __( 'Your theme supports one menu. Select which menu you would like to use.' ) . '</p>';
    516517        } else {
    517             $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 ) );
    518         }
    519         $description  .= '</p><p>' . __( 'You can also place menus in widget areas with the Custom Menu widget.' ) . '</p>';
     518            /* translators: %s: number of menu locations */
     519            $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>';
     520        }
     521        if ( current_theme_supports( 'widgets' ) ) {
     522            /* translators: URL to the widgets panel of the customizer */
     523            $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>';
     524        }
    520525
    521526        $this->manager->add_section( 'menu_locations', array(
Note: See TracChangeset for help on using the changeset viewer.