From 04f4e911dc947509e07453393a5d91aa12ed1831 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 5 Aug 2021 14:49:57 +0000 Subject: [PATCH] Coding Standards: Silence a WPCS warning in `date_i18n()`. This fixes a "Calling `current_time()` with a `$type` of `timestamp` or `U` is strongly discouraged as it will not return a Unix (UTC) timestamp" warning. Props jrf. See #53359. Built from https://develop.svn.wordpress.org/trunk@51557 git-svn-id: http://core.svn.wordpress.org/trunk@51168 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 55282b18df..2b75cfea03 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -167,6 +167,7 @@ function date_i18n( $format, $timestamp_with_offset = false, $gmt = false ) { // If timestamp is omitted it should be current time (summed with offset, unless `$gmt` is true). if ( ! is_numeric( $timestamp ) ) { + // phpcs:ignore WordPress.DateTime.CurrentTimeTimestamp.Requested $timestamp = current_time( 'timestamp', $gmt ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 81b8911837..4a83638610 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51556'; +$wp_version = '5.9-alpha-51557'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.