33 if ( 'upgrade_db' === $step ) { |
33 if ( 'upgrade_db' === $step ) { |
34 wp_upgrade(); |
34 wp_upgrade(); |
35 die( '0' ); |
35 die( '0' ); |
36 } |
36 } |
37 |
37 |
|
38 /** |
|
39 * @global string $wp_version |
|
40 * @global string $required_php_version |
|
41 * @global string $required_mysql_version |
|
42 * @global wpdb $wpdb |
|
43 */ |
38 global $wp_version, $required_php_version, $required_mysql_version; |
44 global $wp_version, $required_php_version, $required_mysql_version; |
39 |
45 |
40 $step = (int) $step; |
46 $step = (int) $step; |
41 |
47 |
42 $php_version = phpversion(); |
48 $php_version = phpversion(); |
52 <!DOCTYPE html> |
58 <!DOCTYPE html> |
53 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> |
59 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> |
54 <head> |
60 <head> |
55 <meta name="viewport" content="width=device-width" /> |
61 <meta name="viewport" content="width=device-width" /> |
56 <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" /> |
62 <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" /> |
|
63 <meta name="robots" content="noindex,nofollow" /> |
57 <title><?php _e( 'WordPress › Update' ); ?></title> |
64 <title><?php _e( 'WordPress › Update' ); ?></title> |
58 <?php |
65 <?php |
59 wp_admin_css( 'install', true ); |
66 wp_admin_css( 'install', true ); |
60 wp_admin_css( 'ie', true ); |
67 wp_admin_css( 'ie', true ); |
61 ?> |
68 ?> |
62 </head> |
69 </head> |
63 <body class="wp-core-ui"> |
70 <body class="wp-core-ui"> |
64 <h1 id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></h1> |
71 <p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p> |
65 |
72 |
66 <?php if ( get_option( 'db_version' ) == $wp_db_version || !is_blog_installed() ) : ?> |
73 <?php if ( get_option( 'db_version' ) == $wp_db_version || !is_blog_installed() ) : ?> |
67 |
74 |
68 <h2><?php _e( 'No Update Required' ); ?></h2> |
75 <h1><?php _e( 'No Update Required' ); ?></h1> |
69 <p><?php _e( 'Your WordPress database is already up-to-date!' ); ?></p> |
76 <p><?php _e( 'Your WordPress database is already up-to-date!' ); ?></p> |
70 <p class="step"><a class="button button-large" href="<?php echo get_option( 'home' ); ?>/"><?php _e( 'Continue' ); ?></a></p> |
77 <p class="step"><a class="button button-large" href="<?php echo get_option( 'home' ); ?>/"><?php _e( 'Continue' ); ?></a></p> |
71 |
78 |
72 <?php elseif ( !$php_compat || !$mysql_compat ) : |
79 <?php elseif ( !$php_compat || !$mysql_compat ) : |
73 if ( !$mysql_compat && !$php_compat ) |
80 if ( !$mysql_compat && !$php_compat ) |
84 if ( $goback ) { |
91 if ( $goback ) { |
85 $goback = esc_url_raw( $goback ); |
92 $goback = esc_url_raw( $goback ); |
86 $goback = urlencode( $goback ); |
93 $goback = urlencode( $goback ); |
87 } |
94 } |
88 ?> |
95 ?> |
89 <h2><?php _e( 'Database Update Required' ); ?></h2> |
96 <h1><?php _e( 'Database Update Required' ); ?></h1> |
90 <p><?php _e( 'WordPress has been updated! Before we send you on your way, we have to update your database to the newest version.' ); ?></p> |
97 <p><?php _e( 'WordPress has been updated! Before we send you on your way, we have to update your database to the newest version.' ); ?></p> |
91 <p><?php _e( 'The update process may take a little while, so please be patient.' ); ?></p> |
98 <p><?php _e( 'The database update process may take a little while, so please be patient.' ); ?></p> |
92 <p class="step"><a class="button button-large" href="upgrade.php?step=1&backto=<?php echo $goback; ?>"><?php _e( 'Update WordPress Database' ); ?></a></p> |
99 <p class="step"><a class="button button-large button-primary" href="upgrade.php?step=1&backto=<?php echo $goback; ?>"><?php _e( 'Update WordPress Database' ); ?></a></p> |
93 <?php |
100 <?php |
94 break; |
101 break; |
95 case 1: |
102 case 1: |
96 wp_upgrade(); |
103 wp_upgrade(); |
97 |
104 |
98 $backto = !empty($_GET['backto']) ? wp_unslash( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/'; |
105 $backto = !empty($_GET['backto']) ? wp_unslash( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/'; |
99 $backto = esc_url( $backto ); |
106 $backto = esc_url( $backto ); |
100 $backto = wp_validate_redirect($backto, __get_option( 'home' ) . '/'); |
107 $backto = wp_validate_redirect($backto, __get_option( 'home' ) . '/'); |
101 ?> |
108 ?> |
102 <h2><?php _e( 'Update Complete' ); ?></h2> |
109 <h1><?php _e( 'Update Complete' ); ?></h1> |
103 <p><?php _e( 'Your WordPress database has been successfully updated!' ); ?></p> |
110 <p><?php _e( 'Your WordPress database has been successfully updated!' ); ?></p> |
104 <p class="step"><a class="button button-large" href="<?php echo $backto; ?>"><?php _e( 'Continue' ); ?></a></p> |
111 <p class="step"><a class="button button-large" href="<?php echo $backto; ?>"><?php _e( 'Continue' ); ?></a></p> |
105 |
112 |
106 <!-- |
113 <!-- |
107 <pre> |
114 <pre> |