Logout function in WordPress


Everyday we found new functions to implement in our WordPress site to make it faster and easier to use. These functions can range from something as simple as changing a category to embedding custom widgets on it. Today we want to talk about one of the most simple functions that still we tend to overlook, the logout function.

Let’s take a look at some examples of the wp_logout_url() function in WordPress. We can pass the parameter to the URL of destiny that we want to perform the redirection after ending the session.

</p>  <p>// Logout and redirection to the current page from where we have logged out.    <br />wp_logout_url($_SERVER['REQUEST_URI']);     <br />// Logout and redirection to the main page of the domain.     <br />wp_logout_url('/');</p>  <p>

Original link: WordPress logout.

Comments and suggetiions in here

Check The Full DesignShock Bundle