Make WordPress Core

Changeset 57532


Ignore:
Timestamp:
02/05/2024 03:40:25 AM (8 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Rename the $expires_offset variable in cache_javascript_headers().

This resolves a WPCS warning:

Variable "$expiresOffset" is not in valid snake_case format, try "$expires_offset"

Follow-up to [4109], [21996].

See #59650.

File:
1 edited

Legend:

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

    r57524 r57532  
    15491549 */
    15501550function cache_javascript_headers() {
    1551     $expiresOffset = 10 * DAY_IN_SECONDS;
     1551    $expires_offset = 10 * DAY_IN_SECONDS;
    15521552
    15531553    header( 'Content-Type: text/javascript; charset=' . get_bloginfo( 'charset' ) );
    15541554    header( 'Vary: Accept-Encoding' ); // Handle proxies.
    1555     header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expiresOffset ) . ' GMT' );
     1555    header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' );
    15561556}
    15571557
Note: See TracChangeset for help on using the changeset viewer.