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

WordPress Trac noreply at wordpress.org
Sat Feb 1 19:08:24 UTC 2014


#23749: Post Format Archive Conditional Tag
----------------------------+-----------------------------
 Reporter:  danielpataki    |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  Post Formats    |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  good-first-bug  |     Focuses:  template
----------------------------+-----------------------------

Comment (by danielpataki):

 Hi all,

 Thanks for giving this some attention! I would love to contribute but it's
 my first time so I'm quite sure I've got it all wrong. If you could give
 me some assistance for file naming conventions and so on that would be
 greatly appreciated.

 I pulled the latest version from trunk and made my modifications and
 generated a diff file. I have tested the code on twentyfourteen using no
 parameters, a single post format string and post format array. Seems to
 work fine!

 I am worried about one bit though, it seems sloppy. When getting a post
 format using the get method of $WP_Query a string like this is returned:
 'post-format-image' while the query string is simply 'image'. Due to this
 I used this code:

 {{{
 $post_format = str_replace( 'post-format-', '', $post_format );
 }}}

 It works, but I suspect there is a better way. Apart from this, I
 basically just copied the way is_post_type_archive works.

 Hope I could help, please do let me know how to contribute in a more
 standard way if I'm doing something wrong!

 Daniel

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


More information about the wp-trac mailing list