tiny_mce_plugins хук-фильтрWP 3.3.0

Filters the list of default TinyMCE plugins.

The filter specifies which of the default plugins included in WordPress should be added to the TinyMCE instance.

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

add_filter( 'tiny_mce_plugins', 'wp_kama_tiny_mce_plugins_filter', 10, 2 );

/**
 * Function for `tiny_mce_plugins` filter-hook.
 * 
 * @param array  $plugins   An array of default TinyMCE plugins.
 * @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_tiny_mce_plugins_filter( $plugins, $editor_id ){

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

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

С версии 3.3.0 Введена.
С версии 5.3.0 The $editor_id parameter was added.

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

_WP_Editors::editor_settings()
tiny_mce_plugins
wp_tinymce_inline_scripts()
tiny_mce_plugins
wp-includes/class-wp-editor.php 459
$plugins = array_unique( apply_filters( 'tiny_mce_plugins', $plugins, $editor_id ) );
wp-includes/script-loader.php 547
$tinymce_plugins = apply_filters( 'tiny_mce_plugins', $tinymce_plugins, 'classic-block' );

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

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