$description = '<p>' .
__( 'Your theme can display menus in one location. Select which menu you would like to use.'
) . '</p>';
} else { /* translators: %s: Number of menu locations. */
$description = '<p>' .
sprintf( _n( 'Your theme can display menus in %s location. Select which menu you would like to use.', 'Your theme can display menus in %s locations. Select which menu appears in each location.',
$num_locations ),
number_format_i18n( $num_locations ) ) . '</p>';
} if ( current_theme_supports( 'widgets'
) ) { /* translators: URL to the Widgets panel of the Customizer. */
$description .= '<p>' .
sprintf( __( 'If your theme has widget areas, you can also add menus there. Visit the <a href="%s">Widgets panel</a> and add a “Navigation Menu widget” to display a menu in a sidebar or footer.'
), "javascript:wp.customize.panel( 'widgets' ).focus();"
) . '</p>';
} $this->manager->
add_section( 'menu_locations',
array
( 'title' => 1 ===
$num_locations ?
_x( 'View Location', 'menu locations'
) :
_x( 'View All Locations', 'menu locations'
),
'panel' => 'nav_menus',
'priority' => 30,
'description' =>
$description,
) );
$choices = array
( '0' =>
__( '— Select —'
) );
foreach ( $menus as $menu ) {