Created
July 21, 2012 13:23
-
-
Save gyrus/3155816 to your computer and use it in GitHub Desktop.
WordPress login link
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
<?php | |
/** | |
* Nice WordPress admin login link | |
*/ | |
function pilau_wp_login_link() { | |
if ( is_user_logged_in() ) { | |
echo '<a href="/wp-admin/">' . __( 'Admin' ) . '</a>'; | |
} else { | |
echo '<a href="' . wp_login_url() . '">' . __( 'Login' ) . '</a>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment