[wp-trac] [WordPress Trac] #21995: (get/the)_archive_title and (get/the)_archive_description functions
WordPress Trac
noreply at wordpress.org
Wed Nov 5 19:28:54 UTC 2014
#21995: (get/the)_archive_title and (get/the)_archive_description functions
---------------------------------------------+--------------------------
Reporter: thomask | Owner: johnbillion
Type: feature request | Status: reopened
Priority: normal | Milestone: 4.1
Component: Themes | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch twenty-fifteen commit | Focuses: template
---------------------------------------------+--------------------------
Comment (by ocean90):
`$prefix . apply_filters( 'get_the_archive_title', $title );` doesn't work
for RTL languages.
And I don't see the need to make the prefix itself filterable.
`get_the_archive_title` would be enough:
{{{
add_filter( 'get_the_archive_title', function( $title ) {
if ( is_author() ) {
$title = get_the_author();
} elseif ( is_tax( 'post_format', 'post-format-audio' ) ) {
$title = _( 'Posts about Audio', 'foo' );
}
return $title;
} );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21995#comment:49>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list