Version Description
- Flamingo: Passes the
last_contacted
parameter based on the submission timestamp.
Download this release
Release Info
Developer | takayukister |
Plugin | Contact Form 7 |
Version | 5.3.1 |
Comparing to | |
See all releases |
Code changes from version 5.3 to 5.3.1
- modules/constant-contact.php +5 -5
- modules/flamingo.php +11 -1
- modules/recaptcha/recaptcha.php +2 -2
- readme.txt +6 -2
- wp-contact-form-7.php +2 -2
modules/constant-contact.php
CHANGED
@@ -6,7 +6,7 @@ function wpcf7_constant_contact_register_service() {
|
|
6 |
$integration = WPCF7_Integration::get_instance();
|
7 |
|
8 |
$integration->add_category( 'email_marketing',
|
9 |
-
__( 'Email
|
10 |
|
11 |
$service = WPCF7_ConstantContact::get_instance();
|
12 |
$integration->add_service( 'constant_contact', $service );
|
@@ -459,20 +459,20 @@ class WPCF7_ConstantContact extends WPCF7_Service_OAuth2 {
|
|
459 |
switch ( $message ) {
|
460 |
case 'success':
|
461 |
echo sprintf(
|
462 |
-
'<div class="
|
463 |
esc_html( __( "Connection established.", 'contact-form-7' ) )
|
464 |
);
|
465 |
break;
|
466 |
case 'failed':
|
467 |
echo sprintf(
|
468 |
-
'<div class="
|
469 |
esc_html( __( "Error", 'contact-form-7' ) ),
|
470 |
esc_html( __( "Failed to establish connection. Please double-check your configuration.", 'contact-form-7' ) )
|
471 |
);
|
472 |
break;
|
473 |
case 'updated':
|
474 |
echo sprintf(
|
475 |
-
'<div class="
|
476 |
esc_html( __( "Configuration updated.", 'contact-form-7' ) )
|
477 |
);
|
478 |
break;
|
@@ -487,7 +487,7 @@ class WPCF7_ConstantContact extends WPCF7_Service_OAuth2 {
|
|
487 |
'https://contactform7.com/constant-contact-integration/',
|
488 |
'contact-form-7'
|
489 |
),
|
490 |
-
__( 'Constant Contact
|
491 |
)
|
492 |
) . '</p>';
|
493 |
|
6 |
$integration = WPCF7_Integration::get_instance();
|
7 |
|
8 |
$integration->add_category( 'email_marketing',
|
9 |
+
__( 'Email marketing', 'contact-form-7' ) );
|
10 |
|
11 |
$service = WPCF7_ConstantContact::get_instance();
|
12 |
$integration->add_service( 'constant_contact', $service );
|
459 |
switch ( $message ) {
|
460 |
case 'success':
|
461 |
echo sprintf(
|
462 |
+
'<div class="notice notice-success is-dismissible"><p>%s</p></div>',
|
463 |
esc_html( __( "Connection established.", 'contact-form-7' ) )
|
464 |
);
|
465 |
break;
|
466 |
case 'failed':
|
467 |
echo sprintf(
|
468 |
+
'<div class="notice notice-error is-dismissible"><p><strong>%1$s</strong>: %2$s</p></div>',
|
469 |
esc_html( __( "Error", 'contact-form-7' ) ),
|
470 |
esc_html( __( "Failed to establish connection. Please double-check your configuration.", 'contact-form-7' ) )
|
471 |
);
|
472 |
break;
|
473 |
case 'updated':
|
474 |
echo sprintf(
|
475 |
+
'<div class="notice notice-success is-dismissible"><p>%s</p></div>',
|
476 |
esc_html( __( "Configuration updated.", 'contact-form-7' ) )
|
477 |
);
|
478 |
break;
|
487 |
'https://contactform7.com/constant-contact-integration/',
|
488 |
'contact-form-7'
|
489 |
),
|
490 |
+
__( 'Constant Contact integration', 'contact-form-7' )
|
491 |
)
|
492 |
) . '</p>';
|
493 |
|
modules/flamingo.php
CHANGED
@@ -65,10 +65,20 @@ function wpcf7_flamingo_submit( $contact_form, $result ) {
|
|
65 |
$akismet = isset( $submission->akismet )
|
66 |
? (array) $submission->akismet : null;
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
if ( 'mail_sent' == $result['status'] ) {
|
69 |
$flamingo_contact = Flamingo_Contact::add( array(
|
70 |
'email' => $email,
|
71 |
'name' => $name,
|
|
|
72 |
) );
|
73 |
}
|
74 |
|
@@ -114,7 +124,7 @@ function wpcf7_flamingo_submit( $contact_form, $result ) {
|
|
114 |
'akismet' => $akismet,
|
115 |
'spam' => ( 'spam' == $result['status'] ),
|
116 |
'consent' => $submission->collect_consent(),
|
117 |
-
'timestamp' => $
|
118 |
'posted_data_hash' => $submission->get_posted_data_hash(),
|
119 |
);
|
120 |
|
65 |
$akismet = isset( $submission->akismet )
|
66 |
? (array) $submission->akismet : null;
|
67 |
|
68 |
+
$timestamp = $submission->get_meta( 'timestamp' );
|
69 |
+
|
70 |
+
if ( $timestamp and $datetime = date_create( '@' . $timestamp ) ) {
|
71 |
+
$datetime->setTimezone( wp_timezone() );
|
72 |
+
$last_contacted = $datetime->format( 'Y-m-d H:i:s' );
|
73 |
+
} else {
|
74 |
+
$last_contacted = '0000-00-00 00:00:00';
|
75 |
+
}
|
76 |
+
|
77 |
if ( 'mail_sent' == $result['status'] ) {
|
78 |
$flamingo_contact = Flamingo_Contact::add( array(
|
79 |
'email' => $email,
|
80 |
'name' => $name,
|
81 |
+
'last_contacted' => $last_contacted,
|
82 |
) );
|
83 |
}
|
84 |
|
124 |
'akismet' => $akismet,
|
125 |
'spam' => ( 'spam' == $result['status'] ),
|
126 |
'consent' => $submission->collect_consent(),
|
127 |
+
'timestamp' => $timestamp,
|
128 |
'posted_data_hash' => $submission->get_posted_data_hash(),
|
129 |
);
|
130 |
|
modules/recaptcha/recaptcha.php
CHANGED
@@ -414,13 +414,13 @@ class WPCF7_RECAPTCHA extends WPCF7_Service {
|
|
414 |
public function admin_notice( $message = '' ) {
|
415 |
if ( 'invalid' == $message ) {
|
416 |
echo sprintf(
|
417 |
-
'<div class="
|
418 |
esc_html( __( "Error", 'contact-form-7' ) ),
|
419 |
esc_html( __( "Invalid key values.", 'contact-form-7' ) ) );
|
420 |
}
|
421 |
|
422 |
if ( 'success' == $message ) {
|
423 |
-
echo sprintf( '<div class="
|
424 |
esc_html( __( 'Settings saved.', 'contact-form-7' ) ) );
|
425 |
}
|
426 |
}
|
414 |
public function admin_notice( $message = '' ) {
|
415 |
if ( 'invalid' == $message ) {
|
416 |
echo sprintf(
|
417 |
+
'<div class="notice notice-error is-dismissible"><p><strong>%1$s</strong>: %2$s</p></div>',
|
418 |
esc_html( __( "Error", 'contact-form-7' ) ),
|
419 |
esc_html( __( "Invalid key values.", 'contact-form-7' ) ) );
|
420 |
}
|
421 |
|
422 |
if ( 'success' == $message ) {
|
423 |
+
echo sprintf( '<div class="notice notice-success is-dismissible"><p>%s</p></div>',
|
424 |
esc_html( __( 'Settings saved.', 'contact-form-7' ) ) );
|
425 |
}
|
426 |
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: takayukister
|
|
3 |
Donate link: https://contactform7.com/donate/
|
4 |
Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, multilingual
|
5 |
Requires at least: 5.4
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -75,6 +75,10 @@ Do you have questions or issues with Contact Form 7? Use these support channels
|
|
75 |
|
76 |
For more information, see [Releases](https://contactform7.com/category/releases/).
|
77 |
|
|
|
|
|
|
|
|
|
78 |
= 5.3 =
|
79 |
|
80 |
* Block Editor: Introduces the contact form selector block type.
|
3 |
Donate link: https://contactform7.com/donate/
|
4 |
Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, multilingual
|
5 |
Requires at least: 5.4
|
6 |
+
Tested up to: 5.6
|
7 |
+
Stable tag: 5.3.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
75 |
|
76 |
For more information, see [Releases](https://contactform7.com/category/releases/).
|
77 |
|
78 |
+
= 5.3.1 =
|
79 |
+
|
80 |
+
* Flamingo: Passes the `last_contacted` parameter based on the submission timestamp.
|
81 |
+
|
82 |
= 5.3 =
|
83 |
|
84 |
* Block Editor: Introduces the contact form selector block type.
|
wp-contact-form-7.php
CHANGED
@@ -7,10 +7,10 @@ Author: Takayuki Miyoshi
|
|
7 |
Author URI: https://ideasilo.wordpress.com/
|
8 |
Text Domain: contact-form-7
|
9 |
Domain Path: /languages/
|
10 |
-
Version: 5.3
|
11 |
*/
|
12 |
|
13 |
-
define( 'WPCF7_VERSION', '5.3' );
|
14 |
|
15 |
define( 'WPCF7_REQUIRED_WP_VERSION', '5.4' );
|
16 |
|
7 |
Author URI: https://ideasilo.wordpress.com/
|
8 |
Text Domain: contact-form-7
|
9 |
Domain Path: /languages/
|
10 |
+
Version: 5.3.1
|
11 |
*/
|
12 |
|
13 |
+
define( 'WPCF7_VERSION', '5.3.1' );
|
14 |
|
15 |
define( 'WPCF7_REQUIRED_WP_VERSION', '5.4' );
|
16 |
|