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

Popular posts from this blog

cron - how to properly run Python script with crontab on every system startup -

elasticsearch - Is the order of operations guaranteed in a bulk update? -

Slow performance first queries on SQL Azure -