wordpress menu logout code example
Example 1: wordpress programmatically logout
wp_destroy_current_session();
wp_clear_auth_cookie();
wp_set_current_user( 0 );
Example 2: wordpress logout
wp_logout()
wp_destroy_current_session();
wp_clear_auth_cookie();
wp_set_current_user( 0 );
wp_logout()