wp_logout()

Log the current user out.


Description Description


Source Source

File: wp-includes/pluggable.php

	function wp_logout() {
		wp_destroy_current_session();
		wp_clear_auth_cookie();
		wp_set_current_user( 0 );

		/**
		 * Fires after a user is logged-out.
		 *
		 * @since 1.5.0
		 */
		do_action( 'wp_logout' );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.