[wp-trac] [WordPress Trac] #45800: Add short circuits for WP_Comment_Query

WordPress Trac noreply at wordpress.org
Tue Jul 30 22:26:53 UTC 2019


#45800: Add short circuits for WP_Comment_Query
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:
                                                 |  adamsilverstein
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.3
Component:  Comments                             |     Version:  3.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests dev-        |     Focuses:
  feedback                                       |
-------------------------------------------------+-------------------------

Comment (by felipeelia):

 Replying to [comment:15 adamsilverstein]:
 > In [attachment:"45800.4.diff"] I updated the doc block to clarify the
 values developers should return from the filter as per
 https://core.trac.wordpress.org/ticket/45800#comment:14.
 >
 > @felipeelia thanks for the head start on the wording/conditions - is
 this close to what you were thinking?

 Yep. I'm happy to see this moving forward!

 The only consideration I have is that the value returned in `$comment_ids`
 can also be an int (if `count` is set), so perhaps the params doc clause
 should be `@param array|int|null` or `@param mixed`, I don't know which
 one is better.

 Also, while we're on it, do we need to assign `$this->comments =
 $comment_ids;`? Why don't we just return `$comment_ids`? If `count` is
 set, for example, having an int on `$this->comments` won't make much
 sense, IMHO.

 ps.: English isn't my first language, so I'm sorry if I'm saying something
 obviously wrong here, but shouldn't it be `bypass WordPress' default`
 instead of `bypass WordPress's default`?  :)

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


More information about the wp-trac mailing list