Contact Form 7 - Version 5.1.9

Version Description

  • Special mail-tags: Reflects WP timezone to [_date] and [_time] mail-tags.
  • WPCF7_FormTag: Reflects WP timezone to get_date_option() output.
  • User input validation: Strictly compares to boolean false.
Download this release

Release Info

Developer takayukister
Plugin Icon 128x128 Contact Form 7
Version 5.1.9
Comparing to
See all releases

Code changes from version 5.1.8 to 5.1.9

includes/form-tag.php CHANGED
@@ -197,9 +197,14 @@ class WPCF7_FormTag implements ArrayAccess {
197
$unit = 'days';
198
}
199
200
- $date = gmdate( 'Y-m-d',
201
- strtotime( sprintf( 'today %1$s %2$s', $number, $unit ) ) );
202
- return $date;
203
}
204
205
return false;
197
$unit = 'days';
198
}
199
200
+ // Temporary fix until introducing wp_date()
201
+ $today = gmdate( 'Y-m-d',
202
+ time() + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS
203
+ );
204
+
205
+ $format = sprintf( '%1$s %2$s %3$s', $today, $number, $unit );
206
+
207
+ return gmdate( 'Y-m-d', strtotime( $format ) );
208
}
209
210
return false;
includes/special-mail-tags.php CHANGED
@@ -42,6 +42,10 @@ function wpcf7_special_mail_tag( $output, $name, $html ) {
42
if ( '_date' == $name
43
or '_time' == $name ) {
44
if ( $timestamp = $submission->get_meta( 'timestamp' ) ) {
45
if ( '_date' == $name ) {
46
return date_i18n( get_option( 'date_format' ), $timestamp );
47
}
42
if ( '_date' == $name
43
or '_time' == $name ) {
44
if ( $timestamp = $submission->get_meta( 'timestamp' ) ) {
45
+
46
+ // Temporary fix until introducing wp_date()
47
+ $timestamp += get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
48
+
49
if ( '_date' == $name ) {
50
return date_i18n( get_option( 'date_format' ), $timestamp );
51
}
modules/number.php CHANGED
@@ -106,9 +106,9 @@ function wpcf7_number_validation_filter( $result, $tag ) {
106
$result->invalidate( $tag, wpcf7_get_message( 'invalid_required' ) );
107
} elseif ( '' !== $value and ! wpcf7_is_number( $value ) ) {
108
$result->invalidate( $tag, wpcf7_get_message( 'invalid_number' ) );
109
- } elseif ( '' !== $value and '' !== $min and (float) $value < (float) $min ) {
110
$result->invalidate( $tag, wpcf7_get_message( 'number_too_small' ) );
111
- } elseif ( '' !== $value and '' !== $max and (float) $max < (float) $value ) {
112
$result->invalidate( $tag, wpcf7_get_message( 'number_too_large' ) );
113
}
114
106
$result->invalidate( $tag, wpcf7_get_message( 'invalid_required' ) );
107
} elseif ( '' !== $value and ! wpcf7_is_number( $value ) ) {
108
$result->invalidate( $tag, wpcf7_get_message( 'invalid_number' ) );
109
+ } elseif ( '' !== $value and false !== $min and (float) $value < (float) $min ) {
110
$result->invalidate( $tag, wpcf7_get_message( 'number_too_small' ) );
111
+ } elseif ( '' !== $value and false !== $max and (float) $max < (float) $value ) {
112
$result->invalidate( $tag, wpcf7_get_message( 'number_too_large' ) );
113
}
114
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://contactform7.com/donate/
4
Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, multilingual
5
Requires at least: 4.9
6
Tested up to: 5.4
7
- Stable tag: 5.1.8
8
License: GPLv2 or later
9
License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
@@ -75,6 +75,12 @@ 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.1.8 =
79
80
* reCAPTCHA: Shows no warning on upgrading from v2 if the global sitekey is defined.
4
Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, multilingual
5
Requires at least: 4.9
6
Tested up to: 5.4
7
+ Stable tag: 5.1.9
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.1.9 =
79
+
80
+ * Special mail-tags: Reflects WP timezone to `[_date]` and `[_time]` mail-tags.
81
+ * WPCF7_FormTag: Reflects WP timezone to `get_date_option()` output.
82
+ * User input validation: Strictly compares to boolean _false_.
83
+
84
= 5.1.8 =
85
86
* reCAPTCHA: Shows no warning on upgrading from v2 if the global sitekey is defined.
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.1.8
11
*/
12
13
- define( 'WPCF7_VERSION', '5.1.8' );
14
15
define( 'WPCF7_REQUIRED_WP_VERSION', '4.9' );
16
7
Author URI: https://ideasilo.wordpress.com/
8
Text Domain: contact-form-7
9
Domain Path: /languages/
10
+ Version: 5.1.9
11
*/
12
13
+ define( 'WPCF7_VERSION', '5.1.9' );
14
15
define( 'WPCF7_REQUIRED_WP_VERSION', '4.9' );
16