get_preferred_from_update_core()

最后更新于:2021-11-26 23:07:27

get_preferred_from_update_core()

Selects the first update version from the update_core option.

响应

(object|array|false) The response from the API on success, false on failure.

源文件

文件: gc-admin/includes/update.php

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