-
-
Save pippinsplugins/94417e3fcf3279be42c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Stores the information submitted during registration | |
* | |
*/ | |
function pw_rcp_save_user_fields_on_register( $posted, $user_id ) { | |
if( ! empty( $posted['rcp_profession'] ) ) { | |
update_user_meta( $user_id, 'rcp_profession', sanitize_text_field( $posted['rcp_profession'] ) ); | |
} | |
if( ! empty( $posted['rcp_location'] ) ) { | |
update_user_meta( $user_id, 'rcp_location', sanitize_text_field( $posted['rcp_location'] ) ); | |
} | |
} | |
add_action( 'rcp_form_processing', 'pw_rcp_save_user_fields_on_register', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment