Skip to content

Instantly share code, notes, and snippets.

@tmort
Created January 28, 2013 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tmort/4655945 to your computer and use it in GitHub Desktop.
Save tmort/4655945 to your computer and use it in GitHub Desktop.
Modify WP auto-logout duration
<?php
add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );
function keep_me_logged_in_for_1_year( $expirein ) {
return 31556926; // 1 year in seconds
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment