get_the_author( string $deprecated = '' )

Retrieve the author of the current post.


Description Description


Parameters Parameters

$deprecated

(string) (Optional) Deprecated.

Default value: ''


Top ↑

Return Return

(string|null) The author's display name.


Top ↑

Source Source

File: wp-includes/author-template.php

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 $authordata->display_name The author's display name.
	 */
	return apply_filters( 'the_author', is_object( $authordata ) ? $authordata->display_name : null );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.5.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.