从update_core选项中选择第一个更新版本。
原型
get_preferred_from_update_core()
返回值
(object|array|false)
API对成功的响应,失败时为false。
源文件
路径:wp-admin/includes/update.php
<?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];
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/get_preferred_from_update_core/