wppaste
WordPress

apply_filters( 'mce_external_languages', array $translations, string $editor_id )

Since
2.5.0, 5.3.0
Filters the translations loaded for external TinyMCE 3.x plugins.

Description

The filter takes an associative array ('plugin_name' => 'path') where 'path' is the include path to the file. The language file should follow the same format as wp_mce_translation(), and should define a variable ($strings) that holds all translated strings.

Parameters

$translationsarray
Translations for external TinyMCE plugins.
$editor_idstring
Unique editor identifier, e.g. 'content'.

Fired at · 1

  • wp-includes/class-wp-editor.php:489_WP_Editors::editor_settings()

Source

						 * @since 2.5.0						 * @since 5.3.0 The `$editor_id` parameter was added.						 *						 * @param array  $translations Translations for external TinyMCE plugins.						 * @param string $editor_id    Unique editor identifier, e.g. 'content'.						 */						$mce_external_languages = apply_filters( 'mce_external_languages', array(), $editor_id ); 						$loaded_langs = array();						$strings      = ''; 						if ( ! empty( $mce_external_languages ) ) {							foreach ( $mce_external_languages as $name => $path ) {

History

Introduced in 2.5.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
2.5.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 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.