Widgets: Add missing actions to widgets block editor

Adds the `'sidebar_admin-setup'`, `'sidebar_admin_page'`, and
`current_theme_supports( 'widgets' )` check to the widgets block editor so that
the block editor screen is more compatible with the classic screen.

Fixes #53288.
Props isabel_brison.


git-svn-id: https://develop.svn.wordpress.org/trunk@51061 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Robert Anderson
2021-06-02 01:56:35 +00:00
parent a46baca60e
commit 7e3b648d74
3 changed files with 10 additions and 4 deletions

View File

@@ -72,10 +72,6 @@ get_current_screen()->set_help_sidebar(
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
);
if ( ! current_theme_supports( 'widgets' ) ) {
wp_die( __( 'The theme you are currently using isn&#8217;t widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please <a href="https://developer.wordpress.org/themes/functionality/widgets/">follow these instructions</a>.' ) );
}
// These are the widgets grouped by sidebar.
$sidebars_widgets = wp_get_sidebars_widgets();