WordPress开发者和主题制作者的搜索引擎



find_core_update ›

Sincen/a
已弃用n/a
find_core_update ( $version, $locale )
参数: (2)
  • (string) $version
    Required: Yes
  • (string) $locale
    Required: Yes
返回:
  • (object|false)
定义在:
文档:

暂无描述



源码

function find_core_update( $version, $locale ) {
	$from_api = get_site_transient( 'update_core' );

	if ( ! isset( $from_api->updates ) || ! is_array( $from_api->updates ) ) {
		return false;
	}

	$updates = $from_api->updates;
	foreach ( $updates as $update ) {
		if ( $update->current == $version && $update->locale == $locale ) {
			return $update;
		}
	}
	return false;
}