wppaste
WordPress

apply_filters( 'tiny_mce_plugins', array $plugins, string $editor_id )

Since
3.3.0, 5.3.0
Filters the list of default TinyMCE plugins.

Description

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

Compatibility

WordPress
since 5.3.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$pluginsarray
An array of default TinyMCE plugins.
$editor_idstring
Unique editor identifier, e.g. 'content'. Accepts 'classic-block' when called from block editor's Classic block.

Where this hook fires · 2

  • wp-includes/class-wp-editor.php:461_WP_Editors::editor_settings()
  • wp-includes/script-loader.php:553wp_tinymce_inline_scripts()

Source code

<?php					 * @since 5.3.0 The `$editor_id` parameter was added.					 *					 * @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.					 */					$plugins = array_unique( apply_filters( 'tiny_mce_plugins', $plugins, $editor_id ) ); 					$key = array_search( 'spellchecker', $plugins, true );					if ( false !== $key ) {						/*						 * Remove 'spellchecker' from the internal plugins if added with 'tiny_mce_plugins' filter to prevent errors.						 * It can be added with 'mce_external_plugins'.

Changelog

Introduced in 3.3.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

5.3.0
The $editor_id parameter was added.from the docblock
3.3.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.