Created
September 6, 2012 07:15
-
-
Save bueltge/3652459 to your computer and use it in GitHub Desktop.
Set the time that the cookie in WordPress will be kept at 1 year.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Keep me Logged In for 1 Year | |
* Plugin URI: http://bueltge.de/wordpress-login-unterbinden/1220/ | |
* Description: Set the time that the cookie will be kept at 1 year. | |
* Version: 0.0.1 | |
* Author: Frank Bültge | |
* Author URI: http://bueltge.de/ | |
*/ | |
if ( ! function_exists( 'keep_me_logged_in_for_1_year' ) ) { | |
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