Make WordPress Core

Ticket #36796: 36796.diff

File 36796.diff, 1.6 KB (added by celloexpressions, 10 years ago)
  • src/wp-includes/class-wp-customize-nav-menus.php

     
    512512                $locations     = get_registered_nav_menus();
    513513                $num_locations = count( array_keys( $locations ) );
    514514                if ( 1 == $num_locations ) {
    515                         $description = '<p>' . __( 'Your theme supports one menu. Select which menu you would like to use.' );
     515                        $description = '<p>' . __( 'Your theme supports one menu. Select which menu you would like to use.' ) . '</p>';
    516516                } 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 ) );
     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 ) ) . '</p>';
    518518                }
    519                 $description  .= '</p><p>' . __( 'You can also place menus in widget areas with the Custom Menu widget.' ) . '</p>';
     519                if ( current_theme_supports( 'widgets' ) ) {
     520                        $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>';
     521                }
    520522
    521523                $this->manager->add_section( 'menu_locations', array(
    522524                        'title'       => __( 'Menu Locations' ),