Uses
| Uses | Description | 
|---|---|
| wp-includes/theme.php: current_theme_supports() | Checks a theme’s support for a given feature. | 
| wp-includes/l10n.php: __() | Retrieve the translation of $text. | 
Append the Widgets menu to the themes main menu.
File: wp-includes/functions.php
function wp_widgets_add_menu() {
	global $submenu;
	if ( ! current_theme_supports( 'widgets' ) ) {
		return;
	}
	$submenu['themes.php'][7] = array( __( 'Widgets' ), 'edit_theme_options', 'widgets.php' );
	ksort( $submenu['themes.php'], SORT_NUMERIC );
}  | Version | Description | 
|---|---|
| 2.2.0 | Introduced. | 
    © 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
    https://developer.wordpress.org/reference/functions/wp_widgets_add_menu