[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:03:27 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 chrisvanpatten):

 (Caveat: I may be missing something essential.)

 Giving the prefix its own filter seems (to me) to be less flexible, not
 more flexible. It assumes you'll always want the prefix to be a prefix.

 What if you want to make the "prefix" a suffix instead (e.g. "Pizza
 [Category]" or something)? You'd have to somehow save the prefix (in a
 global or something? ew.) and replace it with an empty string, then append
 the prefix you previously saved to the end of the full archive title in a
 separate function.

 Sure, doing regex parsing and such is a bit annoying (okay, a lot
 annoying) but separating it out and concating the prefix (as in
 [https://core.trac.wordpress.org/ticket/21995#comment:46 the example
 above]) makes assumptions about text order that might not always be true.

 (Again, unless I'm missing something super obvious, which I very well
 might be.)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21995#comment:47>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list