Skip to content

Commit 5bca9e4

Browse files
add ability to filter campaign tags (#95)
* add ability to filter campaign tags
1 parent 6f40c7c commit 5bca9e4

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

includes/wp-mail-api.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,22 @@ function wp_mail($to, $subject, $message, $headers = '', $attachments = array())
257257
}
258258
}
259259

260+
/**
261+
* Filter tags.
262+
*
263+
* @param array $tags Mailgun tags.
264+
* @param string $to To address.
265+
* @param string $subject Subject line.
266+
* @param string $message Message content.
267+
* @param array $headers Headers array.
268+
* @param array $attachments Attachments array.
269+
* @param string $region Mailgun region.
270+
* @param string $domain Mailgun domain.
271+
*
272+
* @return array Mailgun tags.
273+
*/
274+
$body['o:tag'] = apply_filters( 'mailgun_tags', $body['o:tag'], $to, $subject, $message, $headers, $attachments, $region, $domain );
275+
260276
if (!empty($cc) && is_array($cc)) {
261277
$body['cc'] = implode(', ', $cc);
262278
}

0 commit comments

Comments
 (0)