检索作者,帖子类型或术语存档的描述。

原型

get_the_archive_description()

返回值

(string)  档案说明。

源文件

路径:wp-includes/general-template.php

<?php
...
function get_the_archive_description() {
	if ( is_author() ) {
		$description = get_the_author_meta( 'description' );
	} elseif ( is_post_type_archive() ) {
		$description = get_the_post_type_description();
	} else {
		$description = term_description();
	}
	/**
	 * Filters the archive description.
	 *
	 * @since 4.1.0
	 *
	 * @param string $description Archive description to be displayed.
	 */
	return apply_filters( 'get_the_archive_description', $description );
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/get_the_archive_description/