Editor: Remove editor type specific filters for block editor configuration

Aligns with changes introduced in the Gutenberg plugin. The planned follow-up replace the editor name string with a context object to bring back an optional reference to the actual post.

Props youknowriad.
See #52920.


Built from https://develop.svn.wordpress.org/trunk@50920


git-svn-id: http://core.svn.wordpress.org/trunk@50529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
gziolo 2021-05-17 15:08:00 +00:00
parent b6ba5d33bc
commit ff46fda58d
2 changed files with 1 additions and 29 deletions

View File

@ -120,21 +120,6 @@ function get_allowed_block_types( $editor_name ) {
* @param string $editor_name The name of the editor, e.g. 'post-editor'.
*/
$allowed_block_types = apply_filters( 'allowed_block_types_all', $allowed_block_types, $editor_name );
/**
* Filters the allowed block types for the given editor, defaulting to `true`
* (all registered block types supported).
*
* The dynamic portion of the hook name, `$editor_name`, refers to the name
* of the editor type, e.g. 'post-editor', 'site-editor', etc.
*
* @since 5.8.0
*
* @param bool|array $allowed_block_types Array of block type slugs, or
* boolean to enable/disable all.
* @param string $editor_name The name of the editor, e.g. 'post-editor'.
*/
$allowed_block_types = apply_filters( "allowed_block_types_{$editor_name}", $allowed_block_types, $editor_name );
if ( 'post-editor' === $editor_name ) {
$post = get_post();
@ -267,19 +252,6 @@ function get_block_editor_settings( $editor_name, $custom_settings = array() ) {
* @param string $editor_name The name of the editor, e.g. 'post-editor'.
*/
$editor_settings = apply_filters( 'block_editor_settings_all', $editor_settings, $editor_name );
/**
* Filters the settings to pass to the block editor for a given editor type.
*
* The dynamic portion of the hook name, `$editor_name`, refers to the name
* of the editor type, e.g. 'post-editor', 'site-editor', etc.
*
* @since 5.8.0
*
* @param array $editor_settings Default editor settings.
* @param string $editor_name The name of the editor, e.g. 'post-editor'.
*/
$editor_settings = apply_filters( "block_editor_settings_{$editor_name}", $editor_settings, $editor_name );
if ( 'post-editor' === $editor_name ) {
$post = get_post();

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-50919';
$wp_version = '5.8-alpha-50920';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.