theme_update_available()
云策文档标注
概述
theme_update_available() 是一个 WordPress 函数,用于检查主题是否有可用更新,并在有更新时显示更新链接。它依赖于 get_theme_update_available() 函数来获取更新信息。
关键要点
- 函数功能:检查指定主题是否有可用更新,并输出更新链接。
- 参数:接受一个 WP_Theme 对象作为必需参数,用于指定主题数据。
- 依赖关系:内部调用 get_theme_update_available() 函数来检索更新链接。
- 使用场景:主要用于 WP_Themes_List_Table::display_rows() 中生成主题列表表格行。
- 版本历史:自 WordPress 2.7.0 版本引入。
原文内容
Check if there is an update for a theme available.
Description
Will display link, if there is an update available.
See also
Parameters
$themeWP_Themerequired-
Theme data object.
Source
function theme_update_available( $theme ) {
echo get_theme_update_available( $theme );
}
Changelog
| Version | Description |
|---|---|
| 2.7.0 | Introduced. |