mce_external_languages хук-фильтрWP 2.5.0

Filters the translations loaded for external TinyMCE 3.x plugins.

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.

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

add_filter( 'mce_external_languages', 'wp_kama_mce_external_languages_filter', 10, 2 );

/**
 * Function for `mce_external_languages` filter-hook.
 * 
 * @param array  $translations Translations for external TinyMCE plugins.
 * @param string $editor_id    Unique editor identifier, e.g. 'content'.
 *
 * @return array
 */
function wp_kama_mce_external_languages_filter( $translations, $editor_id ){

	// filter...
	return $translations;
}
$translations(массив)
Translations for external TinyMCE plugins.
$editor_id(строка)
Unique editor identifier, e.g. 'content'.

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

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

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

_WP_Editors::editor_settings()
mce_external_languages
wp-includes/class-wp-editor.php 482
$mce_external_languages = apply_filters( 'mce_external_languages', array(), $editor_id );

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

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