teeny_mce_plugins
云策文档标注
概述
teeny_mce_plugins 是一个 WordPress 过滤器,用于修改 TinyMCE 编辑器在“teeny”模式下的插件列表。开发者可以通过此 Hook 添加或移除插件,以定制编辑器的功能。
关键要点
- 过滤器名称:teeny_mce_plugins
- 参数:$plugins(插件数组)和 $editor_id(编辑器唯一标识符)
- 默认插件包括 colorpicker、lists、fullscreen、image、wordpress、wpeditimage、wplink
- 从 WordPress 3.3.0 版本开始添加了 $editor_id 参数
代码示例
$plugins = apply_filters(
'teeny_mce_plugins',
array(
'colorpicker',
'lists',
'fullscreen',
'image',
'wordpress',
'wpeditimage',
'wplink',
),
$editor_id
);注意事项
- 此过滤器仅影响“teeny”模式的 TinyMCE 编辑器,而非完整版本
- 使用 $editor_id 参数可以针对特定编辑器实例进行定制
原文内容
Filters the list of teenyMCE plugins.
Parameters
$pluginsarray-
An array of teenyMCE plugins.
$editor_idstring-
Unique editor identifier, e.g.
'content'.
Source
$plugins = apply_filters(
'teeny_mce_plugins',
array(
'colorpicker',
'lists',
'fullscreen',
'image',
'wordpress',
'wpeditimage',
'wplink',
),
$editor_id
);