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
..
2016-05-13 18:41:31 +00:00
2016-05-17 01:45:27 +00:00
2016-05-23 18:54:27 +00:00
2016-06-10 21:12:29 +00:00
2016-06-10 04:50:33 +00:00
2016-06-10 04:50:33 +00:00
2016-05-25 16:05:27 +00:00
2016-05-22 18:06:28 +00:00
2016-05-23 18:59:27 +00:00
2016-05-19 00:06:28 +00:00
2016-05-22 18:25:26 +00:00
2016-05-22 18:24:28 +00:00
2016-05-27 17:16:27 +00:00
2016-05-18 22:07:28 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 18:50:28 +00:00
2016-06-01 22:46:28 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 18:50:28 +00:00
2016-06-10 04:50:33 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 18:50:28 +00:00
2016-06-10 04:50:33 +00:00
2016-06-06 03:24:29 +00:00
2016-05-22 18:50:28 +00:00
2016-04-29 15:47:27 +00:00
2016-06-06 15:18:31 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 17:39:28 +00:00
2016-06-02 18:28:27 +00:00
2016-05-22 18:10:29 +00:00
2016-05-23 18:54:27 +00:00
2016-06-10 21:22:28 +00:00
2016-05-22 18:10:29 +00:00
2016-05-22 18:10:29 +00:00
2016-05-22 18:10:29 +00:00
2016-05-23 18:54:27 +00:00
2016-05-22 18:15:28 +00:00
2016-06-02 21:24:30 +00:00
2016-05-22 17:39:28 +00:00
2016-05-22 18:15:28 +00:00
2016-05-22 18:15:28 +00:00
2016-06-10 04:50:33 +00:00
2016-05-22 18:15:28 +00:00
2016-05-22 18:15:28 +00:00
2016-05-13 18:41:31 +00:00
2016-05-22 18:15:28 +00:00
2016-05-30 02:14:30 +00:00
2016-05-30 02:14:30 +00:00
2016-05-22 18:15:28 +00:00
2016-06-12 00:02:30 +00:00
2016-05-23 18:54:27 +00:00
2016-06-08 04:48:27 +00:00
2016-05-25 19:22:27 +00:00
2016-05-23 18:54:27 +00:00
2016-05-22 18:15:28 +00:00
2016-05-13 18:41:31 +00:00
2016-05-20 22:04:27 +00:00
2016-06-08 04:48:27 +00:00
2016-05-02 04:00:28 +00:00
2016-06-11 03:49:27 +00:00
2016-05-23 18:54:27 +00:00
2016-05-22 18:15:28 +00:00
2016-05-13 18:41:31 +00:00
2016-05-13 18:41:31 +00:00
2016-04-30 22:36:28 +00:00
2016-06-06 21:51:28 +00:00
2016-06-10 04:50:33 +00:00
2016-05-23 18:59:27 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 18:50:28 +00:00
2016-06-08 04:01:27 +00:00
2016-06-10 04:50:33 +00:00
2016-06-10 04:50:33 +00:00
2016-05-23 18:59:27 +00:00
2016-05-22 18:50:28 +00:00
2016-06-10 04:50:33 +00:00
2016-05-13 05:11:27 +00:00
2016-06-10 16:52:30 +00:00
2016-05-24 06:15:28 +00:00
2016-06-10 04:50:33 +00:00
2016-05-22 18:50:28 +00:00
2016-05-23 19:01:27 +00:00
2016-06-10 04:50:33 +00:00
2016-06-12 00:34:29 +00:00
2016-05-23 19:01:27 +00:00
2016-06-10 04:50:33 +00:00
2016-06-10 04:50:33 +00:00
2016-05-23 19:01:27 +00:00
2016-05-23 19:01:27 +00:00
2016-05-22 18:48:28 +00:00
2016-06-11 13:31:29 +00:00
2016-06-12 02:43:27 +00:00
2016-06-10 04:50:33 +00:00
2016-04-17 12:01:27 +00:00
2016-05-25 16:05:27 +00:00
2016-05-22 18:50:28 +00:00
2016-06-08 02:48:30 +00:00
2016-06-09 18:10:29 +00:00
2016-06-08 03:03:27 +00:00
2016-06-02 21:46:29 +00:00
2016-05-20 20:57:28 +00:00
2016-06-06 15:18:31 +00:00
2016-05-22 18:50:28 +00:00
2016-05-23 19:02:28 +00:00
2016-06-07 20:49:30 +00:00
2016-06-10 04:50:33 +00:00
2016-06-10 04:50:33 +00:00
2016-05-22 18:29:27 +00:00
2016-06-11 17:08:28 +00:00
2016-06-14 02:00:29 +00:00
2016-05-23 19:02:28 +00:00
2016-05-23 19:02:28 +00:00
2016-05-23 19:02:28 +00:00
2016-06-10 04:50:33 +00:00
2016-05-23 09:00:29 +00:00
2016-05-23 19:02:28 +00:00
2016-05-22 18:50:28 +00:00
2016-06-08 04:08:27 +00:00
2016-05-22 18:50:28 +00:00
2016-05-22 18:50:28 +00:00
2016-06-10 04:50:33 +00:00
2016-05-25 19:36:28 +00:00
2016-05-23 19:02:28 +00:00
2016-05-22 18:50:28 +00:00
2016-06-14 02:00:29 +00:00
2016-05-23 19:02:28 +00:00
2016-06-10 04:50:33 +00:00
2016-05-23 19:02:28 +00:00