10 /** Load WordPress Administration Bootstrap */ |
10 /** Load WordPress Administration Bootstrap */ |
11 require_once __DIR__ . '/admin.php'; |
11 require_once __DIR__ . '/admin.php'; |
12 |
12 |
13 require_once ABSPATH . WPINC . '/http.php'; |
13 require_once ABSPATH . WPINC . '/http.php'; |
14 |
14 |
|
15 // Used in the HTML title tag. |
15 $title = __( 'Upgrade Network' ); |
16 $title = __( 'Upgrade Network' ); |
16 $parent_file = 'upgrade.php'; |
17 $parent_file = 'upgrade.php'; |
17 |
18 |
18 get_current_screen()->add_help_tab( |
19 get_current_screen()->add_help_tab( |
19 array( |
20 array( |
20 'id' => 'overview', |
21 'id' => 'overview', |
21 'title' => __( 'Overview' ), |
22 'title' => __( 'Overview' ), |
22 'content' => |
23 'content' => |
23 '<p>' . __( 'Only use this screen once you have updated to a new version of WordPress through Updates/Available Updates (via the Network Administration navigation menu or the Toolbar). Clicking the Upgrade Network button will step through each site in the network, five at a time, and make sure any database updates are applied.' ) . '</p>' . |
24 '<p>' . __( 'Only use this screen once you have updated to a new version of WordPress through Updates/Available Updates (via the Network Administration navigation menu or the Toolbar). Clicking the Upgrade Network button will step through each site in the network, five at a time, and make sure any database updates are applied.' ) . '</p>' . |
24 '<p>' . __( 'If a version update to core has not happened, clicking this button won’t affect anything.' ) . '</p>' . |
25 '<p>' . __( 'If a version update to core has not happened, clicking this button will not affect anything.' ) . '</p>' . |
25 '<p>' . __( 'If this process fails for any reason, users logging in to their sites will force the same update.' ) . '</p>', |
26 '<p>' . __( 'If this process fails for any reason, users logging in to their sites will force the same update.' ) . '</p>', |
26 ) |
27 ) |
27 ); |
28 ); |
28 |
29 |
29 get_current_screen()->set_help_sidebar( |
30 get_current_screen()->set_help_sidebar( |
105 /** |
106 /** |
106 * Fires after the Multisite DB upgrade for each site is complete. |
107 * Fires after the Multisite DB upgrade for each site is complete. |
107 * |
108 * |
108 * @since MU (3.0.0) |
109 * @since MU (3.0.0) |
109 * |
110 * |
110 * @param array|WP_Error $response The upgrade response array or WP_Error on failure. |
111 * @param array $response The upgrade response array. |
111 */ |
112 */ |
112 do_action( 'after_mu_upgrade', $response ); |
113 do_action( 'after_mu_upgrade', $response ); |
113 |
114 |
114 /** |
115 /** |
115 * Fires after each site has been upgraded. |
116 * Fires after each site has been upgraded. |
119 * @param int $site_id The Site ID. |
120 * @param int $site_id The Site ID. |
120 */ |
121 */ |
121 do_action( 'wpmu_upgrade_site', $site_id ); |
122 do_action( 'wpmu_upgrade_site', $site_id ); |
122 } |
123 } |
123 echo '</ul>'; |
124 echo '</ul>'; |
124 ?><p><?php _e( 'If your browser doesn’t start loading the next page automatically, click this link:' ); ?> <a class="button" href="upgrade.php?action=upgrade&n=<?php echo ( $n + 5 ); ?>"><?php _e( 'Next Sites' ); ?></a></p> |
125 ?><p><?php _e( 'If your browser does not start loading the next page automatically, click this link:' ); ?> <a class="button" href="upgrade.php?action=upgrade&n=<?php echo ( $n + 5 ); ?>"><?php _e( 'Next Sites' ); ?></a></p> |
125 <script type="text/javascript"> |
126 <script type="text/javascript"> |
126 <!-- |
127 <!-- |
127 function nextpage() { |
128 function nextpage() { |
128 location.href = "upgrade.php?action=upgrade&n=<?php echo ( $n + 5 ); ?>"; |
129 location.href = "upgrade.php?action=upgrade&n=<?php echo ( $n + 5 ); ?>"; |
129 } |
130 } |
135 case 'show': |
136 case 'show': |
136 default: |
137 default: |
137 if ( (int) get_site_option( 'wpmu_upgrade_site' ) !== $GLOBALS['wp_db_version'] ) : |
138 if ( (int) get_site_option( 'wpmu_upgrade_site' ) !== $GLOBALS['wp_db_version'] ) : |
138 ?> |
139 ?> |
139 <h2><?php _e( 'Database Update Required' ); ?></h2> |
140 <h2><?php _e( 'Database Update Required' ); ?></h2> |
140 <p><?php _e( 'WordPress has been updated! Before we send you on your way, we need to individually upgrade the sites in your network.' ); ?></p> |
141 <p><?php _e( 'WordPress has been updated! Next and final step is to individually upgrade the sites in your network.' ); ?></p> |
141 <?php endif; ?> |
142 <?php endif; ?> |
142 |
143 |
143 <p><?php _e( 'The database update process may take a little while, so please be patient.' ); ?></p> |
144 <p><?php _e( 'The database update process may take a little while, so please be patient.' ); ?></p> |
144 <p><a class="button button-primary" href="upgrade.php?action=upgrade"><?php _e( 'Upgrade Network' ); ?></a></p> |
145 <p><a class="button button-primary" href="upgrade.php?action=upgrade"><?php _e( 'Upgrade Network' ); ?></a></p> |
145 <?php |
146 <?php |