comment_cookie_lifetime
Filters the lifetime of the comment cookie in seconds.
Description
Parameters (1)
- 0. $int (int) =>
30000000
- The int.
Usage
- To run the hook, copy the example below.
- $int = apply_filters( 'comment_cookie_lifetime', $int );
- if ( !empty( $int ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the comment_cookie_lifetime callback
- function filter_comment_cookie_lifetime( $int ) {
- // make filter magic happen here...
- return $int;
- };
- // add the filter
- add_filter( 'comment_cookie_lifetime', 'filter_comment_cookie_lifetime', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'comment_cookie_lifetime', 'filter_comment_cookie_lifetime', 10, 1 );
Defined (2)
The filter is defined in the following location(s).
- /modules/subscriptions.php
- $cookie_lifetime = apply_filters( 'comment_cookie_lifetime', 30000000 );
- /modules/comments/base.php
- $comment_cookie_lifetime = apply_filters( 'comment_cookie_lifetime', 30000000 );