Created
January 25, 2012 10:21
-
-
Save coenjacobs/1675750 to your computer and use it in GitHub Desktop.
Adding a link to wp-login.php via jQuery
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
jQuery( document ).ready(function( $ ) { | |
var href = $("#nav a").attr("href"); | |
var html = '<a href="'+ href +'">First login?</a> - '; | |
$( "#nav" ).prepend( html ); | |
} ); |
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
function custom_login() { | |
echo '<script type="text/javascript" src="'.get_bloginfo( 'url' ).'/wp-includes/js/jquery/jquery.js?ver=1.7.1"></script>'; | |
echo '<script type="text/javascript" src="'.get_bloginfo( 'stylesheet_directory' ).'/assets/js/custom-login.js" /></script>'; | |
} | |
add_action( 'login_head' , 'custom_login' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment