Changes between Initial Version and Version 1 of Ticket #39903, comment 3
- Timestamp:
- 03/05/2017 02:19:47 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #39903, comment 3
initial v1 3 3 {{{#!php 4 4 <?php 5 if ( wp_doing_ajax() && !empty( $_POST['action'] ) ){5 if ( wp_doing_ajax() && !empty( $_POST['action'] ) ) { 6 6 add_action( 'wp_ajax_' . $_POST['action'], 'check_session_token_ajax', 1 ); 7 7 add_action( 'wp_ajax_nopriv_' . $_POST['action'], 'check_session_token_ajax', 1 ); 8 8 } 9 9 10 function check_session_token_ajax() {10 function check_session_token_ajax() { 11 11 12 if ( is_user_logged_in() && ! wp_get_session_token() ){12 if ( is_user_logged_in() && ! wp_get_session_token() ) { 13 13 wp_set_current_user( 0 ); 14 wp_clear_auth_cookie(); 14 15 } 15 16