Skip to content

Commit

Permalink
Merge pull request #2439 from dgw/login-form-hooks
Browse files Browse the repository at this point in the history
Add top, bottom, and end hooks to the login form
  • Loading branch information
ozh committed Sep 18, 2018
2 parents 9c0609a + 33e78ef commit e3475da
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions includes/functions-html.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ function yourls_login_screen( $error_msg = '' ) {
if( !empty( $error_msg ) ) { if( !empty( $error_msg ) ) {
echo '<p class="error">'.$error_msg.'</p>'; echo '<p class="error">'.$error_msg.'</p>';
} }
yourls_do_action( 'login_form_top' );
?> ?>
<p> <p>
<label for="username"><?php yourls_e( 'Username' ); ?></label><br /> <label for="username"><?php yourls_e( 'Username' ); ?></label><br />
Expand All @@ -736,9 +737,15 @@ function yourls_login_screen( $error_msg = '' ) {
<label for="password"><?php yourls_e( 'Password' ); ?></label><br /> <label for="password"><?php yourls_e( 'Password' ); ?></label><br />
<input type="password" id="password" name="password" size="30" class="text" /> <input type="password" id="password" name="password" size="30" class="text" />
</p> </p>
<?php
yourls_do_action( 'login_form_bottom' );
?>
<p style="text-align: right;"> <p style="text-align: right;">
<input type="submit" id="submit" name="submit" value="<?php yourls_e( 'Login' ); ?>" class="button" /> <input type="submit" id="submit" name="submit" value="<?php yourls_e( 'Login' ); ?>" class="button" />
</p> </p>
<?php
yourls_do_action( 'login_form_end' );
?>
</form> </form>
<script type="text/javascript">$('#username').focus();</script> <script type="text/javascript">$('#username').focus();</script>
</div> </div>
Expand Down

0 comments on commit e3475da

Please sign in to comment.