delete_all_user_settings() WordPress Function
The delete_all_user_settings() function is used to delete all user settings for the current user. This function is useful when you want to reset all user settings to their default values.
delete_all_user_settings() #
Deletes the user settings of the current user.
Source
File: wp-includes/option.php
function delete_all_user_settings() { $user_id = get_current_user_id(); if ( ! $user_id ) { return; } update_user_option( $user_id, 'user-settings', '', false ); setcookie( 'wp-settings-' . $user_id, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.7.0 | Introduced. |