[wp-trac] [WordPress Trac] #15899: Allow wp_title() to display cleaner titles for post_format archives.

WordPress Trac wp-trac at lists.automattic.com
Sun Dec 19 22:43:52 UTC 2010


#15899: Allow wp_title() to display cleaner titles for post_format archives.
------------------------------------+-----------------------
 Reporter:  mfields                 |       Owner:  mfields
     Type:  defect (bug)            |      Status:  assigned
 Priority:  normal                  |   Milestone:  3.1
Component:  Taxonomy                |     Version:  3.1
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------

Comment (by nacin):

 This is a good start. Things I notice:

  - Instead of using the get_term filter, use the get_$taxonomy filter. The
 filter will run only when necessary and prevents post_format checks.

  - Minor thing. Generally we only use `===` when it's actually necessary.
 Otherwise, stick to `==`.

  - No need to establish the `$order` key if we're not using it.

  - No need to specify 10 as a priority if we're only passing one argument.

  - We need to do more than just str_replace. You're very close though.
 Just call get_post_format_string( $slug ) on the result (result, as in,
 once you've done the str_replace). That'll then provide the translated
 term name.

  - I'm not at all worried about this, but I just wanted to point out that
 the get_terms() filter won't work if fields = names. I don't see other
 issues (with legitimate use cases) elsewhere.

 Mark may have something else.

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


More information about the wp-trac mailing list