wp_clearcookie

Clears the authentication cookie, logging the user out.

Description

wp_clearcookie(); 

This function is deprecated.


Usage

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

Defined (1)

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

/wp-includes/pluggable-deprecated.php  
  1. function wp_clearcookie() { 
  2. _deprecated_function( __FUNCTION__, '2.5.0', 'wp_clear_auth_cookie()' );