[wp-trac] [WordPress Trac] #28399: Allow WP_Query to query by comment_count column of CPT/posts table

WordPress Trac noreply at wordpress.org
Sat Jul 1 11:24:28 UTC 2017


#28399: Allow WP_Query to query by comment_count column of CPT/posts table
---------------------------------------------+---------------------------
 Reporter:  ramon fincken                    |       Owner:  boonebgorges
     Type:  enhancement                      |      Status:  closed
 Priority:  normal                           |   Milestone:  4.9
Component:  Query                            |     Version:  4.0
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"40978"]:
 {{{
 #!CommitTicketReference repository="" revision="40978"
 Introduce `$comment_count` param for `WP_Query`.

 This parameter allows querying for posts with a specific value of
 `comment_count`. It is also possible to query for posts that match
 a `comment_count` comparison by passing an array with 'value' and
 'compare' operators (eg `array( 'compare' => '>', 'value' => 5 )`).

 Props ramon fincken.
 Fixes #28399.
 }}}

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


More information about the wp-trac mailing list