[wp-trac] [WordPress Trac] #40364: Improve site creation in multisite
WordPress Trac
noreply at wordpress.org
Fri Jun 22 14:05:08 UTC 2018
#40364: Improve site creation in multisite
-------------------------------------------------+------------------------
Reporter: jeremyfelt | Owner: flixos90
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.0
Component: Networks and Sites | Version:
Severity: normal | Resolution:
Keywords: ms-roadmap has-patch has-unit-tests | Focuses: multisite
-------------------------------------------------+------------------------
Comment (by flixos90):
[attachment:40364.10.diff] does the following:
* Introduce additional unit tests to test the changes comprehensively. In
particular:
* Test normalizing site data works as expected.
* Test validating site data works as expected.
* Ensure that site status hooks are executed as expected, both on
insert and update.
* In `wp_validate_site_data()`, ensure a network ID is passed. For
`wp_insert_site()` and `wp_update_site()` this will never fail, as the
network ID will be auto-populated if not given, but since the function
stands on its own, it should be checked.
* Fix a bug in `wp_validate_site_data()` that prevents the
`domain_exists()` check if one of the required values is missing (that
will already cause a failure anyway).
* Reinstate the `domain_exists()` check into `wpmu_create_blog()`. This
allows us to change the error code for the same issue in
`wp_validate_site_data()` to a more appropriate `site_taken` (currently
`blog_taken`), and also reduces the chance for unexpected issues by
bailing as early as it currently happens in such cases.
I think this is ready to be committed. @jeremyfelt @spacedmonkey If you
could give it a final review, that would be great!
Afterwards, I'll focus on #41333 and #42252, which should also make it
into 5.0.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40364#comment:48>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list