[wp-trac] [WordPress Trac] #21995: (get/the)_archive_title and (get/the)_archive_description functions

WordPress Trac noreply at wordpress.org
Wed Mar 6 00:22:43 UTC 2013


#21995: (get/the)_archive_title and (get/the)_archive_description functions
------------------------------------+------------------
 Reporter:  thomask                 |       Owner:
     Type:  feature request         |      Status:  new
 Priority:  normal                  |   Milestone:  3.6
Component:  Template                |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------

Comment (by DrewAPicture):

 [attachment:21995.4.diff] adds the taxonomy singular name label when
 `is_tax()`.

 I'm not a huge fan of having to add curly braces just for that one multi-
 line condition. On the other hand, I felt like doing this:
 {{{
 $title = sprintf( __( '%1$s Archives: %2$s' ), get_taxonomy(
 get_queried_object()->taxonomy )->labels->singular_name, $before .
 single_term_title( '', false ) . $after );
 }}}

 was a bit too clever just to keep it on one line.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21995#comment:21>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list