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:
parent
8319f59336
commit
8eff8141ce
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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: <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 );
|
||||
/**
|
||||
* 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 "</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><a class="button" href="upgrade.php?action=upgrade"><?php _e( 'Upgrade Network' ); ?></a></p>
|
||||
<?php
|
||||
/**
|
||||
* Fires before the footer on the network upgrade screen.
|
||||
*
|
||||
* @since MU
|
||||
*/
|
||||
do_action( 'wpmu_upgrade_page' );
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue