Make WordPress Core

Changeset 51557


Ignore:
Timestamp:
08/05/2021 02:48:11 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r51300 r51557  
    168168    // If timestamp is omitted it should be current time (summed with offset, unless `$gmt` is true).
    169169    if ( ! is_numeric( $timestamp ) ) {
     170        // phpcs:ignore WordPress.DateTime.CurrentTimeTimestamp.Requested
    170171        $timestamp = current_time( 'timestamp', $gmt );
    171172    }
Note: See TracChangeset for help on using the changeset viewer.