From bfe8ba91b6d3f874d17023d352919a656929ea82 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 31 Aug 2016 23:01:29 +0000 Subject: [PATCH] Template: In `get_the_archive_description()`, add support for author archives. Props henry.wright. Fixes #37259. Built from https://develop.svn.wordpress.org/trunk@38486 git-svn-id: http://core.svn.wordpress.org/trunk@38427 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 11 +++++++++-- wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 7dccf35f7c..c1699e2ca4 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -1505,7 +1505,7 @@ function get_the_archive_title() { } /** - * Display category, tag, or term description. + * Display category, tag, term, or author description. * * @since 4.1.0 * @@ -1522,13 +1522,20 @@ function the_archive_description( $before = '', $after = '' ) { } /** - * Retrieve category, tag, or term description. + * Retrieve category, tag, term, or author description. * * @since 4.1.0 + * @since 4.7.0 Added support for author archives. * * @return string Archive description. */ function get_the_archive_description() { + if ( is_author() ) { + $description = get_the_author_meta( 'description' ); + } else { + $description = term_description(); + } + /** * Filters the archive description. * diff --git a/wp-includes/version.php b/wp-includes/version.php index d5f1ab8cbc..ca639043ac 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38484'; +$wp_version = '4.7-alpha-38486'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.