[wp-trac] [WordPress Trac] #35601: WP_Query: comment_status and ping_status

WordPress Trac noreply at wordpress.org
Mon Jan 25 13:44:19 UTC 2016


#35601: WP_Query: comment_status and ping_status
-------------------------+-----------------------------
 Reporter:  birgire      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Query        |    Version:  4.4
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 The {{{post_status}}} parameter is supported by {{{WP_Query}}}, but
 {{{comment_status}}} and {{{ping_status}}} are not supported.

 It's possible to use the {{{posts_where}}} filter to modify a query for a
 specific comment status or ping status, but I wonder why such basic post
 properties aren't directly filterable in {{{WP_Query}}}.

 Example:

 {{{$query = new WP_Query( [ 'comment_status' => 'closed' ] );}}}

 {{{$query = new WP_Query( [ 'ping_status' => 'open' ] );}}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35601>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list