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

WordPress Trac noreply at wordpress.org
Tue Aug 6 22:26:33 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 needs-dev-note                        |
-------------------------------------------------+-------------------------

Comment (by felipeelia):

 Thanks for the prompt reply, @adamsilverstein! Hopefully, the code I made
 [https://core.trac.wordpress.org/ticket/45800#comment:8 in this comment]
 can be a start for the needed dev-note.

 If so, let me just leave a reminder here: as we are exiting from
 `get_comments()` earlier, we should cast those objects into WP_Comment
 instances. `get_comments()` has a `$comments = array_map( 'get_comment',
 $_comments );` near its end and it won't be executed in short-circuited
 cases.

 Let me know if I can help with something else, I'd be glad to.

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


More information about the wp-trac mailing list