From b2ca4611f6a74e7b155a92e99e67697c099776cc Mon Sep 17 00:00:00 2001 From: Anson Kao Date: Wed, 5 Mar 2014 02:21:37 -0500 Subject: [PATCH] Author Archives title - WPML Compatibility If WPML String Translation is used to have multilingual author names, this change is needed to persist the translation to the title of the Author Archives page. --- lib/titles.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/titles.php b/lib/titles.php index 6ef7743..21f8c05 100644 --- a/lib/titles.php +++ b/lib/titles.php @@ -23,7 +23,7 @@ function roots_title() { return sprintf(__('Yearly Archives: %s', 'roots'), get_the_date('Y')); } elseif (is_author()) { $author = get_queried_object(); - return sprintf(__('Author Archives: %s', 'roots'), $author->display_name); + return sprintf(__('Author Archives: %s', 'roots'), apply_filters('the_author', is_object($author) ? $author->display_name : null)); } else { return single_cat_title('', false); } @@ -34,4 +34,4 @@ function roots_title() { } else { return get_the_title(); } -} \ No newline at end of file +}