get_theme_updates() - WordPress 函数参考中文文档

返回介绍

get_theme_updates()

发布于 2017-09-11 字数1175 浏览 948 评论 0

get_theme_updates()

描述


返回值

(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;
}

Collapse full 源代码 code

View on Trac


相关函数

Uses

  • wp-includes/theme.php:
    wp_get_theme()
  • wp-includes/option.php:
    get_site_transient()

Used By

  • wp-admin/includes/class-wp-automatic-updater.php:
    WP_Automatic_Updater::send_email()
  • wp-admin/update-core.php:
    list_theme_updates()

User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!