diff --git a/wp-admin/widgets.php b/wp-admin/widgets.php index a0fe1fee4b..952c4388f7 100644 --- a/wp-admin/widgets.php +++ b/wp-admin/widgets.php @@ -68,23 +68,8 @@ get_current_screen()->set_help_sidebar( '

' . __('Support Forums') . '

' ); -if ( empty($wp_registered_sidebars) ) { - // the theme has no sidebars, die. - require_once( './admin-header.php' ); -?> - -
- -

-
-

-
-

follow these instructions.' ); ?>

-
- -follow these instructions.' ) ); } // These are the widgets grouped by sidebar diff --git a/wp-includes/functions.php b/wp-includes/functions.php index a39c4dbb71..58a7742228 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2549,6 +2549,10 @@ function wp_maybe_load_widgets() { */ 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 ); }