mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Add WP_Block_Editor_Context::$name
Adds a new `WP_Block_Editor_Context::$name` and field. This allows plugin developers to tell which block editor is being loaded when using filters such as `allowed_block_types_all` and `block_editor_rest_api_preload_paths`. Fixes #55301. Props talldanwp, gziolo, andraganescu. git-svn-id: https://develop.svn.wordpress.org/trunk@52942 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -15,7 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
$current_screen = get_current_screen();
|
||||
$current_screen->is_block_editor( true );
|
||||
|
||||
$block_editor_context = new WP_Block_Editor_Context();
|
||||
$block_editor_context = new WP_Block_Editor_Context( array( 'name' => 'core/edit-widgets' ) );
|
||||
|
||||
$preload_paths = array(
|
||||
array( rest_get_route_for_post_type_items( 'attachment' ), 'OPTIONS' ),
|
||||
|
||||
Reference in New Issue
Block a user