WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/02/2021 01:56:35 AM (6 months ago)
Author:
noisysocks
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/widgets.php

    r50996 r51061  
    2121}
    2222
     23if ( ! current_theme_supports( 'widgets' ) ) {
     24    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>.' ) );
     25}
     26
    2327$title       = __( 'Widgets' );
    2428$parent_file = 'themes.php';
Note: See TracChangeset for help on using the changeset viewer.