Forked from mustardBees/iweb-logout-url-shortcode.php
Created
December 7, 2018 09:55
-
-
Save CodeCurosity/68d537d4d78fb9845166a4c642717e53 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