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.
[html]</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>[/html]
Original link: WordPress logout.
-
Buy Premium Version
Commercial License: All sizes and formats,
vector sources, commercial license
Full
DesignShock
Bundle
Get all our collections. Expand
- . More than 2 million individual icons
all grouped in 770 sets with vector source files. - . All icons area editable in their respective source file.
- . 990+ templates and counting.
- . 100.000 design elements.
- . 350+ wordpress themes always up-to-date with latest wp version.
- . 400+ pre-designed Wordpress and HTML themes.
- . support 24/7
- . Weekly updates