Changeset 47122 for trunk/src/wp-mail.php
- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-mail.php
r47054 r47122 34 34 /** Only check at this interval for new messages. */ 35 35 if ( ! defined( 'WP_MAIL_INTERVAL' ) ) { 36 define( 'WP_MAIL_INTERVAL', 300 ); // 5 minutes36 define( 'WP_MAIL_INTERVAL', 5 * MINUTE_IN_SECONDS ); 37 37 } 38 38 … … 110 110 $subject = trim( $line ); 111 111 $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. 113 113 if ( function_exists( 'iconv_mime_decode' ) ) { 114 114 $subject = iconv_mime_decode( $subject, 2, get_option( 'blog_charset' ) ); … … 142 142 } 143 143 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 ); 147 148 $ddate_timestamp = strtotime( $ddate ); 148 149 $post_date = gmdate( 'Y-m-d H:i:s', $ddate_timestamp + $time_difference ); … … 152 153 } 153 154 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. 155 156 if ( $author_found ) { 156 157 $user = new WP_User( $post_author ); … … 196 197 } 197 198 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. 199 200 $content = explode( $phone_delim, $content ); 200 201 $content = empty( $content[1] ) ? $content[0] : $content[1];
Note: See TracChangeset
for help on using the changeset viewer.