get_author_template()

最后更新于:2021-11-26 05:03:20

get_author_template()

Retrieve path of author template in current or parent template.

响应

(string) Full path to author template file.

源文件

文件: gc-includes/template.php

function get_author_template() {
	$author = get_queried_object();

	$templates = array();

	if ( $author instanceof GC_User ) {
		$templates[] = "author-{$author->user_nicename}.php";
		$templates[] = "author-{$author->ID}.php";
	}
	$templates[] = 'author.php';

	return get_query_template( 'author', $templates );
}