theme_install_actions
云策文档标注
概述
此文档介绍 theme_install_actions 过滤器,用于在安装主题列表表中自定义主题的操作链接。开发者可以通过此过滤器修改或添加链接,如安装、预览和详情等。
关键要点
- theme_install_actions 是一个过滤器,允许修改主题安装列表中的操作链接数组。
- 参数包括 $actions(操作链接数组)和 $theme(WordPress.org API 返回的主题数据对象)。
- 此过滤器在 WP_Theme_Install_List_Table::single_row() 方法中使用,用于打印主题行。
- 自 WordPress 3.4.0 版本引入。
原文内容
Filters the install action links for a theme in the Install Themes list table.
Parameters
$actionsstring[]-
An array of theme action links. Defaults are links to Install Now, Preview, and Details.
$themestdClass-
An object that contains theme data returned by the WordPress.org API.
Source
$actions = apply_filters( 'theme_install_actions', $actions, $theme );
Changelog
| Version | Description |
|---|---|
| 3.4.0 | Introduced. |