diff --git a/src/wp-admin/about.php b/src/wp-admin/about.php index 96031a5af3..a694fe54e7 100644 --- a/src/wp-admin/about.php +++ b/src/wp-admin/about.php @@ -52,23 +52,36 @@ include( ABSPATH . 'wp-admin/admin-header.php' );

$wp_version . '.1.next.minor', + 'version' => $wp_version . '.1.next.minor', + 'php_version' => $required_php_version, + 'mysql_version' => $required_mysql_version, + ); + require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + $updater = new WP_Automatic_Updater; + $can_auto_update = wp_http_supports( 'ssl' ) && $updater->should_update( 'core', $future_minor_update, ABSPATH ); + if ( $can_auto_update ) { - require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; - $upgrader = new WP_Automatic_Updater; - $future_minor_update = (object) array( - 'current' => $wp_version . '.1.next.minor', - 'version' => $wp_version . '.1.next.minor', - 'php_version' => $required_php_version, - 'mysql_version' => $required_mysql_version, - ); - $can_auto_update = $upgrader->should_update( 'core', $future_minor_update, ABSPATH ); + echo '

' . __( 'This site is able to apply these updates automatically. Cool!' ). '

'; + + // If the updater is disabled entirely, don't show them anything. + } elseif ( ! $updater->is_disabled() ) { + echo '

'; + // If this is is filtered to false, they won't get emails, so don't claim we will. + // Assumption: If the user can update core, they can see what the admin email is. + + /** This filter is documented in wp-admin/includes/class-wp-upgrader.php */ + if ( apply_filters( 'send_core_update_notification_email', true, $future_minor_update ) ) { + printf( __( 'This site is not able to apply these updates automatically. But we’ll email %s when there is a new security release.' ), esc_html( get_site_option( 'admin_email' ) ) ); + } else { + _e( 'This site is not able to apply these updates automatically.' ); + } + echo '

'; } - if ( $can_auto_update ) : ?> -

is able to apply these updates automatically. Cool!' ); ?>

- -

is not able to apply these updates automatically. But we’ll email %s when there is a new security release.' ), esc_html( get_site_option( 'admin_email' ) ) ); ?>

- + } + ?>