wp_widgets_add_menu() WP 2.2.0
Append the Widgets menu to the themes main menu.
No Hooks.
Return
````. Null. Nothing.
Usage
wp_widgets_add_menu();
Notes
- Global. Array. $submenu
Changelog
Since 2.2.0 | Introduced. |
Code of wp_widgets_add_menu() wp widgets add menu WP 5.7
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 );
}