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

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -