Add auth_cookie_expiration filter
git-svn-id: http://svn.automattic.com/wordpress/trunk@10691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
88cab327c9
commit
cf07babee1
|
@ -607,9 +607,9 @@ if ( !function_exists('wp_set_auth_cookie') ) :
|
||||||
*/
|
*/
|
||||||
function wp_set_auth_cookie($user_id, $remember = false, $secure = '') {
|
function wp_set_auth_cookie($user_id, $remember = false, $secure = '') {
|
||||||
if ( $remember ) {
|
if ( $remember ) {
|
||||||
$expiration = $expire = time() + 1209600;
|
$expiration = $expire = time() + apply_filters('auth_cookie_expiration', 1209600, $user_id, $remember);
|
||||||
} else {
|
} else {
|
||||||
$expiration = time() + 172800;
|
$expiration = time() + apply_filters('auth_cookie_expiration', 172800, $user_id, $remember);
|
||||||
$expire = 0;
|
$expire = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue