Commit Graph

5 Commits

Author SHA1 Message Date
Felix Arntz 13aa7e4f47 Multisite: Ensure site meta caches are not primed unless the `wp_blogmeta` table is available.
Prior to this change, querying sites early in the bootstrap process could potentially cause a fatal error, since at that stage the filter to bail on updating site meta cache if the respective database table has not been installed yet is not hooked in yet. This changeset forces the filter to be added if that is not already the case.

Merges [44925] to the 5.1 branch.

Props spacedmonkey.
Fixes #46167.

Built from https://develop.svn.wordpress.org/branches/5.1@44927


git-svn-id: http://core.svn.wordpress.org/branches/5.1@44758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-18 16:20:52 +00:00
Jeremy Felt d940e36d63 Multisite: Ensure `wpmu_new_blog` hook receives expected data in `$meta`.
Restores `public`, `archived`, `mature`, `spam`, `deleted`, `lang_id`, and `WPLANG` to the `$meta` data passed to `wpmu_new_blog`. This hook was deprecated in 5.1.0, but code using it still relies on this data.

Props davidbinda, pbiron.
Merges [44805] and [44806] to the 5.1 branch.
Fixes #46351.

Built from https://develop.svn.wordpress.org/branches/5.1@44807


git-svn-id: http://core.svn.wordpress.org/branches/5.1@44639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 04:37:50 +00:00
Sergey Biryukov 6d331e9743 Networks and Sites: Check the result of `get_site()` in `wp_insert_site()`.
Props davidbinda, vanyukov, lukecarbis.
Merges [44799] to the 5.1 branch.
Fixes #46300.
Built from https://develop.svn.wordpress.org/branches/5.1@44800


git-svn-id: http://core.svn.wordpress.org/branches/5.1@44632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-05 20:37:50 +00:00
Gary Pendergast c2c021baf1 Multisite: After creating a new blog, ensure the blog cache is correctly cleaned up.
Props david.binda, spacedmonkey.
Fixes #46125.


Built from https://develop.svn.wordpress.org/trunk@44727


git-svn-id: http://core.svn.wordpress.org/trunk@44558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-07 06:04:51 +00:00
Felix Arntz ea9286844f Multisite: Introduce `ms-site.php` and `ms-network.php` files.
By providing distinct files for the site and network APIs, a better overview is provided. Prior to this change, the `ms-blogs.php` file had grown too big, mixing site APIs, network APIs and related legacy APIs that need to be maintained. Since multisite is often used in unexpected ways, backward-compatibility is ensured by including the two new files from `ms-blogs.php`, which previously contained all functions that have been moved to the new files.

This changeset does not contain any functional changes.

Fixes #40647.

Built from https://develop.svn.wordpress.org/trunk@44472


git-svn-id: http://core.svn.wordpress.org/trunk@44303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 09:15:49 +00:00