WordPress Version: 5.4
/**
* WordPress Administration Update API
*
* @package WordPress
* @subpackage Administration
*/
/**
* Selects the first update version from the update_core option.
*
* @since 2.7.0
*
* @return object|array|false The response from the API on success, false on failure.
*/
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];
}