[wp-trac] [WordPress Trac] #40364: Improve site creation in multisite
WordPress Trac
noreply at wordpress.org
Wed Aug 1 13:05:47 UTC 2018
#40364: Improve site creation in multisite
-------------------------------------------------+-------------------------
Reporter: jeremyfelt | Owner: flixos90
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.0
Component: Networks and Sites | Version:
Severity: normal | Resolution: fixed
Keywords: ms-roadmap has-patch has-unit-tests | Focuses: multisite
needs-dev-note |
-------------------------------------------------+-------------------------
Changes (by flixos90):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"43548" 43548]:
{{{
#!CommitTicketReference repository="" revision="43548"
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.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40364#comment:62>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list