the_author filter-hookWP 2.9.0

Filters the display name of the current post's author.

Usage

add_filter( 'the_author', 'wp_kama_the_author_filter' );

/**
 * Function for `the_author` filter-hook.
 * 
 * @param string|null $display_name The author's display name.
 *
 * @return string|null
 */
function wp_kama_the_author_filter( $display_name ){

	// filter...
	return $display_name;
}
$display_name(string|null)
The author's display name.

Changelog

Since 2.9.0 Introduced.

Where the hook is called

get_the_author()
the_author
wp-includes/author-template.php 37
return apply_filters( 'the_author', is_object( $authordata ) ? $authordata->display_name : null );

Where the hook is used in WordPress

wp-includes/default-filters.php 251
add_filter( 'the_author', 'ent2ncr', 8 );