allowed_themes
云策文档标注
概述
allowed_themes 过滤器用于修改网络中允许的主题数组,适用于 WordPress 多站点网络环境。
关键要点
- 过滤器名称:allowed_themes
- 参数:$allowed_themes,一个包含主题样式表名称的字符串数组
- 应用场景:在 WP_Theme::get_allowed_on_network() 方法中调用,用于控制网络级别允许的主题列表
- 引入版本:WordPress MU 3.0.0
原文内容
Filters the array of themes allowed on the network.
Parameters
$allowed_themesstring[]-
An array of theme stylesheet names.
Source
$allowed_themes = apply_filters( 'allowed_themes', $allowed_themes );
Changelog
| Version | Description |
|---|---|
| MU (3.0.0) | Introduced. |