Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#37235 closed enhancement (fixed)

Introduce a new action `ms_loaded`

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

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 10 years ago.

Download all attachments as: .zip

Change History (4)

@flixos90
10 years ago

#1 @flixos90
10 years ago

  • Keywords has-patch commit added; needs-patch removed
  • Owner set to jeremyfelt
  • Status new → 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
10 years ago

  • Resolution → fixed
  • Status reviewing → 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.


10 years ago

Note: See TracTickets for help on using tickets.