wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



get_preferred_from_update_core › WordPress Function

Od2.7.0
Przestarzałyn/a
› get_preferred_from_update_core ( Brak parametrów )
Powrót:
  • (object|array|false) The response from the API on success, false on failure.
Zdefiniowane na:
Codex:

Selects the first update version from the update_core option.



Źródło

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