Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #38336


Ignore:
Timestamp:
07/20/2021 04:26:30 PM (2 years ago)
Author:
sabernhardt
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #38336 – Description

    initial v2  
    1 Currently there are action hooks that fire in the login forms after the fields have been loaded into the form.  This allows new fields, new text, additional verfication fields such as CAPTCHA, etc to be added after the username/email/password fields.
     1Currently there are action hooks that fire in the login forms after the fields have been loaded into the form.  This allows new fields, new text, additional verification fields such as CAPTCHA, etc to be added after the username/email/password fields.
    22
    33However, currently there is not an easy way to add new fields to the top of the forms before the username/email/password fields without building a custom form. 
     
    77In wp-login.php the login forms have the following action hooks:
    88
    9 in form name="registerform"
    10 do_action( 'login_form' );
     9in form name="loginform"
     10`do_action( 'login_form' );`
    1111
    1212in form name="lostpasswordform"
    13 do_action( 'lostpassword_form' );
     13`do_action( 'lostpassword_form' );`
    1414
    1515in form name="registerform"
    16 do_action( 'register_form' );
     16`do_action( 'register_form' );`
    1717
    1818in form name="resetpassform"
    19 do_action( 'resetpass_form', $user );
     19`do_action( 'resetpass_form', $user );`
    2020
    2121
    2222I am requesting new additional action hooks to be created and placed at the top of each of the forms before any fields are defined.
    2323
    24 For example, in 'form name="registerform"' a new action hook such as 'do_action( 'login_form_top' )' to appear directly after the form html line as follows:
     24For example, in `form name="registerform"` a new action hook such as `do_action( 'login_form_top' )` to appear directly after the form html line as follows:
    2525
     26{{{
    2627<form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
    2728
     
    4041        </p>
    4142    ...
    42    
     43}}}
     44
    4345The other forms (lostpasswordform, registerform and resetpassform) would be updated with similar action hooks at the top of each form.