how to use hook signup_extra_fields

This is for wpmu,

how to use hook signup_extra_fields

i have to add first_name and last_name field in wp_signup.php and want to add them in wp_signups, then use them in activation process. Those first_name and last_name were stored in wp_usermeta.

  • Paul
    • The Green Incsub

    Probably the best example is via our own Pro Site plugin

    If you download and view the source you will see example of using the ‘signup_extra_fields’ action hook. As well as the ‘add_signup_meta’ filter when the data needs to be saved.

    In pro-sites.php lines 82-83 should get you started. You can checkout the respective hook functions.

    add_action( ‘signup_extra_fields’, array(&$this, ‘signup_override’:wink: );

    add_filter( ‘add_signup_meta’, array(&$this, ‘signup_save’:wink: );

  • aecnu
    • WP Unicorn

    Greetings Paul and Site Builder,

    @paul A sincere thank you for quick and valuable input which is certainly appreciated.

    Just goes to show I learn something new everyday and your explanation should indeed help our member.

    @site Builder there you have it straight from a lead developer.

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.