WordPress at a glance

get_the_author() WP 1.0

Retrieve the author of the current post.

Notes:

  • Global. Object. $authordata The current author's DB object.
Is the basis for: the_author()
Hooks from function:
Return

String/null. The author's display name.

Usage

get_the_author( $deprecated );
$deprecated(string)
Deprecated.
Default: ''

Code of get_the_author: wp-includes/author-template.php VER 4.9.8

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

Related Functions

From tag: WP Loop

More from category: Other

More from Template Tags: Authors

No comments
    Hello, !     Log In . Register