Created
February 4, 2013 14:41
-
-
Save mustardBees/4707078 to your computer and use it in GitHub Desktop.
Allows you to place a logout link within the WordPress editor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Return logout URL and redirect to homepage | |
* | |
* Allows you to place a logout link within the WordPress editor. In visual | |
* view set the link to [logout-url], in text view, use | |
* <a href="[logout-url]">logout</a>. | |
* | |
* @author Phil Wylie | |
* @link http://goo.gl/025f5 | |
*/ | |
function iweb_logout_url_shortcode() { | |
return wp_logout_url( home_url() ); | |
} | |
add_shortcode( 'logout-url', 'iweb_logout_url_shortcode' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Excellent, Thanks 👍