Make WordPress Core

Opened 7 years ago

Closed 5 years ago

#40647 closed enhancement (fixed)

Introduce `ms-site.php` and `ms-network.php` files

Reported by: flixos90's profile flixos90 Owned by: flixos90's profile flixos90
Milestone: 5.1 Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: has-patch ms-roadmap
Focuses: multisite Cc:

Description

Let's introduce ms-site.php and ms-network.php files that should contain the core API functions for the site and network APIs respectively. All of them are currently dropped in ms-blogs.php, and as we're starting to introduce more functions for those APIs, the file gets more cluttered.

This ticket is a subticket for #40623.

Attachments (3)

40647.diff (23.8 KB) - added by flixos90 7 years ago.
40647.2.diff (50.0 KB) - added by flixos90 5 years ago.
40647.3.diff (95.8 KB) - added by flixos90 5 years ago.

Download all attachments as: .zip

Change History (14)

@flixos90
7 years ago

#1 @flixos90
7 years ago

  • Keywords has-patch added

This is exactly the same patch that I previously uploaded on #40623. It introduces the ms-site.php and ms-network.php files and moves the basic functions for their APIs in there. Let's continue work on it here.

We discussed that briefly during office-hours yesterday, but as a reminder the question: Do we really need to load those two files from ms-blogs.php or can we load them from wp-settings.php? The latter would certainly be nicer, but not sure about BC with someone loading ms-blogs.php manually.

This ticket was mentioned in Slack in #core by flixos90. View the logs.


7 years ago

This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.


7 years ago

#4 @flixos90
7 years ago

  • Milestone changed from Awaiting Review to Future Release

Let's do this in the same release we get the new sites C(R)UD API in (see #40364).

We need to find a good point to break as few patches as possible.

#5 @flixos90
7 years ago

  • Keywords ms-roadmap added

These tickets belong to our planned roadmap (a few of them not per final decision), so flagging with a keyword for better overview.

This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.


7 years ago

This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.


7 years ago

#8 @flixos90
5 years ago

  • Keywords changed from has-patch, ms-roadmap to has-patch ms-roadmap
  • Milestone changed from Future Release to 5.1

#9 @flixos90
5 years ago

  • Owner set to flixos90
  • Status changed from new to assigned

@flixos90
5 years ago

@flixos90
5 years ago

#10 @flixos90
5 years ago

40647.3.diff applies against latest trunk and accounts for new functions introduced.

#11 @flixos90
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 44472:

Multisite: Introduce ms-site.php and ms-network.php files.

By providing distinct files for the site and network APIs, a better overview is provided. Prior to this change, the ms-blogs.php file had grown too big, mixing site APIs, network APIs and related legacy APIs that need to be maintained. Since multisite is often used in unexpected ways, backward-compatibility is ensured by including the two new files from ms-blogs.php, which previously contained all functions that have been moved to the new files.

This changeset does not contain any functional changes.

Fixes #40647.

Note: See TracTickets for help on using tickets.