Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-mail.php

    r47054 r47122  
    3434/** Only check at this interval for new messages. */
    3535if ( ! defined( 'WP_MAIL_INTERVAL' ) ) {
    36     define( 'WP_MAIL_INTERVAL', 300 ); // 5 minutes
     36    define( 'WP_MAIL_INTERVAL', 5 * MINUTE_IN_SECONDS );
    3737}
    3838
     
    110110                $subject = trim( $line );
    111111                $subject = substr( $subject, 9, strlen( $subject ) - 9 );
    112                 // Captures any text in the subject before $phone_delim as the subject
     112                // Captures any text in the subject before $phone_delim as the subject.
    113113                if ( function_exists( 'iconv_mime_decode' ) ) {
    114114                    $subject = iconv_mime_decode( $subject, 2, get_option( 'blog_charset' ) );
     
    142142            }
    143143
    144             if ( preg_match( '/Date: /i', $line ) ) { // of the form '20 Mar 2002 20:32:37 +0100'
    145                 $ddate           = str_replace( 'Date: ', '', trim( $line ) );
    146                 $ddate           = preg_replace( '!\s*\(.+\)\s*$!', '', $ddate ); // remove parenthesised timezone string if it exists, as this confuses strtotime
     144            if ( preg_match( '/Date: /i', $line ) ) { // Of the form '20 Mar 2002 20:32:37 +0100'.
     145                $ddate = str_replace( 'Date: ', '', trim( $line ) );
     146                // Remove parenthesised timezone string if it exists, as this confuses strtotime().
     147                $ddate           = preg_replace( '!\s*\(.+\)\s*$!', '', $ddate );
    147148                $ddate_timestamp = strtotime( $ddate );
    148149                $post_date       = gmdate( 'Y-m-d H:i:s', $ddate_timestamp + $time_difference );
     
    152153    }
    153154
    154     // Set $post_status based on $author_found and on author's publish_posts capability
     155    // Set $post_status based on $author_found and on author's publish_posts capability.
    155156    if ( $author_found ) {
    156157        $user        = new WP_User( $post_author );
     
    196197    }
    197198
    198     // Captures any text in the body after $phone_delim as the body
     199    // Captures any text in the body after $phone_delim as the body.
    199200    $content = explode( $phone_delim, $content );
    200201    $content = empty( $content[1] ) ? $content[0] : $content[1];
Note: See TracChangeset for help on using the changeset viewer.