Allow the API to add text to auto update emails.
fixes #27812. git-svn-id: https://develop.svn.wordpress.org/trunk@28134 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
62a005f254
commit
0437f710a5
@ -2365,13 +2365,24 @@ class WP_Automatic_Updater {
|
||||
break;
|
||||
}
|
||||
|
||||
// Updates are important!
|
||||
if ( $type != 'success' || $newer_version_available )
|
||||
$body .= "\n\n" . __( 'Keeping your site updated is important for security. It also makes the internet a safer place for you and your readers.' );
|
||||
$critical_support = 'critical' === $type && ! empty( $core_update->support_email );
|
||||
if ( $critical_support ) {
|
||||
// Support offer if available.
|
||||
$body .= "\n\n" . sprintf( __( "The WordPress team is willing to help you. Forward this email to %s and the team will work with you to make sure your site is working." ), $core_update->support_email );
|
||||
} else {
|
||||
// Add a note about the support forums.
|
||||
$body .= "\n\n" . __( 'If you experience any issues or need support, the volunteers in the WordPress.org support forums may be able to help.' );
|
||||
$body .= "\n" . __( 'https://wordpress.org/support/' );
|
||||
}
|
||||
|
||||
// Add a note about the support forums to all emails.
|
||||
$body .= "\n\n" . __( 'If you experience any issues or need support, the volunteers in the WordPress.org support forums may be able to help.' );
|
||||
$body .= "\n" . __( 'https://wordpress.org/support/' );
|
||||
// Updates are important!
|
||||
if ( $type != 'success' || $newer_version_available ) {
|
||||
$body .= "\n\n" . __( 'Keeping your site updated is important for security. It also makes the internet a safer place for you and your readers.' );
|
||||
}
|
||||
|
||||
if ( $critical_support ) {
|
||||
$body .= " " . __( "If you reach out to us, we'll also ensure you'll never have this problem again." );
|
||||
}
|
||||
|
||||
// If things are successful and we're now on the latest, mention plugins and themes if any are out of date.
|
||||
if ( $type == 'success' && ! $newer_version_available && ( get_plugin_updates() || get_theme_updates() ) ) {
|
||||
|
@ -142,7 +142,7 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) {
|
||||
$offer[ $offer_key ] = esc_html( $value );
|
||||
}
|
||||
$offer = (object) array_intersect_key( $offer, array_fill_keys( array( 'response', 'download', 'locale',
|
||||
'packages', 'current', 'version', 'php_version', 'mysql_version', 'new_bundled', 'partial_version', 'notify_email' ), '' ) );
|
||||
'packages', 'current', 'version', 'php_version', 'mysql_version', 'new_bundled', 'partial_version', 'notify_email', 'support_email' ), '' ) );
|
||||
}
|
||||
|
||||
$updates = new stdClass();
|
||||
|
Loading…
Reference in New Issue
Block a user