Permalink
Browse files

Merge pull request #2439 from dgw/login-form-hooks

Add top, bottom, and end hooks to the login form
  • Loading branch information...
ozh committed Sep 18, 2018
2 parents 9c0609a + 33e78ef commit e3475da2c45eb963862bd0a17b86be8fe60f5252
Showing with 7 additions and 0 deletions.
  1. +7 −0 includes/functions-html.php
@@ -727,6 +727,7 @@ function yourls_login_screen( $error_msg = '' ) {
if( !empty( $error_msg ) ) {
echo '<p class="error">'.$error_msg.'</p>';
}
yourls_do_action( 'login_form_top' );
?>
<p>
<label for="username"><?php yourls_e( 'Username' ); ?></label><br />
@@ -736,9 +737,15 @@ function yourls_login_screen( $error_msg = '' ) {
<label for="password"><?php yourls_e( 'Password' ); ?></label><br />
<input type="password" id="password" name="password" size="30" class="text" />
</p>
<?php
yourls_do_action( 'login_form_bottom' );
?>
<p style="text-align: right;">
<input type="submit" id="submit" name="submit" value="<?php yourls_e( 'Login' ); ?>" class="button" />
</p>
<?php
yourls_do_action( 'login_form_end' );
?>
</form>
<script type="text/javascript">$('#username').focus();</script>
</div>

0 comments on commit e3475da

Please sign in to comment.