Guest User

Untitled

a guest
Dec 17th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. <?php
  2. function my_custom_section_registration() {
  3. ?>
  4. <div id="sa-interest-opt-in" class="register-section checkbox">
  5.  
  6. <label><input type="text" name="my_custom_input" id="my_custom_input" /> Label text.</label>
  7.  
  8. </div>
  9. <?php
  10. }
  11. add_action( 'bp_before_registration_submit_buttons', 'my_custom_section_registration' );
  12.  
  13. /**
  14. * Update usermeta with custom registration data
  15. * @since 0.1
  16. */
  17. function my_custom_registration_fields_handler( $user_id ) {
  18.  
  19. if ( isset( $_POST['my_custom_input'] ) ) {
  20. // Do something
  21. }
  22. }
  23. add_action( 'bp_core_signup_user', 'my_custom_registration_fields_handler' );
Add Comment
Please, Sign In to add comment