[wp-trac] [WordPress Trac] #23749: Post Format Archive Conditional Tag

WordPress Trac noreply at wordpress.org
Thu Feb 6 21:47:04 UTC 2014


#23749: Post Format Archive Conditional Tag
----------------------------+---------------------------
 Reporter:  danielpataki    |       Owner:  danielpataki
     Type:  enhancement     |      Status:  assigned
 Priority:  normal          |   Milestone:  3.9
Component:  Post Formats    |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  good-first-bug  |     Focuses:  template
----------------------------+---------------------------
Changes (by nacin):

 * owner:   => danielpataki
 * status:  new => assigned
 * milestone:  Future Release => 3.9


Comment:

 Hi Daniel,

 Thanks for the patch! This is a good first start. Good idea to model it
 off is_post_type_archive initially, as that's more or less what I was
 thinking as well.

 In this case, though, we don't need a new query variable. Post type
 archives are a new construct and didn't have anything existing to
 represent them. But for a post *format* archive, we have `is_tax( 'post-
 format' )`. And to check an individual term, it'd be `is_tax( 'post-
 format', 'post-format-image' )`. These are less-than-straightforward (as
 you note, that term prefix is annoying), hence the desire for a new
 function.

 This new function (and method) just needs to wrap is_tax(), then,
 optionally accepting a post format name, which then receives the 'post-
 format-' prefix before being passed to is_tax(). Make sense?

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


More information about the wp-trac mailing list