From ba8d3fca8f94e30efe02f49aef516e596d5291c8 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Wed, 29 Jun 2016 19:00:28 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@37916 git-svn-id: http://core.svn.wordpress.org/trunk@37857 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-settings.php | 8 ++++++++ wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/wp-includes/ms-settings.php b/wp-includes/ms-settings.php index ab507ba017..1afa77adc4 100644 --- a/wp-includes/ms-settings.php +++ b/wp-includes/ms-settings.php @@ -104,3 +104,11 @@ if ( ! $current_blog instanceof WP_Site ) { // Define upload directory constants ms_upload_constants(); + +/** + * Fires after the current site and network have been detected and loaded + * in multisite's bootstrap. + * + * @since 4.6.0 + */ +do_action( 'ms_loaded' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 4aee09819f..68d51d2f95 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37915'; +$wp_version = '4.6-alpha-37916'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.