editor_stylesheets
云策文档标注
概述
editor_stylesheets 是一个 WordPress 过滤器,用于修改应用于编辑器的样式表 URL 数组。它允许开发者自定义编辑器样式。
关键要点
- 这是一个过滤器,参数为 $stylesheets,类型为 string[],表示要应用于编辑器的样式表 URL 数组。
- 源代码中使用 apply_filters('editor_stylesheets', $stylesheets) 来应用此过滤器。
- 相关函数 get_editor_stylesheets() 用于检索已注册的编辑器样式表 URL。
- 此过滤器从 WordPress 4.3.0 版本开始引入。
原文内容
Filters the array of URLs of stylesheets applied to the editor.
Parameters
$stylesheetsstring[]-
Array of URLs of stylesheets to be applied to the editor.
Source
return apply_filters( 'editor_stylesheets', $stylesheets );
Changelog
| Version | Description |
|---|---|
| 4.3.0 | Introduced. |