函数原型
get_theme_updates(): array
函数描述
Retrieves themes with updates available.
是否弃用
未弃用
函数参数
无
函数返回值
array
函数位置
File: wp-admin/includes/update.php.
函数源码
function get_theme_updates() {
$current = get_site_transient( 'update_themes' );
if ( ! isset( $current->response ) ) {
return array();
}
$update_themes = array();
foreach ( $current->response as $stylesheet => $data ) {
$update_themes[ $stylesheet ] = wp_get_theme( $stylesheet );
$update_themes[ $stylesheet ]->update = $data;
}
return $update_themes;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |

