WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#37235 closed enhancement (fixed)

Introduce a new action `ms_loaded`

Reported by: flixos90 Owned by: jeremyfelt
Milestone: 4.6 Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: has-patch commit
Focuses: multisite Cc:

Description

There are several areas in Multisite which are available to be used in sunrise.php, but will lack specific functionality when used there.

Therefore, as per the discussion in #36935 (this discussion includes an example), we would like to introduce a new action ms_loaded that is run after the Multisite bootstrapping process has been completed. This action can then be used to conditionally detect whether specific functionality should be made available yet or not.

This action being introduced is necessary for the current state of the above ticket to go in as well, but it will certainly help for other use-cases as well in the future.

Attachments (1)

37235.diff (432 bytes) - added by flixos90 3 years ago.

Download all attachments as: .zip

Change History (4)

@flixos90
3 years ago

#1 @flixos90
3 years ago

  • Keywords has-patch commit added; needs-patch removed
  • Owner set to jeremyfelt
  • Status changed from new to reviewing

37235.diff introduces the action. Flagging this for commit, as this ticket has mostly been opened for reference (see #36935) to add the action.

#2 @jeremyfelt
3 years ago

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

In 37916:

Multisite: Fire the ms_loaded action after multisite's bootstrap has finished.

This allows code in sunrise.php and in core to know when multisite bootstrap is complete and when the $current_site and $current_blog globals are populated.

Fixes #37235.
Props flixos90.

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


3 years ago

Note: See TracTickets for help on using tickets.