A WordPress-centric search engine for devs and theme authors



get_preferred_from_update_core ›

Sincen/a
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];
}