Changeset 25450
- Timestamp:
- 09/16/2013 05:39:30 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-login.php
r25231 r25450 315 315 $hasher = new PasswordHash( 8, true ); 316 316 317 // 10 days 318 setcookie( 'wp-postpass_' . COOKIEHASH, $hasher->HashPassword( wp_unslash( $_POST['post_password'] ) ), time() + 10 * DAY_IN_SECONDS, COOKIEPATH ); 317 /** 318 * Filter the life of the post password cookie. 319 * 320 * By default, the cookie expires 10 days from now. 321 * To turn this into a session cookie, return 0. 322 * 323 * @since 3.7.0 324 * @param int $expires The expiry time, as passed to setcookie(). 325 */ 326 $expire = apply_filters( 'post_password_expires', time() + 10 * DAY_IN_SECONDS ); 327 setcookie( 'wp-postpass_' . COOKIEHASH, $hasher->HashPassword( wp_unslash( $_POST['post_password'] ) ), $expire, COOKIEPATH ); 319 328 320 329 wp_safe_redirect( wp_get_referer() );
Note: See TracChangeset
for help on using the changeset viewer.