configure the duration of cookies wordpress_sec_
-
Hello, I am interested in never closing the session started. So I found out that if there are two cookies
wordpress_sec_[hash]
which has an Expires: Session parameter and is set when you log in along with others.Well, if I close the browser and open it again I will have to log in again with my credentials but if I manually modify the Expires parameter of the wordpress_sec_[hash] for one year from the console, for example, then the session lasts.
I tried to use a snippet:
add_filter ( 'auth_cookie_expiration', 'wpdev_login_session' ); function wpdev_login_session( $expire ) { return YEAR_IN_SECONDS; }
but this snippet doesn’t change any of those cookies at all and has no effect on the length of the user’s session, at least in my case.
So, is there a way to modify the Expires parameter of the
wordpress_sec_[hash]
cookies through a filter?
- The topic ‘configure the duration of cookies wordpress_sec_’ is closed to new replies.