get_preferred_from_update_core

Advertisement

Summery Summery

Selects the first update version from the update_core option.

Syntax Syntax

get_preferred_from_update_core()

Return Return

(object|array|false) The response from the API on success, false on failure.

Source Source

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

Advertisement

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Advertisement

Leave a Reply