comment_cookie_lifetime
Filters the lifetime of the comment cookie in seconds.
Использование
add_filter( 'comment_cookie_lifetime', 'wp_kama_comment_cookie_lifetime_filter' ); /** * Function for `comment_cookie_lifetime` filter-hook. * * @param int $seconds Comment cookie lifetime. * * @return int */ function wp_kama_comment_cookie_lifetime_filter( $seconds ){ // filter... return $seconds; }
- $seconds(int)
- Comment cookie lifetime.
По умолчанию: 30000000
Список изменений
С версии 2.8.0 | Введена. |
Где вызывается хук
comment_cookie_lifetime
wp-includes/comment.php 563
$comment_cookie_lifetime = time() + apply_filters( 'comment_cookie_lifetime', 30000000 );