From 8eff8141ce6630117b69fa6fbcb08ae8a9c0feea Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Tue, 7 Jan 2014 04:23:11 +0000 Subject: [PATCH] Inline documentation for hooks in wp-admin/network/upgrade.php. Props miyauchi for the initial patch. Fixes #25881. Built from https://develop.svn.wordpress.org/trunk@26914 git-svn-id: http://core.svn.wordpress.org/trunk@26795 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin.php | 8 +------- wp-admin/network/upgrade.php | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) 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 ) {