Make WordPress Core


Ignore:
Timestamp:
03/17/2022 03:35:13 AM (3 years ago)
Author:
noisysocks
Message:

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.

File:
1 edited

Legend:

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

    r51962 r52942  
    1616$current_screen->is_block_editor( true );
    1717
    18 $block_editor_context = new WP_Block_Editor_Context();
     18$block_editor_context = new WP_Block_Editor_Context( array( 'name' => 'core/edit-widgets' ) );
    1919
    2020$preload_paths = array(
Note: See TracChangeset for help on using the changeset viewer.