[wp-trac] [WordPress Trac] #40364: Improve site creation in multisite

WordPress Trac noreply at wordpress.org
Tue Jul 11 09:50:57 UTC 2017


#40364: Improve site creation in multisite
------------------------------------------+-----------------------------
 Reporter:  jeremyfelt                    |       Owner:  flixos90
     Type:  enhancement                   |      Status:  assigned
 Priority:  normal                        |   Milestone:  Future Release
Component:  Networks and Sites            |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  needs-unit-tests needs-patch  |     Focuses:  multisite
------------------------------------------+-----------------------------
Changes (by flixos90):

 * keywords:  dev-feedback needs-unit-tests has-patch needs-testing =>
     needs-unit-tests needs-patch
 * owner:   => flixos90
 * status:  new => assigned
 * milestone:  Awaiting Review => Future Release


Comment:

 Relevant summary from last week's multisite meeting:

 * The patch needs to be changed to use the bad old `$args` pattern for
 now. A new pattern like passing around `WP_Site` objects should be
 discussed in a broader scope, affecting all similar core functions. It's
 not suitable here as it would just introduce a new pattern others might
 disagree with and thus cause inconsistency. I'll update the patch soon.
 * `wp_insert_site()`, `wp_update_site()` and `wp_delete_site()` deal with
 the `wp_blogs` table row only (a site in the network context). This ticket
 is only about implementing these three functions.
 * We'll also implement `wp_install_site()` and `wp_uninstall_site()`. The
 first will be responsible for setting up a site's DB tables, populating
 default options, initial content etc. The latter will be its counterpart,
 responsible for dropping everything from a site. This will be part of a
 separate ticket.
 * The last step will be to implement `wp_create_site()` (wraps
 `wp_insert_site()` and `wp_install_site()`) and `wp_remove_site()` (wraps
 `wp_uninstall_site()` and `wp_delete_site()`). The name for the latter
 could probably be more clear, so let's think about a more suitable name.
 Having those two functions available makes it easy for developers, as they
 then only need to call one function instead of two when creating/removing
 a site.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40364#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list