Files
WordPress/wp-includes
Boone Gorges 304802d70d Use the comment API rather than direct SQL queries in comments_template().
`comments_template()` is used by most themes to display a post's comments. It
shows all comments that have been approved, and also shows all pending comments
by the current visitor (as determined by the comment cookies). However, the
comments API previously had no way of querying for "all comments that are
either approved, or are unapproved but written by foo@example.com". The
workaround was a direct SQL query: uncached, not subject to the same filters as
other comment queries, and just generally icky.

The new `include_unapproved` parameter for `WP_Comment_Query` accepts an array
of user IDs or email addresses. Pending comments associated with users in this
array will be included in query results, regardless of the value of the 'status'
parameter. In `comments_template()`, we leap from direct SQL queries to
`get_comments()` plus `include_unapproved', striving to put right what once
went wrong.

Props boonebgorges, simonwheatley, hardy101, jesin.
Fixes #19623.
Built from https://develop.svn.wordpress.org/trunk@29965


git-svn-id: http://core.svn.wordpress.org/trunk@29712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-19 19:39:20 +00:00
..
2014-09-11 19:07:17 +00:00
2014-03-27 22:41:14 +00:00
2014-10-16 19:02:38 +00:00
2014-08-09 19:30:17 +00:00
2014-08-09 19:30:17 +00:00
2014-10-18 19:04:20 +00:00
2014-06-10 00:30:15 +00:00
2014-10-16 04:45:17 +00:00
2014-09-12 05:51:17 +00:00
2014-03-26 18:43:14 +00:00
2014-09-29 04:07:15 +00:00
2013-10-30 14:39:10 +00:00
2014-07-09 18:07:16 +00:00