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.


git-svn-id: https://develop.svn.wordpress.org/trunk@58401 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Aaron Jorbin 2024-06-13 13:03:15 +00:00
parent 7f70d68353
commit d4688047b9

View File

@ -557,10 +557,11 @@ function wp_set_comment_cookies( $comment, $user, $cookies_consent = true ) {
* Filters the lifetime of the comment cookie in seconds.
*
* @since 2.8.0
* @since 6.6.0 The default $seconds value changed from 30000000 to YEAR_IN_SECONDS.
*
* @param int $seconds Comment cookie lifetime. Default 30000000.
* @param int $seconds Comment cookie lifetime. Default YEAR_IN_SECONDS.
*/
$comment_cookie_lifetime = time() + apply_filters( 'comment_cookie_lifetime', 30000000 );
$comment_cookie_lifetime = time() + apply_filters( 'comment_cookie_lifetime', YEAR_IN_SECONDS );
$secure = ( 'https' === parse_url( home_url(), PHP_URL_SCHEME ) );