Allow the API to add text to auto update emails.

fixes #27812.

Built from https://develop.svn.wordpress.org/trunk@28134


git-svn-id: http://core.svn.wordpress.org/trunk@27965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-04-15 08:52:15 +00:00
parent 82da8e9b0b
commit fa3900168e
2 changed files with 18 additions and 7 deletions

View File

@ -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() ) ) {

View File

@ -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();