Skip to content

Commit

Permalink
add ability to filter campaign tags (#95)
Browse files Browse the repository at this point in the history
* add ability to filter campaign tags
  • Loading branch information
andrewminion-luminfire authored Mar 4, 2021
1 parent 6f40c7c commit 5bca9e4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions includes/wp-mail-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,22 @@ function wp_mail($to, $subject, $message, $headers = '', $attachments = array())
}
}

/**
* Filter tags.
*
* @param array $tags Mailgun tags.
* @param string $to To address.
* @param string $subject Subject line.
* @param string $message Message content.
* @param array $headers Headers array.
* @param array $attachments Attachments array.
* @param string $region Mailgun region.
* @param string $domain Mailgun domain.
*
* @return array Mailgun tags.
*/
$body['o:tag'] = apply_filters( 'mailgun_tags', $body['o:tag'], $to, $subject, $message, $headers, $attachments, $region, $domain );

if (!empty($cc) && is_array($cc)) {
$body['cc'] = implode(', ', $cc);
}
Expand Down

0 comments on commit 5bca9e4

Please sign in to comment.