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



get_preferred_from_update_core › WordPress Function

Since2.7.0
已弃用n/a
get_preferred_from_update_core ( 没有参数 )
返回:
  • (object|array|false) The response from the API on success, false on failure.
定义在:
文档:

Selects the first update version from the update_core option.



源码

function get_preferred_from_update_core() {
	$updates = get_core_updates();

	if ( ! is_array( $updates ) ) {
		return false;
	}

	if ( empty( $updates ) ) {
		return (object) array( 'response' => 'latest' );
	}

	return $updates[0];
}