hook - If the Wordpress session has timed out then run function -
i found examople:
add_action( 'auth_cookie_expired', 'action_auth_cookie_expired' ); // define auth_cookie_expired callback function action_auth_cookie_expired( $rest_cookie_collect_status ) { echo 'ok'; wp_redirect( '/' ); };
but not work, when session timeout, , see popup login window
add_action( 'auth_cookie_expired', 'action_auth_cookie_expired' ); // define auth_cookie_expired callback function action_auth_cookie_expired( $rest_cookie_collect_status ) { // set login session limit in seconds return year_in_seconds; // return month_in_seconds; // return day_in_seconds; // return hour_in_seconds; echo 'ok'; wp_redirect( '/' ); }
please modify code according above code:
Comments
Post a Comment