block_editor_settings
Deprecated since 5.8.0. It is no longer supported and may be removed in future releases. See block_editor_settings_all.
Filters the settings to pass to the block editor.
Usage
add_filter( 'block_editor_settings', 'wp_kama_block_editor_settings_filter', 10, 3 );
/**
* Function for `block_editor_settings` filter-hook.
*
* @param array $editor_settings Default editor settings.
* @param WP_Post $post Post being edited.
* @param $string
*
* @return array
*/
function wp_kama_block_editor_settings_filter( $editor_settings, $post, $string ){
// filter...
return $editor_settings;
}
- $editor_settings(array)
- Default editor settings.
- $post(WP_Post)
- Post being edited.
- $string
- -
Changelog
| Since 5.0.0 | Introduced. |
| Deprecated since 5.8.0 | Use the {@see 'block_editor_settings_all'} filter instead. |
Where the hook is called
block_editor_settings
wp-includes/block-editor.php 659
$editor_settings = apply_filters_deprecated( 'block_editor_settings', array( $editor_settings, $post ), '5.8.0', 'block_editor_settings_all' );