tiny_mce_plugins filter-hookWP 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.

Usage

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(array)
An array of default TinyMCE plugins.
$editor_id(string)
Unique editor identifier, e.g. 'content'. Accepts 'classic-block' when called from block editor's Classic block.

Changelog

Since 3.3.0 Introduced.
Since 5.3.0 The $editor_id parameter was added.

Where the hook is called

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

Where the hook is used in WordPress

Usage not found.