Changeset 49844 for trunk/src/wp-includes/pluggable.php
- Timestamp:
- 12/20/2020 03:07:23 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r49692 r49844 162 162 * @global PHPMailer\PHPMailer\PHPMailer $phpmailer 163 163 * 164 * @param string| array$to Array or comma-separated list of email addresses to send message.165 * @param string $subject Email subject166 * @param string $message Message contents167 * @param string| array$headers Optional. Additional headers.168 * @param string| array$attachments Optional. Paths to files to attach.169 * @return bool Whether the email contents weresent successfully.164 * @param string|string[] $to Array or comma-separated list of email addresses to send message. 165 * @param string $subject Email subject. 166 * @param string $message Message contents. 167 * @param string|string[] $headers Optional. Additional headers. 168 * @param string|string[] $attachments Optional. Paths to files to attach. 169 * @return bool Whether the email was sent successfully. 170 170 */ 171 171 function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) { … … 188 188 */ 189 189 $atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) ); 190 191 /** 192 * Filters whether to preempt sending an email. 193 * 194 * Returning a non-null value will short-circuit {@see wp_mail()}, returning 195 * that value instead. A boolean return value should be used to indicate whether 196 * the email was successfully sent. 197 * 198 * @since 5.7.0 199 * 200 * @param null|bool $return Short-circuit return value. 201 * @param array $atts { 202 * Array of the `wp_mail()` arguments. 203 * 204 * @type string|string[] $to Array or comma-separated list of email addresses to send message. 205 * @type string $subject Email subject. 206 * @type string $message Message contents. 207 * @type string|string[] $headers Additional headers. 208 * @type string|string[] $attachments Paths to files to attach. 209 * } 210 */ 211 $pre_wp_mail = apply_filters( 'pre_wp_mail', null, $atts ); 212 213 if ( null !== $pre_wp_mail ) { 214 return $pre_wp_mail; 215 } 190 216 191 217 if ( isset( $atts['to'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.