diff --git a/wp-admin/admin.php b/wp-admin/admin.php index 8597932701..a617d113f7 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -66,13 +66,7 @@ if ( get_option('db_upgraded') ) { if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int)( $c / 50 ) ) == 1 ) ) { require_once( ABSPATH . WPINC . '/http.php' ); $response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) ); - /** - * Fires after the multisite DB upgrade is complete. - * - * @since 3.0.0 - * - * @param array|WP_Error $response The upgrade response array or WP_Error on failure. - */ + /** This action is documented in wp-admin/network/upgrade.php */ do_action( 'after_mu_upgrade', $response ); unset($response); } diff --git a/wp-admin/network/upgrade.php b/wp-admin/network/upgrade.php index 8fdcf37e9f..6788ab5473 100644 --- a/wp-admin/network/upgrade.php +++ b/wp-admin/network/upgrade.php @@ -67,7 +67,21 @@ switch ( $action ) { $response = wp_remote_get( $upgrade_url, array( 'timeout' => 120, 'httpversion' => '1.1' ) ); if ( is_wp_error( $response ) ) wp_die( sprintf( __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s' ), $siteurl, $response->get_error_message() ) ); + /** + * Fires after the Multisite DB upgrade for each site is complete. + * + * @since MU + * + * @param array|WP_Error $response The upgrade response array or WP_Error on failure. + */ do_action( 'after_mu_upgrade', $response ); + /** + * Fires after each site has been upgraded. + * + * @since MU + * + * @param int $blog_id The id of the blog. + */ do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] ); } echo ""; @@ -92,6 +106,11 @@ switch ( $action ) {