A WordPress-centric search engine for devs and theme authors



delete_all_user_settings ›

Since2.7.0
Deprecatedn/a
delete_all_user_settings ( No parameters )
Defined at:
Codex:

Delete the user settings of the current user.



Source

function delete_all_user_settings() {
	if ( ! $user_id = get_current_user_id() ) {
		return;
	}

	update_user_option( $user_id, 'user-settings', '', false );
	setcookie( 'wp-settings-' . $user_id, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH );
}