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
This commit is contained in:
Drew Jaynes 2014-01-07 04:23:11 +00:00
parent 8319f59336
commit 8eff8141ce
2 changed files with 20 additions and 7 deletions

View File

@ -66,13 +66,7 @@ if ( get_option('db_upgraded') ) {
if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int)( $c / 50 ) ) == 1 ) ) { if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int)( $c / 50 ) ) == 1 ) ) {
require_once( ABSPATH . WPINC . '/http.php' ); require_once( ABSPATH . WPINC . '/http.php' );
$response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) ); $response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) );
/** /** This action is documented in wp-admin/network/upgrade.php */
* 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.
*/
do_action( 'after_mu_upgrade', $response ); do_action( 'after_mu_upgrade', $response );
unset($response); unset($response);
} }

View File

@ -67,7 +67,21 @@ switch ( $action ) {
$response = wp_remote_get( $upgrade_url, array( 'timeout' => 120, 'httpversion' => '1.1' ) ); $response = wp_remote_get( $upgrade_url, array( 'timeout' => 120, 'httpversion' => '1.1' ) );
if ( is_wp_error( $response ) ) 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: <em>%2$s</em>' ), $siteurl, $response->get_error_message() ) ); wp_die( sprintf( __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: <em>%2$s</em>' ), $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 ); 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' ] ); do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] );
} }
echo "</ul>"; echo "</ul>";
@ -92,6 +106,11 @@ switch ( $action ) {
<p><?php _e( 'The database upgrade process may take a little while, so please be patient.' ); ?></p> <p><?php _e( 'The database upgrade process may take a little while, so please be patient.' ); ?></p>
<p><a class="button" href="upgrade.php?action=upgrade"><?php _e( 'Upgrade Network' ); ?></a></p> <p><a class="button" href="upgrade.php?action=upgrade"><?php _e( 'Upgrade Network' ); ?></a></p>
<?php <?php
/**
* Fires before the footer on the network upgrade screen.
*
* @since MU
*/
do_action( 'wpmu_upgrade_page' ); do_action( 'wpmu_upgrade_page' );
break; break;
} }