get_preferred_from_update_core()
Selects the first update version from the update_core option.
No Hooks.
Returns
Object|Array|false. The response from the API on success, false on failure.
Usage
get_preferred_from_update_core();
Changelog
| Since 2.7.0 | Introduced. |
get_preferred_from_update_core() get preferred from update core code WP 6.9.1
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];
}