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

WordPress Trac noreply at wordpress.org
Tue Jan 26 06:52:44 UTC 2016


#35601: WP_Query: comment_status and ping_status
---------------------------------------------+---------------------------
 Reporter:  birgire                          |       Owner:  boonebgorges
     Type:  feature request                  |      Status:  closed
 Priority:  normal                           |   Milestone:  4.5
Component:  Query                            |     Version:  4.4
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  needs-unit-tests good-first-bug  |     Focuses:
---------------------------------------------+---------------------------

Comment (by birgire):

 Great and thanks for the unit-test @boonebgorges.

 I guess I was too paranoid regarding allowed searchable values ;-)

 If we don't want to restrict the possible custom values, other than
 preparing it, I wonder if we should allow {{{0}}} and the empty string
 {{{''}}} as well and change:

 {{{ if( ! empty( $q['comment_status' ] ) ) }}}

 to

 {{{ if( isset( $q['comment_status'] ) ) }}}

 since {{{empty()}}} treats {{{0}}} as empty. And similarly for the ping
 status.

 I also removed the extra trailing space after {{{%s}}}, that I had added
 previously.

 I added 35601-2.diff for these updates.

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


More information about the wp-trac mailing list