WordPress.org

Make WordPress Core

Ticket #28931: wp-root-28931.diff

File wp-root-28931.diff, 3.6 KB (added by DrewAPicture, 7 years ago)
  • src/wp-login.php

     
    6969
    7070        wp_admin_css( 'login', true );
    7171
    72         // Remove all stored post data on logging out.
    73         // This could be added by add_action('login_head'...) like wp_shake_js()
    74         // but maybe better if it's not removable by plugins
     72        /*
     73         * Remove all stored post data on logging out.
     74         * This could be added by add_action('login_head'...) like wp_shake_js(),
     75         * but maybe better if it's not removable by plugins
     76         */
    7577        if ( 'loggedout' == $wp_error->get_error_code() ) {
    7678                ?>
    7779                <script>if("sessionStorage" in window){try{for(var key in sessionStorage){if(key.indexOf("wp-autosave-")!=-1){sessionStorage.removeItem(key)}}}catch(e){}};</script>
     
    296298                return $errors;
    297299        }
    298300
    299         // redefining user_login ensures we return the right case in the email
     301        // Redefining user_login ensures we return the right case in the email.
    300302        $user_login = $user_data->user_login;
    301303        $user_email = $user_data->user_email;
    302304
     
    309311         * @param string $user_login The user login name.
    310312         */
    311313        do_action( 'retreive_password', $user_login );
     314
    312315        /**
    313316         * Fires before a new password is retrieved.
    314317         *
     
    364367        if ( is_multisite() )
    365368                $blogname = $GLOBALS['current_site']->site_name;
    366369        else
    367                 // The blogname option is escaped with esc_html on the way into the database in sanitize_option
    368                 // we want to reverse this for the plain text arena of emails.
     370                /*
     371                 * The blogname option is escaped with esc_html on the way into the database
     372                 * in sanitize_option we want to reverse this for the plain text arena of emails.
     373                 */
    369374                $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    370375
    371376        $title = sprintf( __('[%s] Password Reset'), $blogname );
  • src/wp-mail.php

     
    6868        $author_found = false;
    6969        $dmonths = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
    7070        foreach ($message as $line) {
    71                 // body signal
     71                // Body signal.
    7272                if ( strlen($line) < 3 )
    7373                        $bodysignal = true;
    7474                if ( $bodysignal ) {
     
    108108                                $subject = $subject[0];
    109109                        }
    110110
    111                         // Set the author using the email address (From or Reply-To, the last used)
    112                         // otherwise use the site admin
     111                        /*
     112                         * Set the author using the email address (From or Reply-To, the last used)
     113                         * otherwise use the site admin.
     114                         */
    113115                        if ( ! $author_found && preg_match( '/^(From|Reply-To): /', $line ) ) {
    114116                                if ( preg_match('|[a-z0-9_.-]+@[a-z0-9_.-]+(?!.*<)|i', $line, $matches) )
    115117                                        $author = $matches[0];
     
    171173        if ( $content_type == 'multipart/alternative' ) {
    172174                $content = explode('--'.$boundary, $content);
    173175                $content = $content[2];
    174                 // match case-insensitive content-transfer-encoding
     176
     177                // Match case-insensitive content-transfer-encoding.
    175178                if ( preg_match( '/Content-Transfer-Encoding: quoted-printable/i', $content, $delim) ) {
    176179                        $content = explode($delim[0], $content);
    177180                        $content = $content[1];
  • src/wp-signup.php

     
    316316
    317317        $result = validate_blog_form();
    318318
    319         // extracted values set/overwrite globals
     319        // Extracted values set/overwrite globals.
    320320        $domain = $result['domain'];
    321321        $path = $result['path'];
    322322        $blogname = $result['blogname'];