Adam Silverstein
cd67264bb2
Multisite: add new sites_pre_query
and networks_pre_query
filters to short circuit WP_Site_Query and WP_Network_Query queries.
...
Similar to the `posts_pre_query` filter for WP_Query added in #36687 . These filters lets you short circuit the queries to return your own results.
Add a new filter `sites_pre_query` - which returns null by default. Return a non-null value to bypass WordPress's default `get_sites` queries.
Developers should note that filtering functions that require pagination information are encouraged to set the `found_sites` property of the `WP_Site_Query` object, passed to the filter by reference. If `WP_Site_Query` does not perform a database query, it will not have enough information to generate these values itself.
Add a new filter `networks_pre_query` - which returns null by default. Return a non-null value to bypass WordPress's default `get_networks` queries.
Developers should note that filtering functions that require pagination information are encouraged to set the `found_networks` property of the `WP_Network_Query` object, passed to the filter by reference. If `WP_Network_Query` does not perform a database query, it will not have enough information to generate these values itself.
Props spacedmonkey.
Fixes #45749 .
Built from https://develop.svn.wordpress.org/trunk@44983
git-svn-id: http://core.svn.wordpress.org/trunk@44814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 17:26:51 +00:00
..
2019-03-21 15:32:01 +00:00
2019-03-21 12:48:00 +00:00
2019-03-05 17:49:52 +00:00
2019-03-20 15:44:00 +00:00
2017-07-31 19:50:45 +00:00
2018-12-19 03:36:27 +00:00
2018-02-06 02:56:32 +00:00
2019-03-21 21:05:52 +00:00
2019-01-16 05:36:48 +00:00
2017-11-08 11:48:49 +00:00
2019-03-21 18:59:52 +00:00
2019-03-21 04:56:52 +00:00
2017-10-26 12:52:53 +00:00
2018-08-17 01:51:36 +00:00
2019-03-14 19:31:49 +00:00
2019-03-21 21:53:51 +00:00
2019-01-16 05:54:49 +00:00
2019-01-14 01:47:51 +00:00
2019-01-16 05:29:49 +00:00
2019-01-10 21:06:49 +00:00
2019-03-13 19:32:53 +00:00
2018-08-17 01:51:36 +00:00
2019-03-21 22:23:52 +00:00
2019-01-12 04:53:51 +00:00
2018-08-17 01:51:36 +00:00
2017-11-30 23:11:00 +00:00
2019-01-04 21:58:51 +00:00
2019-03-13 19:32:53 +00:00
2019-01-10 22:42:51 +00:00
2019-03-13 19:32:53 +00:00
2017-11-30 23:11:00 +00:00
2019-03-21 10:37:57 +00:00
2019-01-21 22:46:49 +00:00
2018-03-25 19:35:29 +00:00
2018-12-20 20:04:50 +00:00
2019-03-21 10:45:51 +00:00
2019-03-21 21:53:51 +00:00
2017-11-30 23:11:00 +00:00
2019-02-07 09:02:49 +00:00
2018-12-13 09:44:23 +00:00
2018-12-17 18:00:52 +00:00
2019-01-12 06:06:48 +00:00
2018-02-25 20:22:30 +00:00
2018-02-25 20:32:30 +00:00
2019-03-21 22:02:51 +00:00
2018-12-19 07:23:47 +00:00
2018-02-25 20:32:30 +00:00
2018-02-25 20:32:30 +00:00
2018-02-27 02:31:31 +00:00
2019-03-09 12:56:54 +00:00
2019-01-15 22:48:51 +00:00
2019-01-05 03:48:50 +00:00
2018-08-17 01:51:36 +00:00
2019-01-09 22:42:51 +00:00
2019-03-21 21:53:51 +00:00
2017-11-30 23:11:00 +00:00
2017-11-30 23:11:00 +00:00
2018-02-25 20:22:30 +00:00
2017-11-30 23:11:00 +00:00
2018-08-17 01:51:36 +00:00
2018-02-25 20:22:30 +00:00
2018-03-25 19:33:31 +00:00
2017-11-30 23:11:00 +00:00
2017-11-30 23:11:00 +00:00
2017-11-30 23:11:00 +00:00
2017-10-03 15:18:46 +00:00
2019-01-04 21:58:51 +00:00
2019-01-10 22:10:50 +00:00
2018-02-25 20:22:30 +00:00
2018-02-25 20:22:30 +00:00
2018-01-18 05:18:31 +00:00
2018-12-14 01:32:39 +00:00
2019-01-11 06:40:50 +00:00
2018-02-25 20:22:30 +00:00
2019-01-09 14:55:49 +00:00
2018-03-25 19:35:29 +00:00
2019-03-22 17:26:51 +00:00
2018-03-25 19:33:31 +00:00
2018-12-14 03:20:37 +00:00
2019-03-21 21:53:51 +00:00
2017-07-27 00:41:44 +00:00
2019-03-15 21:55:50 +00:00
2019-03-21 19:48:50 +00:00
2019-03-21 21:53:51 +00:00
2019-03-21 21:53:51 +00:00
2019-03-21 21:53:51 +00:00
2019-03-21 21:53:51 +00:00
2019-03-21 21:53:51 +00:00
2018-08-17 01:51:36 +00:00
2018-03-25 19:33:31 +00:00
2018-03-22 18:56:33 +00:00
2018-09-14 13:45:26 +00:00
2017-11-30 23:11:00 +00:00
2017-11-30 23:11:00 +00:00
2019-03-22 17:26:51 +00:00
2018-02-25 20:22:30 +00:00
2018-08-17 01:51:36 +00:00
2019-01-09 15:11:48 +00:00
2018-08-17 01:51:36 +00:00
2018-02-25 20:22:30 +00:00
2017-11-30 23:11:00 +00:00
2019-01-11 06:40:50 +00:00
2019-03-21 21:53:51 +00:00
2019-01-09 05:04:50 +00:00
2019-01-07 07:56:50 +00:00
2018-09-23 15:33:24 +00:00
2017-11-30 23:11:00 +00:00
2017-11-30 23:11:00 +00:00
2018-08-17 01:51:36 +00:00
2019-01-11 06:40:50 +00:00
2018-12-13 01:26:24 +00:00
2018-09-28 21:51:24 +00:00
2019-01-06 16:23:49 +00:00
2018-08-11 17:42:24 +00:00
2019-03-13 19:32:53 +00:00
2019-03-21 21:36:51 +00:00
2019-03-21 04:56:52 +00:00
2019-03-16 06:42:50 +00:00
2018-03-25 19:35:29 +00:00
2019-03-21 21:53:51 +00:00
2019-03-21 21:53:51 +00:00
2017-09-25 06:28:45 +00:00
2019-03-01 20:58:52 +00:00
2019-03-20 17:22:51 +00:00
2019-03-21 21:53:51 +00:00
2019-03-20 20:39:00 +00:00
2019-03-20 20:39:00 +00:00
2019-03-20 20:39:00 +00:00
2019-03-20 20:39:00 +00:00
2019-03-20 20:39:00 +00:00
2019-03-20 20:39:00 +00:00
2019-03-20 20:39:00 +00:00
2019-03-20 15:49:49 +00:00
2019-03-22 13:00:52 +00:00
2019-01-04 21:12:50 +00:00
2018-12-20 02:42:48 +00:00
2019-03-21 09:20:59 +00:00
2018-04-03 15:00:31 +00:00
2019-01-10 01:43:49 +00:00
2019-03-11 20:32:52 +00:00
2019-03-07 09:12:51 +00:00
2019-03-21 21:53:51 +00:00
2019-03-15 10:43:51 +00:00
2019-03-21 21:05:52 +00:00
2018-12-12 03:02:24 +00:00
2019-03-18 15:56:51 +00:00
2017-11-30 23:11:00 +00:00
2019-01-08 08:48:48 +00:00
2019-01-08 08:58:49 +00:00
2017-11-30 23:11:00 +00:00
2019-03-18 15:56:51 +00:00
2019-03-18 15:56:51 +00:00
2019-01-08 09:15:49 +00:00
2017-11-30 23:11:00 +00:00
2019-03-18 15:49:00 +00:00
2019-03-21 19:48:50 +00:00
2018-12-14 05:16:52 +00:00
2019-01-21 04:27:51 +00:00
2019-03-11 10:57:55 +00:00
2017-11-30 23:11:00 +00:00
2018-08-30 09:01:25 +00:00
2019-03-21 19:48:50 +00:00
2019-01-10 15:28:50 +00:00
2019-03-01 20:58:52 +00:00
2019-03-21 19:48:50 +00:00
2017-11-30 23:11:00 +00:00
2017-11-30 23:11:00 +00:00
2019-03-19 03:22:51 +00:00
2019-01-16 03:54:50 +00:00
2017-11-30 23:11:00 +00:00
2017-11-30 23:11:00 +00:00
2019-03-21 12:48:00 +00:00
2017-11-30 23:11:00 +00:00
2018-08-02 15:13:27 +00:00
2017-07-28 01:15:52 +00:00
2019-03-13 19:32:53 +00:00
2019-03-21 19:48:50 +00:00
2019-03-21 19:48:50 +00:00
2019-03-13 19:32:53 +00:00
2019-01-16 03:38:49 +00:00
2019-03-19 02:37:52 +00:00
2017-11-30 23:11:00 +00:00
2019-03-22 17:26:51 +00:00
2019-01-14 23:01:49 +00:00
2019-03-15 11:18:50 +00:00
2017-11-30 23:11:00 +00:00