WordPress.org

Make WordPress Core

Ticket #20116: 20116.2.patch

File 20116.2.patch, 3.7 KB (added by SergeyBiryukov, 2 years ago)
  • wp-admin/includes/schema.php

     
    881881 
    882882--The Team @ SITE_NAME' ); 
    883883 
     884        $welcome_user_email = __( 'Dear User, 
     885 
     886Your new account is set up. 
     887 
     888You can log in with the following information: 
     889Username: USERNAME 
     890Password: PASSWORD 
     891LOGINLINK 
     892 
     893Thanks! 
     894 
     895--The Team @ SITE_NAME' ); 
     896 
    884897        $sitemeta = array( 
    885898                'site_name' => $site_name, 
    886899                'admin_email' => $site_user->user_email, 
     
    894907                'illegal_names' => array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator', 'files' ), 
    895908                'wpmu_upgrade_site' => $wp_db_version, 
    896909                'welcome_email' => $welcome_email, 
     910                'welcome_user_email' => $welcome_user_email, 
    897911                'first_post' => __( 'Welcome to <a href="SITE_URL">SITE_NAME</a>. This is your first post. Edit or delete it, then start blogging!' ), 
    898912                // @todo - network admins should have a method of editing the network siteurl (used for cookie hash) 
    899913                'siteurl' => get_option( 'siteurl' ) . '/', 
  • wp-includes/ms-deprecated.php

     
    270270        } 
    271271        return $url; 
    272272} 
     273 
     274/** 
     275 * Ensure that the welcome message is not empty. Currently unused. 
     276 * 
     277 * @since MU 
     278 * @deprecated 3.4.0 
     279 * @deprecated Use get_site_option( 'welcome_user_email' ) 
     280 * 
     281 * @param string $text 
     282 * @return string 
     283 */ 
     284function welcome_user_msg_filter( $text ) { 
     285        _deprecated_function( __FUNCTION__, '3.4', "get_site_option( 'welcome_user_email' )" ); 
     286 
     287        if ( !$text ) { 
     288                return __( 'Dear User, 
     289 
     290Your new account is set up. 
     291 
     292You can log in with the following information: 
     293Username: USERNAME 
     294Password: PASSWORD 
     295LOGINLINK 
     296 
     297Thanks! 
     298 
     299--The Team @ SITE_NAME' ); 
     300        } 
     301        return $text; 
     302} 
  • wp-includes/ms-functions.php

     
    12161216                return false; 
    12171217 
    12181218        $welcome_email = stripslashes( get_site_option( 'welcome_email' ) ); 
    1219         if ( $welcome_email == false ) 
     1219        if ( false == $welcome_email ) 
    12201220                $welcome_email = stripslashes( __( 'Dear User, 
    12211221 
    12221222Your new SITE_NAME site has been successfully set up at: 
     
    12791279        if ( !apply_filters('wpmu_welcome_user_notification', $user_id, $password, $meta) ) 
    12801280                return false; 
    12811281 
    1282         $welcome_email = get_site_option( 'welcome_user_email' ); 
     1282        $welcome_email = stripslashes( get_site_option( 'welcome_user_email' ) ); 
     1283        if ( false == $welcome_email ) 
     1284                $welcome_email = __( 'Dear User, 
    12831285 
     1286Your new account is set up. 
     1287 
     1288You can log in with the following information: 
     1289Username: USERNAME 
     1290Password: PASSWORD 
     1291LOGINLINK 
     1292 
     1293Thanks! 
     1294 
     1295--The Team @ SITE_NAME' ); 
     1296 
    12841297        $user = new WP_User($user_id); 
    12851298 
    12861299        $welcome_email = apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta); 
     
    18851898add_filter('option_users_can_register', 'users_can_register_signup_filter'); 
    18861899 
    18871900/** 
    1888  * Ensure that the welcome message is not empty. Currently unused. 
    1889  * 
    1890  * @since MU 
    1891  * 
    1892  * @param string $text 
    1893  * @return string 
    1894  */ 
    1895 function welcome_user_msg_filter( $text ) { 
    1896         if ( !$text ) { 
    1897                 return __( 'Dear User, 
    1898  
    1899 Your new account is set up. 
    1900  
    1901 You can log in with the following information: 
    1902 Username: USERNAME 
    1903 Password: PASSWORD 
    1904 LOGINLINK 
    1905  
    1906 Thanks! 
    1907  
    1908 --The Team @ SITE_NAME' ); 
    1909         } 
    1910         return $text; 
    1911 } 
    1912 add_filter( 'site_option_welcome_user_email', 'welcome_user_msg_filter' ); 
    1913  
    1914 /** 
    19151901 * Whether to force SSL on content. 
    19161902 * 
    19171903 * @since 2.8.5