post_password_expires хук-фильтр . WP 3.7.0
Filters the life span of the post password cookie.
By default, the cookie expires 10 days from creation. To turn this into a session cookie, return 0.
Использование
add_filter( 'post_password_expires', 'filter_function_name_5288' ); function filter_function_name_5288( $expires ){ // filter... return $expires; }
- $expires(число)
- The expiry time, as passed to setcookie().
Список изменений
С версии 3.7.0 | Введена. |
Где вызывается хук
В файле: /wp-login.php
post_password_expires
wp-login.php 779
$expire = apply_filters( 'post_password_expires', time() + 10 * DAY_IN_SECONDS );