Widgets: Perform 'widgets_admin_page' action in block widget editor

Perform the 'widgets_admin_page' action just prior to outputting markup for the
widgets block editor so as to maximise backwards compatibility with the old
screen.

Follows [51037].
See #51506.
Props isabel_brison.


git-svn-id: https://develop.svn.wordpress.org/trunk@51038 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Robert Anderson 2021-05-27 01:51:49 +00:00
parent 9ba06a2cbe
commit d270b29f15

View File

@ -56,6 +56,13 @@ wp_enqueue_style( 'wp-edit-widgets' );
do_action( 'enqueue_block_editor_assets' );
require_once ABSPATH . 'wp-admin/admin-header.php';
/**
* Fires before the Widgets administration page content loads.
*
* @since 3.0.0
*/
do_action( 'widgets_admin_page' );
?>
<div id="widgets-editor" class="blocks-widgets-container"></div>