delete_all_user_settings

Delete the user settings of the current user.

Description

delete_all_user_settings(); 

Usage

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

Defined (1)

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

/wp-includes/option.php  
  1. function delete_all_user_settings() { 
  2. if ( ! $user_id = get_current_user_id() ) { 
  3. return; 
  4.  
  5. update_user_option( $user_id, 'user-settings', '', false ); 
  6. setcookie( 'wp-settings-' . $user_id, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH );