WordPress/wp-includes
Boone Gorges 486961626c Query: Allow plugins to supply post results instead of having `WP_Query` fetch them from the database.
Returning a non-null value from the new `posts_pre_query` filter will cause
`WP_Query` to skip its database query, so that posts data can be provided from
elsewhere. This is useful in cases where post data may be mirrored in a
separate location, such as an external search application.

Developers should note that the `WP_Query` properties generally used to
calculate pagination - specifically, `found_posts` and `max_num_pages`, which
are determined by default in `set_found_posts()` - must be provided explicitly
when using the `posts_pre_query` filter; since `WP_Query` will not be
contacting the database, it will have no access to `SELECT FOUND_ROWS()`.
The `WP_Query` instance is passed to `posts_pre_query` by reference, so that
these properties can be set manually if needed.

Props jpdavoutian, tlovett1.
Fixes #36687.
Built from https://develop.svn.wordpress.org/trunk@37692


git-svn-id: http://core.svn.wordpress.org/trunk@37658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-14 02:00:29 +00:00
..
ID3
Requests DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
SimplePie
Text
certificates
css System font: The stack does not work with the `font` shorthand property. 2016-05-17 01:45:27 +00:00
customize Docs: Apply inline `@see` tags to hooks referenced in DocBlocks for core classes. 2016-05-23 18:54:27 +00:00
fonts
images
js Media: Fix rendering of incorrect toolbar in the Edit view. 2016-06-10 21:12:29 +00:00
pomo
random_compat
rest-api DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
theme-compat Docs: Standardize DocBlock summaries for hooks that serve to "print" something to use third-person singular verbs. 2016-05-25 16:05:27 +00:00
widgets Docs: Standardize hook docs in wp-includes/widgets/* to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:06:28 +00:00
admin-bar.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 18:59:27 +00:00
atomlib.php External Libraries: After [37402], replace two more instances of `split()` with `explode()` in `wp-includes/atomlib.php`. 2016-05-19 00:06:28 +00:00
author-template.php Docs: Standardize filter docs in wp-includes/author-template.php to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:25:26 +00:00
bookmark-template.php Docs: Standardize filter docs in wp-includes/bookmark-template.php to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:24:28 +00:00
bookmark.php Docs: Improve formatting in the DocBlock for `sanitize_bookmark_field()`. 2016-05-27 17:16:27 +00:00
cache.php Docs: Fix an incorrect Codex link in the file header for wp-includes/cache.php. 2016-05-18 22:07:28 +00:00
canonical.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
capabilities.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
category-template.php Docs: Improve return descriptions for `get_the_category()` and `get_the_term()` to specifically notate that an array of `WP_Term` objects is returned on success. 2016-06-01 22:46:28 +00:00
category.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
class-IXR.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
class-feed.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
class-http.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
class-json.php
class-oembed.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
class-phpass.php
class-phpmailer.php
class-pop3.php
class-requests.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
class-simplepie.php Autoload: Introduce shim for SPL autoloading. 2016-06-06 03:24:29 +00:00
class-smtp.php
class-snoopy.php
class-walker-category-dropdown.php
class-walker-category.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
class-walker-comment.php
class-walker-nav-menu.php Nav Menus: Move the `Walker_Nav_Menu` class to its own file. 2016-06-06 15:18:31 +00:00
class-walker-page-dropdown.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
class-walker-page.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
class-wp-admin-bar.php
class-wp-ajax-response.php Docs: Remove/replace invalid inline `@link` tags in DocBlocks in wp-includes/*. 2016-05-22 17:39:28 +00:00
class-wp-comment-query.php Comments: Improve caching for hierarchical queries. 2016-06-02 18:28:27 +00:00
class-wp-comment.php
class-wp-customize-control.php Docs: Standardize filter docs in the Customizer classes to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:10:29 +00:00
class-wp-customize-manager.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks for core classes. 2016-05-23 18:54:27 +00:00
class-wp-customize-nav-menus.php Accessibility: Customizer, make the menu items "clear search results" a button. 2016-06-10 21:22:28 +00:00
class-wp-customize-panel.php Docs: Standardize filter docs in the Customizer classes to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:10:29 +00:00
class-wp-customize-section.php Docs: Standardize filter docs in the Customizer classes to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:10:29 +00:00
class-wp-customize-setting.php Docs: Standardize filter docs in the Customizer classes to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:10:29 +00:00
class-wp-customize-widgets.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks for core classes. 2016-05-23 18:54:27 +00:00
class-wp-editor.php Docs: Standardize filter docs in core classes in wp-includes/* to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:15:28 +00:00
class-wp-embed.php Auto-embedding: 2016-06-02 21:24:30 +00:00
class-wp-error.php Docs: Remove/replace invalid inline `@link` tags in DocBlocks in wp-includes/*. 2016-05-22 17:39:28 +00:00
class-wp-http-cookie.php Docs: Standardize filter docs in core classes in wp-includes/* to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:15:28 +00:00
class-wp-http-curl.php Docs: Standardize filter docs in core classes in wp-includes/* to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:15:28 +00:00
class-wp-http-encoding.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
class-wp-http-ixr-client.php Docs: Standardize filter docs in core classes in wp-includes/* to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:15:28 +00:00
class-wp-http-proxy.php Docs: Standardize filter docs in core classes in wp-includes/* to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:15:28 +00:00
class-wp-http-requests-response.php
class-wp-http-response.php
class-wp-http-streams.php Docs: Standardize filter docs in core classes in wp-includes/* to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:15:28 +00:00
class-wp-image-editor-gd.php Docs: Ensure hook and duplicate hook docs directly precede all instances of the `image_memory_limit` filter. 2016-05-30 02:14:30 +00:00
class-wp-image-editor-imagick.php Docs: Ensure hook and duplicate hook docs directly precede all instances of the `image_memory_limit` filter. 2016-05-30 02:14:30 +00:00
class-wp-image-editor.php Docs: Standardize filter docs in core classes in wp-includes/* to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:15:28 +00:00
class-wp-meta-query.php Docs: Improve first-order clause documentation for the `$meta_query` parameter in the constructor for `WP_Meta_Query`. 2016-06-12 00:02:30 +00:00
class-wp-metadata-lazyloader.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks for core classes. 2016-05-23 18:54:27 +00:00
class-wp-network.php Multisite: Fix `switch(` spacing after [37657] 2016-06-08 04:48:27 +00:00
class-wp-oembed-controller.php Docs: Add missing `@access` tags to methods in `WP_oEmbed_Controller`. 2016-05-25 19:22:27 +00:00
class-wp-post.php
class-wp-rewrite.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks for core classes. 2016-05-23 18:54:27 +00:00
class-wp-role.php Docs: Standardize filter docs in core classes in wp-includes/* to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:15:28 +00:00
class-wp-roles.php
class-wp-site-query.php Multisite: Introduce `WP_Site_Query` 2016-05-20 22:04:27 +00:00
class-wp-site.php Multisite: Fix `switch(` spacing after [37657] 2016-06-08 04:48:27 +00:00
class-wp-tax-query.php
class-wp-term-query.php Introduce `term_taxonomy_id` parameter for `WP_Term_Query`. 2016-06-11 03:49:27 +00:00
class-wp-term.php
class-wp-theme.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks for core classes. 2016-05-23 18:54:27 +00:00
class-wp-user-query.php Docs: Standardize filter docs in core classes in wp-includes/* to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:15:28 +00:00
class-wp-user.php
class-wp-walker.php
class-wp-widget-factory.php
class-wp-widget.php Widgets: Revert [37425] and [37427]. 2016-06-06 21:51:28 +00:00
class-wp-xmlrpc-server.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
class-wp.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 18:59:27 +00:00
class.wp-dependencies.php
class.wp-scripts.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
class.wp-styles.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
comment-template.php Comments: In `wp_list_comments()`, queries with custom pagination params should obey default `comment_status` logic. 2016-06-08 04:01:27 +00:00
comment.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
compat.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
cron.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 18:59:27 +00:00
date.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
default-constants.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
default-filters.php
default-widgets.php
deprecated.php Media: remove `_wp_upload_dir_baseurl()`. 2016-06-10 16:52:30 +00:00
embed-template.php
embed.php Embeds: Ensure embed widths are integers. 2016-05-24 06:15:28 +00:00
feed-atom-comments.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
feed-atom.php
feed-rdf.php
feed-rss.php
feed-rss2-comments.php
feed-rss2.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
feed.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 19:01:27 +00:00
formatting.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
functions.php Login: Fire `wp_no_robots()` in `wp_die()` only if function exists. 2016-06-12 00:34:29 +00:00
functions.wp-scripts.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 19:01:27 +00:00
functions.wp-styles.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
general-template.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
http.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 19:01:27 +00:00
kses.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 19:01:27 +00:00
l10n.php Docs: Standardize filter docs in wp-includes/l10n.php to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:48:28 +00:00
link-template.php Canonical: Introduce `wp_get_canonical_url()`. 2016-06-11 13:31:29 +00:00
load.php Bootstrap/Load. Adjust filters added in [37626]. 2016-06-12 02:43:27 +00:00
locale.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
media-template.php
media.php Docs: Standardize DocBlock summaries for hooks that serve to "print" something to use third-person singular verbs. 2016-05-25 16:05:27 +00:00
meta.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
ms-blogs.php Multisite: Remove the output parameter from `get_site()` 2016-06-08 02:48:30 +00:00
ms-default-constants.php
ms-default-filters.php
ms-deprecated.php Multisite: Use `to_array()` method on `WP_Site` objects in `wp_get_sites()` 2016-06-09 18:10:29 +00:00
ms-files.php
ms-functions.php Multisite: Deprecate `wp_get_sites()` 2016-06-08 03:03:27 +00:00
ms-load.php Multisite: Replace `$wpdb->blog` queries in `get_site_by_path()` with `get_sites()` 2016-06-02 21:46:29 +00:00
ms-settings.php Multisite: Wrap the main bootstrap process in a function 2016-05-20 20:57:28 +00:00
nav-menu-template.php Nav Menus: Move the `Walker_Nav_Menu` class to its own file. 2016-06-06 15:18:31 +00:00
nav-menu.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
option.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 19:02:28 +00:00
pluggable-deprecated.php
pluggable.php Admin: Allow for the consistent filtering of `auth_redirect_scheme` 2016-06-07 20:49:30 +00:00
plugin.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
post-formats.php
post-template.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
post-thumbnail-template.php Docs: Standardize filter docs in wp-includes/post-thumbnail-template.php to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:29:27 +00:00
post.php Docs: Improve the return description for `wp_get_post_categories()` to include more information about possible return values. 2016-06-11 17:08:28 +00:00
query.php Query: Allow plugins to supply post results instead of having `WP_Query` fetch them from the database. 2016-06-14 02:00:29 +00:00
registration-functions.php
registration.php
rest-api.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 19:02:28 +00:00
revision.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 19:02:28 +00:00
rewrite.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 19:02:28 +00:00
rss-functions.php
rss.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
script-loader.php External Libraries: Update jQuery to 1.12.4. 2016-05-23 09:00:29 +00:00
session.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 19:02:28 +00:00
shortcodes.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
taxonomy.php Add a note about uniqueness to the doc block for `get_term_by()`. 2016-06-08 04:08:27 +00:00
template-loader.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
template.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
theme.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
update.php Upgrade: Allow update checks on `upgrader_process_complete` to be run during Ajax requests. 2016-05-25 19:36:28 +00:00
user.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 19:02:28 +00:00
vars.php Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:50:28 +00:00
version.php Query: Allow plugins to supply post results instead of having `WP_Query` fetch them from the database. 2016-06-14 02:00:29 +00:00
widgets.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 19:02:28 +00:00
wlwmanifest.xml
wp-db.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
wp-diff.php Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files. 2016-05-23 19:02:28 +00:00