X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/88550bc3400cc7c035ff590ecb007c7938041ded..e0feb3b2e5b436a06bbb04fbc838d1cd6ec95399:/wp-admin/update-core.php diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index 600db23e..96902169 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -22,6 +22,16 @@ if ( is_multisite() && ! is_network_admin() ) { if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_themes' ) && ! current_user_can( 'update_plugins' ) ) wp_die( __( 'You do not have sufficient permissions to update this site.' ) ); +/** + * + * @global string $wp_local_package + * @global wpdb $wpdb + * @global string $wp_version + * + * @staticvar bool $first_pass + * + * @param object $update + */ function list_core_update( $update ) { global $wp_local_package, $wpdb, $wp_version; static $first_pass = true; @@ -58,13 +68,13 @@ function list_core_update( $update ) { $mysql_compat = version_compare( $mysql_version, $update->mysql_version, '>=' ); if ( !$mysql_compat && !$php_compat ) - $message = sprintf( __('You cannot update because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version ); + $message = sprintf( __('You cannot update because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version ); elseif ( !$php_compat ) - $message = sprintf( __('You cannot update because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version ); + $message = sprintf( __('You cannot update because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version ); elseif ( !$mysql_compat ) - $message = sprintf( __('You cannot update because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $update->current, $update->mysql_version, $mysql_version ); + $message = sprintf( __('You cannot update because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $update->current, $update->mysql_version, $mysql_version ); else - $message = sprintf(__('You can update to WordPress %2$s automatically or download the package and install it manually:'), $update->current, $version_string); + $message = sprintf(__('You can update to WordPress %2$s automatically or download the package and install it manually:'), $update->current, $version_string); if ( !$mysql_compat || !$php_compat ) $show_buttons = false; } @@ -104,6 +114,9 @@ function list_core_update( $update ) { } +/** + * @since 2.7.0 + */ function dismissed_updates() { $dismissed = get_core_updates( array( 'dismissed' => true, 'available' => false ) ); if ( $dismissed ) { @@ -136,7 +149,9 @@ function dismissed_updates() { * * @since 2.7.0 * - * @return null + * @global string $wp_version + * @global string $required_php_version + * @global string $required_mysql_version */ function core_upgrade_preamble() { global $wp_version, $required_php_version, $required_mysql_version; @@ -162,8 +177,8 @@ function core_upgrade_preamble() { } echo ''; } else { - echo '

'; - _e('Important: before updating, please back up your database and files. For help with updates, visit the Updating WordPress Codex page.'); + echo '

'; + _e('Important: before updating, please back up your database and files. For help with updates, visit the Updating WordPress Codex page.'); echo '

'; echo '

'; @@ -198,6 +213,10 @@ function core_upgrade_preamble() { dismissed_updates(); } +/** + * + * @global string $wp_version + */ function list_plugin_updates() { global $wp_version; @@ -226,17 +245,11 @@ function list_plugin_updates() { - + - - - - - - $plugin_data) { @@ -282,12 +295,22 @@ function list_plugin_updates() { } ?> + + + + + + +

-

Please Note: Any customizations you have made to theme files will be lost. Please consider using child themes for modifications.' ), __( 'http://codex.wordpress.org/Child_Themes' ) ); ?>

+

Please Note: Any customizations you have made to theme files will be lost. Please consider using child themes for modifications.' ), __( 'https://codex.wordpress.org/Child_Themes' ) ); ?>

- + - - - - - - $theme ) { @@ -330,12 +346,22 @@ function list_theme_updates() { } ?> + + + + + + +

-

+

@@ -362,7 +388,9 @@ function list_translation_updates() { * * @since 2.7.0 * - * @return null + * @global WP_Filesystem_Base $wp_filesystem Subclass + * + * @param bool $reinstall */ function do_core_upgrade( $reinstall = false ) { global $wp_filesystem; @@ -387,7 +415,7 @@ function do_core_upgrade( $reinstall = false ) { ?>
-

+

add_help_tab( array( get_current_screen()->set_help_sidebar( '

' . __('For more information:') . '

' . - '

' . __( 'Documentation on Updating WordPress' ) . '

' . + '

' . __( 'Documentation on Updating WordPress' ) . '

' . '

' . __( 'Support Forums' ) . '

' ); @@ -508,7 +542,7 @@ if ( 'upgrade-core' == $action ) { require_once(ABSPATH . 'wp-admin/admin-header.php'); ?>
-

+

'; @@ -590,7 +624,7 @@ if ( 'upgrade-core' == $action ) { require_once(ABSPATH . 'wp-admin/admin-header.php'); echo '

'; - echo '

' . esc_html__('Update Plugins') . '

'; + echo '

' . __( 'Update Plugins' ) . '

'; echo ''; echo '
'; include(ABSPATH . 'wp-admin/admin-footer.php'); @@ -619,7 +653,7 @@ if ( 'upgrade-core' == $action ) { require_once(ABSPATH . 'wp-admin/admin-header.php'); ?>
-

+