wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



get_profile › WordPress Function

Od1.5.0
Przestarzały3.0.0
get_profile ( $field, $user = false )
Parametry: (2)
  • (string) $field User meta field.
    Wymagane: Tak
  • (false|int) $user Optional. User ID to retrieve the field for. Default false (current user).
    Wymagane: Nie
    Domyślny: false
Zobacz:
Powrót:
  • (string) The author's field from the current author's DB object.
Zdefiniowane na:
Codex:

Retrieve user data based on field.



Źródło

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