Skip to content

Instantly share code, notes, and snippets.

@zanematthew
Created March 4, 2012 03:42
Show Gist options
  • Save zanematthew/1970563 to your computer and use it in GitHub Desktop.
Save zanematthew/1970563 to your computer and use it in GitHub Desktop.
WordPress Login Form
<?php
/**
* Template for login form.
*
* Submission is handled via ajax, see @package zm-wordpress-helpers for
* server side code. See the function call in zm_register_login_submit()
* for form processing.
*
* @uses zm_register_login_submit()
* @uses wp_lostpassword_url()
* @todo Forgot password should be custom form.
* @package zm-wordpress-helpers
*/
?>
<!-- Login Modal -->
<form action="javascript://" id="login_form" class="form-stacked">
<div class="form-wrapper">
<input type="hidden" name="security" value="<?php print wp_create_nonce( 'tt-ajax-forms' );?>">
<p><input type="text" name="user_name" id="user_name" placeholder="User Name" size="30" /></p>
<p><input type="password" name="password" id="password" placeholder="Password" size="30" /></p>
<p>
<input type="checkbox" name="remember" id="remember" />
<label class="meta">Keep me logged in.</label>
<span class="bar"></span><a href="<?php echo wp_lostpassword_url(); ?>" title="Lost Password">Lost Password</a>
</p>
</div>
<div class="button-container">
<input id="login_button" class="button green" type="submit" value="Submit" accesskey="p" name="submit" />
<input class="text cancel" type="button" value="Exit" name="exit" />
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment