Home/Hooks/auth_cookie_expiration
FILTER

auth_cookie_expiration

This filter is documented in wp-includes/pluggable.php

wp-includes/user.php
Line 2856
3 Parameters
View Source

Usage

add_filter( 'auth_cookie_expiration', 'your_callback_function', 10, 3 );

Filter Callback:

function your_callback_function( 2 * DAY_IN_SECONDS, $user_id, false ) {
    // Your code here
    return 2 * DAY_IN_SECONDS;
}

Parameters

2 * DAY_IN_SECONDS

Parameter 1

$user_id

Parameter 2

false

Parameter 3

🔄 Filter Hook

Filter hooks allow you to modify data before it is saved to the database or displayed on the screen. Filters must return a value.