rebase on oct-10-2023
This commit is contained in:
@@ -1,5 +1,19 @@
|
||||
<?php
|
||||
|
||||
add_filter( 'wpcf7_mail_html_body', 'wpcf7_mail_html_body_autop', 10, 1 );
|
||||
|
||||
/**
|
||||
* Filter callback that applies auto-p to HTML email message body.
|
||||
*/
|
||||
function wpcf7_mail_html_body_autop( $body ) {
|
||||
if ( wpcf7_autop_or_not() ) {
|
||||
$body = wpcf7_autop( $body );
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Class that represents an attempt to compose and send email.
|
||||
*/
|
||||
@@ -142,14 +156,19 @@ class WPCF7_Mail {
|
||||
<title>' . esc_html( $this->get( 'subject', true ) ) . '</title>
|
||||
</head>
|
||||
<body>
|
||||
', $this );
|
||||
',
|
||||
$this
|
||||
);
|
||||
|
||||
$body = apply_filters( 'wpcf7_mail_html_body', $body, $this );
|
||||
|
||||
$footer = apply_filters( 'wpcf7_mail_html_footer',
|
||||
'</body>
|
||||
</html>', $this );
|
||||
</html>',
|
||||
$this
|
||||
);
|
||||
|
||||
$html = $header . wpcf7_autop( $body ) . $footer;
|
||||
return $html;
|
||||
return $header . $body . $footer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user