WordPress/wp-admin
Felix Arntz 9e2e491f1f Multisite: Complete the new CRUD API for managing sites.
New functions `wp_insert_site( $data )`, `wp_update_site( $id, $data )` and `wp_delete_site( $id )` are introduced to manage site rows in the `wp_blogs` table, forming the new CRUD API together with the existing `get_site()` / `get_sites()`. The new API provides various benefits over the previously existing API, fixing several cache invalidation issues and being hook-driven so that normalization and validation of the passed data can be fully customized.

New hooks introduced as part of this are the actions `wp_insert_site`, `wp_update_site`, `wp_delete_site`, `wp_validate_site_data` and the filter `wp_normalize_site_data`.

At this point, `wp_insert_site()` does not handle setting up the site's database tables, and `wp_delete_site()` does not handle dropping the site's database tables, so the two can not yet be used directly as full replacements of `wpmu_create_blog()` and `wpmu_delete_blog()`. Managing the site's database tables will be added via hooks as part of the follow-up ticket #41333.

The existing functions `wpmu_create_blog()`, `update_blog_details()`, and `wpmu_delete_blog()` make use of the respective new counterpart and will be obsolete once #41333 has been completed.

Props flixos90, jeremyfelt, spacedmonkey.
Fixes #40364.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-01 13:06:26 +00:00
..
css Plugins: Disable "Install Now" button for plugins that require a higher version of PHP or WordPress. 2018-07-09 13:45:25 +00:00
images Customize: Add a RTL version of "browser.png" for the site icon preview. 2016-07-05 11:32:29 +00:00
includes Multisite: Complete the new CRUD API for managing sites. 2018-08-01 13:06:26 +00:00
js Docs: Fix default values for customize/controls.js. 2018-07-05 14:07:24 +00:00
maint Docs: Document more parameters and properties using typed array notation. 2018-03-25 18:10:32 +00:00
network Accessibility: Better color contrast for the tables pagination links. 2018-04-29 16:25:21 +00:00
user Code is Poetry. 2017-11-30 23:11:00 +00:00
about.php I18N: Separate two "About" strings with different context. 2018-07-24 15:04:25 +00:00
admin-ajax.php Privacy: add means to erase personal data by username or email address. First run. 2018-04-18 22:30:22 +00:00
admin-footer.php Code is Poetry. 2017-11-30 23:11:00 +00:00
admin-functions.php Code is Poetry. 2017-11-30 23:11:00 +00:00
admin-header.php Administration: Avoid an extra space in the admin body class. 2018-04-13 14:03:20 +00:00
admin-post.php Code is Poetry. 2017-11-30 23:11:00 +00:00
admin.php Hooks: Standardize naming of dynamic hooks using values derived from superglobals to use interpolation vs concatenation. 2017-12-01 11:36:50 +00:00
async-upload.php Accessibility: Change the media upload "Dismiss error" link to a button. 2018-03-05 15:33:33 +00:00
comment.php Code is Poetry. 2017-11-30 23:11:00 +00:00
credits.php Help/About: Move "Get involved" link on Credits screen to the top of the page for better visibility. 2018-04-30 03:16:22 +00:00
custom-background.php Code is Poetry. 2017-11-30 23:11:00 +00:00
custom-header.php General: Further improve error messages following [42648]. 2018-02-19 02:13:32 +00:00
customize.php General: Further improve error messages following [42648]. 2018-02-19 02:13:32 +00:00
edit-comments.php I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders. 2018-03-11 16:44:34 +00:00
edit-form-advanced.php Docs: Document many more parameters and properties using typed array notation. 2018-03-22 20:27:32 +00:00
edit-form-comment.php Comments: Escape permalink values on edit screen to prevent XSS. 2018-05-16 22:39:21 +00:00
edit-link-form.php Code is Poetry. 2017-11-30 23:11:00 +00:00
edit-tag-form.php Docs: Use WP_Term instead of generic object type for the $tag parameter in wp-admin/edit-tag-form.php hook docs. 2018-03-10 02:01:29 +00:00
edit-tags.php General: Further improve error messages following [42648]. 2018-02-19 02:13:32 +00:00
edit.php Docs: Document many more parameters and properties using typed array notation. 2018-03-22 20:27:32 +00:00
export.php Code is Poetry. 2017-11-30 23:11:00 +00:00
freedoms.php Add Privacy Tools admin page under the Tools menu. 2018-03-09 15:04:33 +00:00
import.php Code is Poetry. 2017-11-30 23:11:00 +00:00
index.php Help/About: Adjust capability checks formatting in help text on Dashboard screen for readability and consistency with similar checks in other files. 2018-03-05 03:32:30 +00:00
install-helper.php Code is Poetry. 2017-11-30 23:11:00 +00:00
install.php Code is Poetry. 2017-11-30 23:11:00 +00:00
link-add.php Code is Poetry. 2017-11-30 23:11:00 +00:00
link-manager.php Code is Poetry. 2017-11-30 23:11:00 +00:00
link-parse-opml.php Code is Poetry. 2017-11-30 23:11:00 +00:00
link.php Code is Poetry. 2017-11-30 23:11:00 +00:00
load-scripts.php Code is Poetry. 2017-11-30 23:11:00 +00:00
load-styles.php Code is Poetry. 2017-11-30 23:11:00 +00:00
media-new.php Code is Poetry. 2017-11-30 23:11:00 +00:00
media-upload.php General: Further improve error messages following [42648]. 2018-02-19 02:13:32 +00:00
media.php Code is Poetry. 2017-11-30 23:11:00 +00:00
menu-header.php Code is Poetry. 2017-11-30 23:11:00 +00:00
menu.php Privacy: Replace intrusive policy update notice with menu bubbles. 2018-05-10 19:52:21 +00:00
moderation.php Code is Poetry. 2017-11-30 23:11:00 +00:00
ms-admin.php
ms-delete-site.php Code is Poetry. 2017-11-30 23:11:00 +00:00
ms-edit.php
ms-options.php Code is Poetry. 2017-11-30 23:11:00 +00:00
ms-sites.php Code is Poetry. 2017-11-30 23:11:00 +00:00
ms-themes.php Code is Poetry. 2017-11-30 23:11:00 +00:00
ms-upgrade-network.php Code is Poetry. 2017-11-30 23:11:00 +00:00
ms-users.php Code is Poetry. 2017-11-30 23:11:00 +00:00
my-sites.php Code is Poetry. 2017-11-30 23:11:00 +00:00
nav-menus.php Accessibility: Menus screen: Improve headings and instructions for better accessibility. 2018-03-20 17:48:21 +00:00
network.php Code is Poetry. 2017-11-30 23:11:00 +00:00
options-discussion.php Privacy: Revert [43525]. 2018-07-24 17:06:24 +00:00
options-general.php Docs: Document more parameters and properties using typed array notation. 2018-03-25 18:10:32 +00:00
options-head.php Code is Poetry. 2017-11-30 23:11:00 +00:00
options-media.php Media: On Media Settings screen, make the pairs of labels and inputs always stacked vertically, on both mobile and desktop screens. 2018-03-20 22:44:31 +00:00
options-permalink.php Docs: Document more parameters and properties using typed array notation. 2018-03-25 18:10:32 +00:00
options-reading.php Code is Poetry. 2017-11-30 23:11:00 +00:00
options-writing.php Code is Poetry. 2017-11-30 23:11:00 +00:00
options.php Privacy: Revert [43525]. 2018-07-24 17:06:24 +00:00
plugin-editor.php Administration: Remove unnecessary capitalization when referencing to plugin/theme editors. 2018-02-26 19:35:30 +00:00
plugin-install.php Code is Poetry. 2017-11-30 23:11:00 +00:00
plugins.php Docs: Document more parameters and properties using typed array notation. 2018-03-25 18:10:32 +00:00
post-new.php Move scheduling of old auto-draft posts deletion to get_default_post_to_edit() (where auto-drafts are created). 2018-06-28 02:26:22 +00:00
post.php Code is Poetry. 2017-11-30 23:11:00 +00:00
press-this.php General: Further improve error messages following [42648]. 2018-02-19 02:13:32 +00:00
privacy.php Privacy: Improve grammar on Privacy Settings screen. 2018-07-19 20:14:25 +00:00
profile.php Code is Poetry. 2017-11-30 23:11:00 +00:00
revision.php I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders. 2018-03-11 16:44:34 +00:00
setup-config.php Upgrade/Install: Correctly internationalise error messages during config setup. 2018-05-09 22:52:21 +00:00
term.php General: Further improve error messages following [42648]. 2018-02-19 02:13:32 +00:00
theme-editor.php Administration: Remove unnecessary capitalization when referencing to plugin/theme editors. 2018-02-26 19:35:30 +00:00
theme-install.php Accessibility: Improve the Themes Installer navigation buttons accessibility. 2018-04-29 17:04:22 +00:00
themes.php General: Further improve error messages following [42648]. 2018-02-19 02:13:32 +00:00
tools.php Privacy: fixes for the privacy policy guide and suggested content: 2018-05-09 20:51:23 +00:00
update-core.php I18N: Use consistent pattern for placeholder references in a translator comment in wp-admin/update-core.php. 2018-05-02 01:55:21 +00:00
update.php Plugins: Use api.wordpress.org/plugins/info/1.2/ for querying plugins & plugin information. 2018-02-01 05:17:33 +00:00
upgrade-functions.php Code is Poetry. 2017-11-30 23:11:00 +00:00
upgrade.php Code is Poetry. 2017-11-30 23:11:00 +00:00
upload.php Code is Poetry. 2017-11-30 23:11:00 +00:00
user-edit.php Users: Don't show roles dropdown on user-edit.php if current user cannot promote user. 2018-03-19 20:56:32 +00:00
user-new.php General: Introduce WP_Error::has_errors() method and use it where appropriate. 2018-02-27 02:31:31 +00:00
users.php Docs: Document more parameters and properties using typed array notation. 2018-03-25 18:10:32 +00:00
widgets.php Accessibility: Make the Widgets screen "Enable accessibility mode" link more discoverable. 2018-03-06 17:21:33 +00:00