wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



get_the_author › WordPress Function

Depuis1.5.0
Dépréciéen/a
get_the_author ( $deprecated = '' )
Paramètres:
  • (string) $deprecated Deprecated.
    Requis: Non
    Défaut: (vide)
Retourne:
  • (string) The author's display name, empty string if unknown.
Défini(e) dans:
Codex:
Changelog:
  • 6.3.0

Retrieves the author of the current post.



Source

function get_the_author( $deprecated = '' ) {
	global $authordata;

	if ( ! empty( $deprecated ) ) {
		_deprecated_argument( __FUNCTION__, '2.1.0' );
	}

	/**
	 * Filters the display name of the current post's author.
	 *
	 * @since 2.9.0
	 *
	 * @param string $display_name The author's display name.
	 */
	return apply_filters( 'the_author', is_object( $authordata ) ? $authordata->display_name : '' );
}