WordPress.org

Make WordPress Core

Ticket #10787: 10787.1.diff

File 10787.1.diff, 3.5 KB (added by atimmer, 9 months ago)
  • src/wp-includes/update.php

     
    541541 
    542542} 
    543543 
     544function _wp_mail_auto_updates_success() { 
     545         
     546        $version = get_site_transient( 'update_core' )->version_checked; 
     547        $type = true ? __( 'security and bug fix updates' ) : __( 'bug fix update' ); 
     548        $site_url = get_site_url(); 
     549        $site_url = '<a href="' . $site_url . '">' . $site_url . '</a>'; 
     550         
     551        $message = __( 'Howdy,' ) . "\r\n\r\n"; 
     552        $message .= sprintf( __( 'WordPress %s, a %s was released and has been installed on %s automagically. No action is needed on your part, but if you see any problems or need support, the volunteers in the WordPress Support Forums are hanging around http://wordpress.org/support/ to help.' ), $version, $type, $site_url ) . "\r\n"; 
     553         
     554        wp_mail( get_option( 'admin_email' ), __( 'Wordpress auto update succeeded' ), $meesage ); 
     555         
     556} 
     557 
     558function _wp_mail_auto_updates_failed() { 
     559         
     560        $username = 'username'; 
     561        $version = '3.7.1'; 
     562        $type = true ? __( 'security and bug fix updates' ) : __( 'bug fix update' ); 
     563        $site_url = get_site_url(); 
     564        $site_url = '<a href="' . $site_url . '">' . $site_url . '</a>'; 
     565         
     566        $message = __( 'Howdy,' ) . "\r\n\r\n"; 
     567        $message .= sprintf( __( 'WordPress %s, a %s was released. We tried to install it on %s, but were unable to. You should update your site post haste in order to keep it running smoothly. Unsure of how to update? Read ​http://codex.wordpress.org/Updating_WordPress or visit the WordPress Support Forums at ​http://wordpress.org/support/ to get some help.' ), $version, $type, $site_url ) . "\r\n"; 
     568         
     569        if ( $no_constants_to_turn_updates_off ) 
     570                $message .= "\r\n" . sprintf( __( 'Want to stop receiving notices like this? Visit %s to learn how to enable automatic updates for security releases.' ), $codex_page ) . "\r\n"; 
     571 
     572        wp_mail( get_option( 'admin_email' ), __( 'Wordpress auto update failed' ), $message ); 
     573} 
     574 
     575function _wp_mail_update_nag() { 
     576         
     577        $username = 'username'; 
     578        $version = '3.7.1'; 
     579        $site_url = get_site_url(); 
     580        $site_url = '<a href="' . $site_url . '">' . $site_url . '</a>'; 
     581         
     582        $message = __( 'Howdy,' ) . "\r\n\r\n"; 
     583        $message .= sprintf( __( 'This is a reminder that WordPress version %s was released yesterday. In order to keep %s secure and running smoothly, please update immediately. Unsure of how to update? Read ​http://codex.wordpress.org/Updating_WordPress or visit the WordPress Support Forums at ​http://wordpress.org/support/ to get some help.' ), $version, $site_url ) . "\r\n"; 
     584         
     585        wp_mail( get_option( 'admin_email' ), __( 'Wordpress update available' ), $message ); 
     586} 
     587 
     588function _wp_mail_update_monthly_nag() { 
     589         
     590        $username = 'username'; 
     591        $version = '3.7.1'; 
     592        $site_url = get_site_url(); 
     593        $site_url = '<a href="' . $site_url . '">' . $site_url . '</a>'; 
     594         
     595        $message = __( 'Howdy,' ) . "\r\n\r\n"; 
     596        $message .= sprintf( __( 'This is your third reminder that WordPress version %s was released %d days ago. it is imperative that you update %s in order to keep your site secure. Unsure of how to update? Read ​http://codex.wordpress.org/Updating_WordPress or visit the WordPress Support Forums at ​http://wordpress.org/support/ to get some help.' ), $version, $days, $site_url ) . "\r\n"; 
     597         
     598        wp_mail( get_option( 'admin_email' ), __( 'Wordpress update available' ), $message ); 
     599} 
     600 
    544601if ( ( ! is_main_site() && ! is_network_admin() ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) 
    545602        return; 
    546603