wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



get_preferred_from_update_core › WordPress Function

Desde2.7.0
Obsoleton/a
get_preferred_from_update_core ( Sem parâmetros )
Retorna:
  • (object|array|false) The response from the API on success, false on failure.
Definido em:
Codex:

Selects the first update version from the update_core option.



Fonte

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