函数原型
get_preferred_from_update_core(): object|array|false
函数描述
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. |

