Last active
June 2, 2021 14:17
-
-
Save hamidrezayazdani/2281e1a1de0937359ae04ca9bac1e6be to your computer and use it in GitHub Desktop.
Wordpress remember me cookie lifetime
This file contains 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 | |
/** | |
* Hook on auth_cookie_expiration | |
* The code goes in your theme/child theme functions.php | |
* You can also use this plugin: https://wordpress.org/plugins/code-snippets/ | |
*/ | |
add_filter ( 'auth_cookie_expiration', 'ywp_change_remember_me' ); | |
function ywp_change_remember_me( $expire ) { | |
return YEAR_IN_SECONDS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment