Make WordPress Core


Ignore:
Timestamp:
03/17/2022 03:35:13 AM (2 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/site-editor.php

    r52593 r52942  
    5050}
    5151
    52 $block_editor_context = new WP_Block_Editor_Context();
     52$block_editor_context = new WP_Block_Editor_Context( array( 'name' => 'core/edit-site' ) );
    5353$custom_settings      = array(
    5454    'siteUrl'                              => site_url(),
Note: See TracChangeset for help on using the changeset viewer.