Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



the_author_meta ›

Seit2.8.0
Veraltetn/v
the_author_meta ( $field = '', $user_id = false )
Parameter: (2)
  • (string) $field Selects the field of the users record. See get_the_author_meta() for the list of possible fields.
    Erforderlich: Nein
    Standard: (leer)
  • (int) $user_id Optional. User ID.
    Erforderlich: Nein
    Standard: false
Siehe:
Definiert in:
Codex:

Outputs the field from the user's DB object. Defaults to current post's author.



Quellcode

function the_author_meta( $field = '', $user_id = false ) {
	$author_meta = get_the_author_meta( $field, $user_id );

	/**
	 * The value of the requested user metadata.
	 *
	 * The filter name is dynamic and depends on the $field parameter of the function.
	 *
	 * @since 2.8.0
	 *
	 * @param string $author_meta The value of the metadata.
	 * @param int    $user_id     The user ID.
	 */
	echo apply_filters( "the_author_{$field}", $author_meta, $user_id );
}