[wp-trac] [WordPress Trac] #40364: Improve site creation in multisite
WordPress Trac
noreply at wordpress.org
Wed Dec 6 19:10:42 UTC 2017
#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 jeremyfelt):
I reviewed this and then chatted with @flixos90 at WCUS contributor day. A
few notes from that discussion:
* If we provide compatibility for the `network_id` parameter, then we
should use that in the documentation instead of `site_id` to encourage its
use.
* We should be able to remove the `$compat_keys` loop as there should only
really be one compat key.
* `wp_update_blog_public_option_on_site_update()` makes sense as a hooked
function because it's data that is managed outside of the core site data
in the DB.
* The patch changes some behavior of the site status hooks, which is an
okay (small back-compat breaking) change. The previous behavior was
inconsistent in two places. This results in the change to test assertions.
* We should use `domain_exists()` in `wp_insert_site()`
* We should use `domain_exists()` in `wp_update_site()` whenever one of
domain/path/network_id changes.
* Add validations for domain and path. This gives us an opportunity to
consolidate the existing workflows used in `site-new.php`, `wp-
signup.php`, and `wpmu_activate_signup()`. These all validate a site
before adding it in their slightly different, but mostly the same way.
Related: #41443
We'll really want to dig into the existing new site flows to be sure that
validation is happening as expected.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40364#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list