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
..
certificates
css Media modal: fix reordering of the thumbnails while creating or editing a gallery, props avryl, fixes #29606 for trunk. 2014-10-11 23:24:23 +00:00
fonts Dashicons: Update to the latest dashicons files. 2014-08-17 15:01:16 +00:00
ID3 Update getID3 library to 1.9.8. 2014-09-11 19:07:17 +00:00
images
js Update jQuery UI to 1.11.2. 2014-10-16 19:02:38 +00:00
pomo Fix some documentation typos in various core files. 2014-08-13 03:56:17 +00:00
SimplePie
Text
theme-compat
admin-bar.php Don't display Edit links for posts and terms in toolbar if they are empty. 2014-09-07 08:32:19 +00:00
atomlib.php
author-template.php
bookmark-template.php
bookmark.php Allow bookmarks to be ordered by link_description in get_bookmarks(). 2014-09-29 03:12:17 +00:00
cache.php Fix some words that aren't words. 2014-08-09 19:30:17 +00:00
canonical.php Support nested tax query syntax in redirect_canonical(). 2014-10-15 15:43:19 +00:00
capabilities.php Plugin/Theme Uploads: New capabilities; unify UIs; ensure compatibility with old filters. 2014-08-27 01:32:18 +00:00
category-template.php Additional @return clarifications for get_the_terms(), get_the_tag_list(), and get_the_term_list(). 2014-08-12 23:48:16 +00:00
category.php
class-feed.php
class-http.php Add some unit tests for WP_HTTP::parse_url() to cover the <PHP 5.4.7 compatibility alterations. 2014-10-09 03:01:18 +00:00
class-IXR.php Fix some documentation typos in various core files. 2014-08-13 03:56:17 +00:00
class-json.php
class-oembed.php WP_oEmbed::_strip_newlines is called as a filter callback for oembed_dataparse, must be public. It was marked as private for fun in [14109] and then made private officially in [28507]. 2014-09-12 22:54:16 +00:00
class-phpass.php
class-phpmailer.php
class-pop3.php
class-simplepie.php Fix some documentation typos in various core files. 2014-08-13 03:56:17 +00:00
class-smtp.php PHPMailer: Merge upstream commit (PR274). 2014-09-29 10:28:17 +00:00
class-snoopy.php
class-wp-admin-bar.php
class-wp-ajax-response.php Fix some words that aren't words. 2014-08-09 19:30:17 +00:00
class-wp-customize-control.php Customizer: Change instances of "Theme Customizer" to just "Customizer", as the Customizer isn't necessarily theme-specific. 2014-10-15 17:21:19 +00:00
class-wp-customize-manager.php Customizer: Change instances of "Theme Customizer" to just "Customizer", as the Customizer isn't necessarily theme-specific. 2014-10-15 17:21:19 +00:00
class-wp-customize-panel.php Customizer: Extract content markup for panels to its own method, WP_Customize_Panel::render_content(). 2014-10-17 21:25:19 +00:00
class-wp-customize-section.php Customizer: Increase default priority for a section to 160. 2014-08-15 19:36:16 +00:00
class-wp-customize-setting.php Customizer: Introduce customize_preview_$setting->type action to handle multiple settings of the same type. 2014-10-17 21:21:19 +00:00
class-wp-customize-widgets.php Customizer: Change instances of "Theme Customizer" to just "Customizer", as the Customizer isn't necessarily theme-specific. 2014-10-15 17:21:19 +00:00
class-wp-editor.php Use Tahoma for RTL in general and Arial for Hebrew in editor styles. 2014-09-27 11:10:16 +00:00
class-wp-embed.php Use HTTPS URLs for core.trac.wordpress.org 2014-09-29 13:28:16 +00:00
class-wp-error.php New remove() method and some unit tests for the WP_Error class. 2014-10-08 07:12:18 +00:00
class-wp-http-ixr-client.php
class-wp-image-editor-gd.php Fix setting default quality in WP_Image_Editor. 2014-10-04 13:12:15 +00:00
class-wp-image-editor-imagick.php Fix setting default quality in WP_Image_Editor. 2014-10-04 13:12:15 +00:00
class-wp-image-editor.php Fix setting default quality in WP_Image_Editor. 2014-10-04 13:12:15 +00:00
class-wp-theme.php Set Twenty Fifteen as the new default theme. see #29799. 2014-10-14 19:58:19 +00:00
class-wp-walker.php Fix some documentation typos in various core files. 2014-08-13 03:56:17 +00:00
class-wp-xmlrpc-server.php XML-RPC: Check if category support was added for pages before calling wp_get_post_categories() to avoid unnecessary query in wp.getPage. 2014-09-11 13:56:15 +00:00
class-wp.php Fix some words that aren't words. 2014-08-09 19:30:17 +00:00
class.wp-dependencies.php WP_Dependencies->recurse_deps(): tuck the recursion into elseif so the foreach doesn't break on the first item. 2014-07-20 00:34:15 +00:00
class.wp-scripts.php
class.wp-styles.php wp_add_inline_style(): 2014-10-18 19:04:20 +00:00
comment-template.php Use the comment API rather than direct SQL queries in comments_template(). 2014-10-19 19:39:20 +00:00
comment.php Use the comment API rather than direct SQL queries in comments_template(). 2014-10-19 19:39:20 +00:00
compat.php Constant time for wp_verify_nonce(). 2014-08-06 05:26:16 +00:00
cron.php wp_schedule_single_event() should not prevent scheduling a future duplicate event. It should only reject an event as a duplicate if there is already a similar event scheduled within 10 minutes of the given timestamp. 2014-10-17 19:17:18 +00:00
date.php Add @since annotation for 'user_registered' support in 'date_query_valid_columns' documentation. 2014-10-17 03:51:20 +00:00
default-constants.php Set Twenty Fifteen as the new default theme. see #29799. 2014-10-14 19:58:19 +00:00
default-filters.php Add a default filter to title_save_pre: trim, because extra whitespace. 2014-10-01 18:58:16 +00:00
default-widgets.php Use proper functions for escaped translations. 2014-10-18 20:11:18 +00:00
deprecated.php
feed-atom-comments.php
feed-atom.php
feed-rdf.php
feed-rss.php
feed-rss2-comments.php
feed-rss2.php
feed.php Correct references to post-template.php in the inline docs. 2014-08-12 01:09:17 +00:00
formatting.php Fix whitespace issues in [29781]. Remove a redundant comment. 2014-10-11 02:33:18 +00:00
functions.php Cache get_term_by() calls: 2014-10-16 04:45:17 +00:00
functions.wp-scripts.php Use HTTPS URLs for core.trac.wordpress.org 2014-09-29 13:28:16 +00:00
functions.wp-styles.php Translate some previously untranslated _doing_it_wrong() messages. 2014-10-05 21:06:15 +00:00
general-template.php Use HTTPS URLs for trac.wordpress.org (and use core.trac.wordpress.org) 2014-09-29 13:37:16 +00:00
http.php Use HTTPS URLs for trac.wordpress.org (and use core.trac.wordpress.org) 2014-09-29 13:37:16 +00:00
kses.php kses: Add colgroup. 2014-09-12 05:51:17 +00:00
l10n.php Language packs: Remove translations when deleting a theme or a plugin. 2014-10-08 19:05:20 +00:00
link-template.php Create correct permalinks for child posts of hierarchical post types when default permalinks are used. 2014-09-24 21:30:19 +00:00
load.php Send nocache_headers() on installation screens and when redirecting to them. 2014-08-25 17:40:16 +00:00
locale.php
media-template.php Add size to the UI for Gallery Settings in the media modal. Ensure that the TinyMCE view is refreshed when size changes. 2014-09-29 03:45:16 +00:00
media.php Add a 6th (!) attribute to wp_get_attachment_link() to allow aria-describedby to be added to gallery output. 2014-10-16 04:28:17 +00:00
meta.php Make orderby=meta_value compatible with meta_query when relation=OR. 2014-10-19 18:54:19 +00:00
ms-blogs.php Simplify the code for calling refresh_blog_details() whenever 'blogname', 'siteurl', or 'post_count' option is updated. 2014-09-02 07:30:16 +00:00
ms-default-constants.php
ms-default-filters.php Simplify the code for calling refresh_blog_details() whenever 'blogname', 'siteurl', or 'post_count' option is updated. 2014-09-02 07:30:16 +00:00
ms-deprecated.php
ms-files.php
ms-functions.php In the wp_new_blog_notification() email template, include the login url. 2014-10-02 01:28:16 +00:00
ms-load.php
ms-settings.php
nav-menu-template.php Change the default orderby value in wp_get_nav_menus() to 'name'. 2014-09-29 15:45:16 +00:00
nav-menu.php Clarify inline documentation for the _is_valid_nav_menu_item() and wp_get_nav_menu_items() in wp-includes/nav-menu.php. 2014-10-10 17:14:19 +00:00
option.php Fix the wp-settings-* cookies used in getUserSetting()/setUserSetting(). They should be set without COOKIE_DOMAIN to work properly for sub-domains. Fixes #29095. 2014-08-13 02:47:16 +00:00
pluggable-deprecated.php
pluggable.php Use HTTPS URLs for trac.wordpress.org (and use core.trac.wordpress.org) 2014-09-29 13:37:16 +00:00
plugin.php Use HTTPS URLs for trac.wordpress.org (and use core.trac.wordpress.org) 2014-09-29 13:37:16 +00:00
post-formats.php
post-template.php Add a 6th (!) attribute to wp_get_attachment_link() to allow aria-describedby to be added to gallery output. 2014-10-16 04:28:17 +00:00
post-thumbnail-template.php
post.php In wp_delete_attachment(): account for orphan sizes by looping over the sizes stored in metadata, instead of relying on the current sizes stored in $_wp_additional_image_sizes. 2014-10-02 15:32:16 +00:00
query.php Check that search value is scalar before parsing. 2014-10-16 03:32:20 +00:00
registration-functions.php
registration.php
revision.php
rewrite.php Use HTTPS URLs for core.trac.wordpress.org 2014-09-29 13:28:16 +00:00
rss-functions.php
rss.php Fix some documentation typos in various core files. 2014-08-13 03:56:17 +00:00
script-loader.php Use proper functions for escaped translations. 2014-10-18 20:11:18 +00:00
session.php Add safeguards for when ext/hash is not compiled with PHP. 2014-09-20 17:28:18 +00:00
shortcodes.php The joys of wptexturize(): 2014-09-29 04:07:15 +00:00
taxonomy.php Invalidate cache for child terms when parent term is deleted. 2014-10-17 20:59:20 +00:00
template-loader.php
template.php
theme.php Customizer: Change instances of "Theme Customizer" to just "Customizer", as the Customizer isn't necessarily theme-specific. 2014-10-15 17:21:19 +00:00
update.php
user.php Move password hint text to a function. Add 'password_hint' filter. 2014-10-18 20:21:18 +00:00
vars.php
version.php Live-update site title in toolbar when changing the corresponding field in General Settings. 2014-10-19 09:13:20 +00:00
widgets.php Customizer: Change instances of "Theme Customizer" to just "Customizer", as the Customizer isn't necessarily theme-specific. 2014-10-15 17:21:19 +00:00
wlwmanifest.xml
wp-db.php Translate some previously untranslated _doing_it_wrong() messages. 2014-10-05 21:06:15 +00:00
wp-diff.php Fix some documentation typos in various core files. 2014-08-13 03:56:17 +00:00