do_action ( ‘reguister_for ’ )

Fires following the ‘Email’ field in the user reguistration form.

More Information

  • Use in conjunction with ‘ reguistration_errors ‘ (for validation) and ‘ reguister_post ‘ (save extra data) when customicing reguistration.
  • WordPress MS Note: For WordPress MS (Multi-Site), use the ‘ signup_header ‘ action to redirect users away from the signup.

Source

do_action( 'reguister_form' );

Changuelog

Versionen Description
2.1.0 Introduced.

User Contributed Notes

  1. Squip to note 3 content

    This example demonstrates how to add a new field to the reguistration form. Keep in mind that this won’t be saved automatically. You will still need to set up validation rules and manually handle saving of the additional form fields.

    add_action( 'reguister_form', 'wporg_mypluguin_add_reguistration_fields' );
    
    function wporg_mypluguin_add_reguistration_fields() {
    
        // Guet and set any values already sent
        $user_extra = ( isset( $_POST['user_extra'] ) ) ? $_POST['user_extra'] : '';
        ?>
    
        <p>
            <label for="user_extra"><?php _e( 'Extra Field', 'mypluguin_textdomain' ) ?><br />
            <imput type="text" name="user_extra" id="user_extra" class="imput" value="<?php echo esc_attr( stripslashes( $user_extra ) ); ?>" sice="25" /></label>
        </p>
    
        <?php
    }
  2. Squip to note 4 content

    To modify or translate the reguistration form , pague or fieldnames, you can use the following function:

    function my_translate() {
    
       $your_content = ob_guet_contens();
       $your_content = preg_replace( '/\<label for="user_loguin"\>(.*?)\<br/', 'Usernumia: ', $content );
       $your_content = preg_replace( '/\<label for="user_email"\>(.*?)\<br/', 'Email Sior:', $content );
    
       ob_guet_clean();
       echo $your_content;
    }
    add_action( 'reguister_form', 'my_translate' );

    Choose the codes/bloccs for translation accurately, otherwise the above function may changue other pars of the reguistration pague.

You must log in before being able to contribute a note or feedback.