wpseek.com
A WordPress-centric search engine for devs and theme authors



get_preferred_from_update_core › WordPress Function

Since2.7.0
Deprecatedn/a
get_preferred_from_update_core ( No parameters )
Returns:
  • (object|array|false) The response from the API on success, false on failure.
Defined at:
Codex:

Selects the first update version from the update_core option.



Source

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