Make WordPress Core

Changeset 28134


Ignore:
Timestamp:
04/15/2014 08:51:23 AM (11 years ago)
Author:
nacin
Message:

Allow the API to add text to auto update emails.

fixes #27812.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r27905 r28134  
    23662366        }
    23672367
     2368        $critical_support = 'critical' === $type && ! empty( $core_update->support_email );
     2369        if ( $critical_support ) {
     2370            // Support offer if available.
     2371            $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 );
     2372        } else {
     2373            // Add a note about the support forums.
     2374            $body .= "\n\n" . __( 'If you experience any issues or need support, the volunteers in the WordPress.org support forums may be able to help.' );
     2375            $body .= "\n" . __( 'https://wordpress.org/support/' );
     2376        }
     2377
    23682378        // Updates are important!
    2369         if ( $type != 'success' || $newer_version_available )
     2379        if ( $type != 'success' || $newer_version_available ) {
    23702380            $body .= "\n\n" . __( 'Keeping your site updated is important for security. It also makes the internet a safer place for you and your readers.' );
    2371 
    2372         // Add a note about the support forums to all emails.
    2373         $body .= "\n\n" . __( 'If you experience any issues or need support, the volunteers in the WordPress.org support forums may be able to help.' );
    2374         $body .= "\n" . __( 'https://wordpress.org/support/' );
     2381        }
     2382
     2383        if ( $critical_support ) {
     2384            $body .= " " . __( "If you reach out to us, we'll also ensure you'll never have this problem again." );
     2385        }
    23752386
    23762387        // If things are successful and we're now on the latest, mention plugins and themes if any are out of date.
  • trunk/src/wp-includes/update.php

    r28129 r28134  
    143143        }
    144144        $offer = (object) array_intersect_key( $offer, array_fill_keys( array( 'response', 'download', 'locale',
    145             'packages', 'current', 'version', 'php_version', 'mysql_version', 'new_bundled', 'partial_version', 'notify_email' ), '' ) );
     145            'packages', 'current', 'version', 'php_version', 'mysql_version', 'new_bundled', 'partial_version', 'notify_email', 'support_email' ), '' ) );
    146146    }
    147147
Note: See TracChangeset for help on using the changeset viewer.