block_editor_settings
Устарел с версии 5.8.0. Больше не поддерживается и может быть удален. Смотрите block_editor_settings_all.
Filters the settings to pass to the block editor.
Использование
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(массив)
- Default editor settings.
- $post(WP_Post)
- Post being edited.
- $string
- -
Список изменений
С версии 5.0.0 | Введена. |
Устарела с 5.8.0 | Use the {@see 'block_editor_settings_all'} filter instead. |
Где вызывается хук
block_editor_settings
wp-includes/block-editor.php 677
$editor_settings = apply_filters_deprecated( 'block_editor_settings', array( $editor_settings, $post ), '5.8.0', 'block_editor_settings_all' );