Merged in feature/280-dev-dev01 (pull request #21)

auto-patch  280-dev-dev01-2024-01-19T16_41_58

* auto-patch  280-dev-dev01-2024-01-19T16_41_58
This commit is contained in:
Tony Volpe
2024-01-19 16:44:43 +00:00
parent 2699b5437a
commit be83910651
2125 changed files with 179300 additions and 35639 deletions

View File

@@ -212,8 +212,12 @@ function wpcf7_validate_configuration() {
/**
* Returns true if wpcf7_autop() is applied.
*/
function wpcf7_autop_or_not() {
return (bool) apply_filters( 'wpcf7_autop_or_not', WPCF7_AUTOP );
function wpcf7_autop_or_not( $options = '' ) {
$options = wp_parse_args( $options, array(
'for' => 'form',
) );
return (bool) apply_filters( 'wpcf7_autop_or_not', WPCF7_AUTOP, $options );
}

View File

@@ -6,7 +6,7 @@ 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() ) {
if ( wpcf7_autop_or_not( array( 'for' => 'mail' ) ) ) {
$body = wpcf7_autop( $body );
}

View File

@@ -68,6 +68,14 @@ class WPCF7_Submission {
}
/**
* Destructor.
*/
public function __destruct() {
$this->remove_uploaded_files();
}
/**
* The main logic of submission.
*/
@@ -124,8 +132,6 @@ class WPCF7_Submission {
do_action( 'wpcf7_mail_failed', $contact_form );
}
}
$this->remove_uploaded_files();
};
wpcf7_switch_locale( $this->contact_form->locale(), $callback );