[wp-trac] [WordPress Trac] #31237: improve get_the_archive_title() with new filter

WordPress Trac noreply at wordpress.org
Thu Feb 5 08:21:24 UTC 2015


#31237: improve get_the_archive_title() with new filter
-------------------------+-----------------------------
 Reporter:  ramiy        |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Themes       |    Version:  4.1
 Severity:  normal       |   Keywords:
  Focuses:  template     |
-------------------------+-----------------------------
 The new [https://core.trac.wordpress.org/browser/tags/4.1/src/wp-includes
 /general-template.php#L1134 get_the_archive_title()] function introduces
 in wordpress 4.1 is very handy but it's very basic.

 In some themes we prefer to hide the page prefix (i.e. Category, Tag,
 ect.).

 I was thinking of a boolean parameter/filter in the function to show/hide
 the prefix.

 if true, use:
 {{{
 __( 'Category: %s' )
 }}}

 else, use:
 {{{
 __( '%s' )
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31237>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list