Uses
Uses | Description |
---|---|
wp-admin/includes/update.php: get_core_updates() | Gets available core updates. |
Selects the first update version from the update_core option.
(object|array|false) The response from the API on success, false on failure.
File: wp-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]; }
Version | Description |
---|---|
2.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_preferred_from_update_core