diff --git a/wp-includes/date.php b/wp-includes/date.php index c5896c7f10..de48625280 100644 --- a/wp-includes/date.php +++ b/wp-includes/date.php @@ -298,10 +298,6 @@ class WP_Date_Query { $valid = $this->validate_date_values( $date_query['after'] ); } - // Message template for the min-max-check. - /* translators: Date query invalid date message: 1: invalid value, 2: type of value, 3: minimum valid value, 4: maximum valid value */ - $min_max_msg = __( 'Invalid value %1$s for %2$s. Excepted value should between %3$d and %4$d.' ); - // Array containing all min-max checks. $min_max_checks = array(); @@ -387,12 +383,14 @@ class WP_Date_Query { $is_between = $date_query[ $key ] >= $check['min'] && $date_query[ $key ] <= $check['max']; if ( ! $is_between ) { + $error = sprintf( - $min_max_msg, - esc_html( $date_query[ $key ] ), - $key, - $check['min'], - $check['max'] + /* translators: Date query invalid date message: 1: invalid value, 2: type of value, 3: minimum valid value, 4: maximum valid value */ + __( 'Invalid value %1$s for %2$s. Expected value should between %3$s and %4$s.' ), + '' . esc_html( $date_query[ $key ] ) . '', + '' . esc_html( $key ) . '', + '' . esc_html( $check['min'] ) . '', + '' . esc_html( $check['max'] ) . '' ); _doing_it_wrong( __CLASS__, $error, '4.1.0' ); @@ -417,10 +415,10 @@ class WP_Date_Query { if ( ! checkdate( $date_query['month'], $date_query['day'], $date_query['year'] ) ) { /* translators: 1: year, 2: month, 3: day of month */ $day_month_year_error_msg = sprintf( - __( 'The following values do not describe a valid date: year %1$s, month %2$s, day %3$s.' ), - esc_html( $date_query['year'] ), - esc_html( $date_query['month'] ), - esc_html( $date_query['day'] ) + __( 'The following values do not describe a valid date: year %1$s, month %2$s, day %3$s.' ), + '' . esc_html( $date_query['year'] ) . '', + '' . esc_html( $date_query['month'] ) . '', + '' . esc_html( $date_query['day'] ) . '' ); $valid = false; diff --git a/wp-includes/version.php b/wp-includes/version.php index 7fa19cb21e..66eee2ce4d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30299'; +$wp_version = '4.1-alpha-30300'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.