WordPress开发者和主题制作者的搜索引擎



post_password_expires ›

Since3.7.0
已弃用n/a
apply_filters( 'post_password_expires', time()
参数:
  • (int) $expires The expiry time, as passed to setcookie().
    Required: Yes
定义在:
文档:

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.





源码

$expire  = apply_filters( 'post_password_expires', time() + 10 * DAY_IN_SECONDS );