Un motore di ricerca WordPress per sviluppatori e autori di temi



get_profile ›

Da1.5.0
Deprecato3.0.0
get_profile ( $field, $user = false )
Parametri: (2)
  • (string) $field User meta field.
    Richiesto:
  • (false|int) $user Optional. User ID to retrieve the field for. Default false (current user).
    Richiesto: No
    Default: false
Vedi:
Ritorna:
  • (string) The author's field from the current author's DB object.
Definito a:
Codex:

Retrieve user data based on field.



Sorgenti

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