all_themes
云策文档标注
概述
all_themes 过滤器用于在 WordPress 多站点网络的主题列表表中,过滤 WP_Theme 对象的完整数组。它允许开发者自定义显示的主题列表。
关键要点
- 过滤器名称:all_themes
- 参数:$allWP_Theme[],一个 WP_Theme 对象数组,用于在列表表中显示
- 应用场景:主要用于多站点网络的主题管理界面
- 相关函数:在 WP_MS_Themes_List_Table::prepare_items() 中使用,位于 wp-admin/includes/class-wp-ms-themes-list-table.php
- 引入版本:WordPress 3.1.0
原文内容
Filters the full array of WP_Theme objects to list in the Multisite themes list table.
Parameters
Source
'all' => apply_filters( 'all_themes', wp_get_themes() ),
Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |