Make WordPress Core

Changeset 58401


Ignore:
Timestamp:
06/13/2024 01:03:15 PM (6 weeks ago)
Author:
jorbin
Message:

Comments: Expire comment author cookies after 1 year (rather than 0.95129375951 of a year)

This filter was originally added in [19622] which predates the addition of the constant added in [21996] by 24085717 seconds.

Props peterwilsoncc, khokansardar, krupalpanchal.
Fixes #61412.

File:
1 edited

Legend:

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

    r57648 r58401  
    558558     *
    559559     * @since 2.8.0
    560      *
    561      * @param int $seconds Comment cookie lifetime. Default 30000000.
    562      */
    563     $comment_cookie_lifetime = time() + apply_filters( 'comment_cookie_lifetime', 30000000 );
     560     * @since 6.6.0 The default $seconds value changed from 30000000 to YEAR_IN_SECONDS.
     561     *
     562     * @param int $seconds Comment cookie lifetime. Default YEAR_IN_SECONDS.
     563     */
     564    $comment_cookie_lifetime = time() + apply_filters( 'comment_cookie_lifetime', YEAR_IN_SECONDS );
    564565
    565566    $secure = ( 'https' === parse_url( home_url(), PHP_URL_SCHEME ) );
Note: See TracChangeset for help on using the changeset viewer.