W3cubDocs

/WordPress

apply_filters( ‘comment_cookie_lifetime’, int $seconds )

Filters the lifetime of the comment cookie in seconds.

Parameters

$secondsint
Comment cookie lifetime. Default YEAR_IN_SECONDS.

Source

$comment_cookie_lifetime = time() + apply_filters( 'comment_cookie_lifetime', YEAR_IN_SECONDS );

Changelog

Version Description
6.6.0 The default $seconds value changed from 30000000 to YEAR_IN_SECONDS.
2.8.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/comment_cookie_lifetime