[wp-trac] [WordPress Trac] #32762: Comment meta queries cannot be set in WP_Comment_Query via pre_get_comments

WordPress Trac noreply at wordpress.org
Tue Jun 23 12:35:00 UTC 2015


#32762: Comment meta queries cannot be set in WP_Comment_Query via pre_get_comments
--------------------------+-----------------------------
 Reporter:  needle        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Comments      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 This is a follow-up to #30478 (via [31467]) which introduced the
 `$meta_query_clauses` local variable to the `get_comments()` method.

 An unintended side effect of pre-processing meta queries into this
 variable is that one can no longer use the `pre_get_comments` filter to
 create meta queries of type `WP_Meta_Query` to alter the query.

 See, for example, this post on the forums:
 https://wordpress.org/support/topic/wordpress-421-pre_get_comments-doesnt-
 work-after-update

 This is a critical issue for plugins which hide/show comments based on a
 comment meta value - in most cases all previously private, hidden comments
 will now be public.

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


More information about the wp-trac mailing list