diff -r be944660c56a -r 3d72ae0968f4 wp/wp-admin/includes/class-wp-automatic-updater.php --- a/wp/wp-admin/includes/class-wp-automatic-updater.php Wed Sep 21 18:19:35 2022 +0200 +++ b/wp/wp-admin/includes/class-wp-automatic-updater.php Tue Sep 27 16:37:53 2022 +0200 @@ -23,7 +23,7 @@ protected $update_results = array(); /** - * Whether the entire automatic updater is disabled. + * Determines whether the entire automatic updater is disabled. * * @since 3.7.0 */ @@ -56,7 +56,7 @@ } /** - * Check for version control checkouts. + * Checks for version control checkouts. * * Checks for Subversion, Git, Mercurial, and Bazaar. It recursively looks up the * filesystem to the top of the drive, erring on the side of detecting a VCS @@ -193,9 +193,10 @@ * - `auto_update_theme` * - `auto_update_translation` * - * Generally speaking, plugins, themes, and major core versions are not updated - * by default, while translations and minor and development versions for core - * are updated by default. + * Since WordPress 3.7, minor and development versions of core, and translations have + * been auto-updated by default. New installs on WordPress 5.6 or higher will also + * auto-update major versions by default. Starting in 5.6, older sites can opt-in to + * major version auto-updates, and auto-updates for plugins and themes. * * See the {@see 'allow_dev_auto_core_updates'}, {@see 'allow_minor_auto_core_updates'}, * and {@see 'allow_major_auto_core_updates'} filters for a more straightforward way to @@ -294,7 +295,7 @@ } /** - * Update an item, if appropriate. + * Updates an item, if appropriate. * * @since 3.7.0 * @@ -418,9 +419,10 @@ return false; } - // Core doesn't output this, so let's append it so we don't get confused. + // Core doesn't output this, so let's append it, so we don't get confused. if ( is_wp_error( $upgrade_result ) ) { - $skin->error( __( 'Installation failed.' ), $upgrade_result ); + $upgrade_result->add( 'installation_failed', __( 'Installation failed.' ) ); + $skin->error( $upgrade_result ); } else { $skin->feedback( __( 'WordPress updated successfully.' ) ); } @@ -776,7 +778,7 @@ // Don't show this message if there is a newer version available. // Potential for confusion, and also not useful for them to know at this point. if ( 'fail' === $type && ! $newer_version_available ) { - $body .= __( 'We tried but were unable to update your site automatically.' ) . ' '; + $body .= __( 'An attempt was made, but your site could not be updated automatically.' ) . ' '; } $body .= __( 'Updating is easy and only takes a few moments:' ); @@ -842,7 +844,7 @@ $body .= "\n***\n\n"; /* translators: %s: WordPress version. */ $body .= sprintf( __( 'Your site was running version %s.' ), get_bloginfo( 'version' ) ); - $body .= ' ' . __( 'We have some data that describes the error your site encountered.' ); + $body .= ' ' . __( 'Some data that describes the error your site encountered has been put together.' ); $body .= ' ' . __( 'Your hosting company, support forum volunteers, or a friendly developer may be able to use this information to help you:' ); // If we had a rollback and we're still critical, then the rollback failed too. @@ -1234,9 +1236,15 @@ $body[] = __( 'https://wordpress.org/support/forums/' ); $body[] = "\n" . __( 'The WordPress Team' ); + if ( '' !== get_option( 'blogname' ) ) { + $site_title = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); + } else { + $site_title = parse_url( home_url(), PHP_URL_HOST ); + } + $body = implode( "\n", $body ); $to = get_site_option( 'admin_email' ); - $subject = sprintf( $subject, wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ); + $subject = sprintf( $subject, $site_title ); $headers = ''; $email = compact( 'to', 'subject', 'body', 'headers' ); @@ -1345,7 +1353,11 @@ $body[] = ''; } - $site_title = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ); + if ( '' !== get_bloginfo( 'name' ) ) { + $site_title = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ); + } else { + $site_title = parse_url( home_url(), PHP_URL_HOST ); + } if ( $failures ) { $body[] = trim(