get_preferred_from_update_core

函数


get_preferred_from_update_core ( No parameters )
返回值
  • (object|array|false) The response from the API on success, false on failure.
定义位置
  • wp-admin/includes/update.php
    , line 16
引入
2.7.0
弃用

Selects the first update version from the update_core option.

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];
}