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



get_profile ›

Desde1.5.0
Obsoleto3.0.0
get_profile ( $field, $user = false )
Parâmetros: (2)
  • (string) $field User meta field.
    Required: Yes
  • (false|int) $user Optional. User ID to retrieve the field for. Default false (current user).
    Required: No
    Padrão: false
Ver:
Retorna:
  • (string) The author's field from the current author's DB object.
Definido em:
Codex:

Retrieve user data based on field.



Fonte

function get_profile( $field, $user = false ) {
	_deprecated_function( __FUNCTION__, '3.0.0', 'get_the_author_meta()' );
	if ( $user ) {
		$user = get_user_by( 'login', $user );
		$user = $user->ID;
	}
	return get_the_author_meta( $field, $user );
}