Multisite Focused Changes in 4.3

Howdy! We’ve made quite a bit of progress in multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site as part of the 4.3 cycle and have a bunch slated to continue working on throughout the year. If you’d like to follow along, stop by our weekly office hours on Tuesdays at 20:00 UTC in #core-multisite.

Here’s what we have coming in 4.3…

Begin streamlining the interface for setting a site’s URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org.

Editing a site’s address for what it is—a combination of domain and path—becomes more straightforward in 4.3. A full address with or without scheme can now be entered if multisite is configured as subdomain. Networknetwork (versus site, blog) administrators have been hacking at this anyway for years when the two fields were separate to provide arbitrary domain support. See #22383 for all the details.

In combination with this, the checkbox for “Update siteurl and home as well” has been removed when editing a site. Instead we can make an educated decision based on the current state. If the home and/or siteurl domain and path match the existing domain and path of the site, we assume that we can update all values with the new information. See #32503 for details.

And to better enforce URLs vs domain and path, we’ve improved the default columns displayed in MS Sites List Table. The full URL is now show instead of the domain or the path. We also now show a total user count for each site rather than the first 5 users. See #32434 for details.

Introduce get_main_network_id()

This likely isn’t too useful to many, though will come in handy for those working with custom multi-network configurations. It will always return 1 on single site or if the current network has an ID of 1. It will return PRIMARY_NETWORK_ID if defined. And if those conditions aren’t met, it will go to the database to determine which ID is the first in line.

It is possible to filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. this value with the new get_main_network_id filter for those who have multiple networks and would like to avoid the incremental assumptions. See #30294 for the details.

Visual and interface enhancements:

  • Better responsive styling for my-sites.php, a screen that would love to have a complete overhaul one day but now looks much better on smaller devices. #31685
  • Also in my-sites.php, the Save Changes button is conditionally displayed only if the user is a member of more than one site OR if a pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party or theme has filtered the HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. on this screen and may be expecting a Save Changes button to exist. #32645
  • Achieve parity between single and multisite by removing the Upgrades subsection in the menu and moving Updates to Dashboard. #32431
  • Provide a link to the dashboard when editing a site in the network adminadmin (and super admin). Previously, only the URL would show in the title area of the site screens with no great way to access the dashboard. Now, the full site name is shown as the title and smaller text URLs are displayed underneath for Visit and Dashboard. #32525
  • Mobile display of the network admin has been improved in general. A few inputs have been adjusted on mobile to make them act as expected. #32643, #32644, #32646. A full sweep of “content overruns” was done to ensure admin screens don’t overflow the screen on small mobile devices. #32846, #32962.

Bugs of note fixed:

  • Don’t allow usernames over 60 characters long, a limit that was already in place via the database schema but was not enforced explicitly in code. #26784
  • Calculate the storage space used correctly for the main site. Previously, it was possible that the main site would reach it’s calculated space limit because the storage of all other sites was included in the total. #30202
  • get_blogs_of_user() now returns proper values for the archived, spam, and deleted properties. These were previously forced to 0 only when using this function. #32281
  • Deleting a super admin user via wpmu_delete_user() is no longer possible. This matches the expectation previously set by the UIUI User interface. #32935

And because some are smaller and were left out of the above, here’s a full list of multisite focused changes made in 4.3.

#4-3, #dev-notes, #multisite