Skip to content

Commit

Permalink
Update mail.php
Browse files Browse the repository at this point in the history
  • Loading branch information
takayukister committed Feb 12, 2023
1 parent e9648a0 commit cc82e7d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions includes/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,14 @@ private function attachments( $template = null ) {
}
}


/**
* Replaces all mail-tags within the given text content.
*
* @param string $content Text including mail-tags.
* @param string|array $args Optional. Output options.
* @return string Result of replacement.
*/
function wpcf7_mail_replace_tags( $content, $args = '' ) {
$args = wp_parse_args( $args, array(
'html' => false,
Expand Down Expand Up @@ -356,8 +364,12 @@ function wpcf7_mail_replace_tags( $content, $args = '' ) {
return $content;
}


add_action( 'phpmailer_init', 'wpcf7_phpmailer_init', 10, 1 );

/**
* Adds custom properties to the PHPMailer object.
*/
function wpcf7_phpmailer_init( $phpmailer ) {
$custom_headers = $phpmailer->getCustomHeaders();
$phpmailer->clearCustomHeaders();
Expand All @@ -381,6 +393,10 @@ function wpcf7_phpmailer_init( $phpmailer ) {
}
}


/**
* Class that represents a single-line text including mail-tags.
*/
class WPCF7_MailTaggedText {

private $html = false;
Expand Down

0 comments on commit cc82e7d

Please sign in to comment.