[wp-trac] [WordPress Trac] #16149: Allow querying for the standard post format

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 2 07:52:12 UTC 2012


#16149: Allow querying for the standard post format
-------------------------+-----------------------------
 Reporter:  nacin        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Query        |     Version:  3.1
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+-----------------------------

Comment (by alexkingorg):

 I started hacking on this a little differently before realizing there was
 an existing ticket for this. Having now reviewed the existing patch, they
 are better than what I had come up with with one exception: these don't
 allow you to do a manual WP_Query by standard format:

 {{{
 $q = new WP_Query(array(
         'post_format' => 'post-format-standard'
 ));
 }}}

 because they hook on 'request'.

 I've hooked on 'pre_get_posts' instead, which will also handle manual
 queries - I think this is important functionality to include. Perhaps we
 need to hook in on 'parse_query' instead to use the approach in Nacin's
 patch?

 Here is what I was hacking on, in case it is of interest.

 https://gist.github.com/1549613

 A big +1 from me on this functionality being desirable as a core feature.

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


More information about the wp-trac mailing list