Extend auto logout period

WordPress Tutorial – Adding this PHP code to the functions.php of your wordpress theme will extend the length of time cookies are kept the example is set to 1 week. Please note the value is defined in seconds.


function logged_in( $expirein ) {
return 604800; // 1 week in seconds
add_filter( 'auth_cookie_expiration', 'logged_in' );

Leave a comment