mce_external_plugins
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
apply_filters( 'mce_external_plugins', array $external_plugins, string $editor_id )
Описание
Фильтр принимает ассоциативный массив внешних плагинов для TinyMCE в форме 'plugin_name' => 'url'.
URL должен быть абсолютным и включать имя загружаемого js-файла. Например: 'myplugin' => 'http://mysite.com/wp-content/plugins/myfolder/mce_plugin.js‘.
Если внешний плагин добавляет кнопку, её следует добавить с помощью одного из фильтров 'mce_buttons'.
Оригинал (английский)
The filter takes an associative array of external plugins for TinyMCE in the form ‘plugin_name’ => ‘url’.
The url should be absolute, and should include the js filename to be loaded. For example: ‘myplugin’ => ‘http://mysite.com/wp-content/plugins/myfolder/mce_plugin.js‘.
If the external plugin adds a button, it should be added with one of the ‘mce_buttons’ filters.
Фильтруемое значение
Параметры
$external_plugins
array
обязательный
$editor_id
string
обязательный
Исходный код
wp-includes/class-wp-editor.php:421
$mce_external_plugins = apply_filters( 'mce_external_plugins', array(), $editor_id );
История изменений
| Версия | Описание |
|---|---|
| 5.3.0 | The $editor_id parameter was added. |
| 2.5.0 | Introduced. |

