wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



get_preferred_from_update_core › WordPress Function

Depuis2.7.0
Dépréciéen/a
get_preferred_from_update_core ( Pas de paramètres )
Retourne:
  • (object|array|false) The response from the API on success, false on failure.
Défini(e) dans:
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];
}