wp_editor_settings хук-фильтрWP 4.0.0

Использование

add_filter( 'wp_editor_settings', 'wp_kama_editor_settings_filter', 10, 2 );

/**
 * Function for `wp_editor_settings` filter-hook.
 * 
 * @param array  $settings  Array of editor arguments.
 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' when called from block editor's Classic block.
 *
 * @return array
 */
function wp_kama_editor_settings_filter( $settings, $editor_id ){

	// filter...
	return $settings;
}
$settings(массив)
Array of editor arguments.
$editor_id(строка)
Unique editor identifier, e.g. 'content'. Accepts 'classic-block' when called from block editor's Classic block.

Список изменений

С версии 4.0.0 Введена.

Где вызывается хук

_WP_Editors::parse_settings()
wp_editor_settings
wp_tinymce_inline_scripts()
wp_editor_settings
wp-includes/class-wp-editor.php 82
$settings = apply_filters( 'wp_editor_settings', $settings, $editor_id );
wp-includes/script-loader.php 463
$editor_settings = apply_filters( 'wp_editor_settings', array( 'tinymce' => true ), 'classic-block' );

Где используется хук в WordPress

Использование не найдено.