wp_logout

Log the current user out.

Description

wp_logout(); 

Usage

  1. if ( !function_exists( 'wp_logout' ) ) { 
  2. require_once ABSPATH . WPINC . '/pluggable.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wp_logout(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/pluggable.php  
  1. function wp_logout() { 
  2.  
  3. /** 
  4. * Fires after a user is logged-out. 
  5. * @since 1.5.0 
  6. */