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



get_user_meta ›

Desde3.0.0
Obsoleton/a
get_user_meta ( $user_id, $key = '', $single = false )
Parâmetros: (3)
  • (int) $user_id User ID.
    Required: Yes
  • (string) $key Optional. The meta key to retrieve. By default, returns data for all keys.
    Required: No
    Padrão: (empty)
  • (bool) $single Whether to return a single value.
    Required: No
    Padrão: false
Links:
Retorna:
  • (mixed) Will be an array if $single is false. Will be value of meta data field if $single is true.
Definido em:
Codex:

Retrieve user meta field for a user.



Fonte

function get_user_meta( $user_id, $key = '', $single = false ) {
	return get_metadata( 'user', $user_id, $key, $single );
}