-
-
Save pippinsplugins/abaadf3bfa2ded1bf42f 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 profile update | |
* | |
*/ | |
function pw_rcp_save_user_fields_on_profile_save( $user_id ) { | |
if( ! empty( $_POST['rcp_profession'] ) ) { | |
update_user_meta( $user_id, 'rcp_profession', sanitize_text_field( $_POST['rcp_profession'] ) ); | |
} | |
if( ! empty( $_POST['rcp_location'] ) ) { | |
update_user_meta( $user_id, 'rcp_location', sanitize_text_field( $_POST['rcp_location'] ) ); | |
} | |
} | |
add_action( 'rcp_user_profile_updated', 'pw_rcp_save_user_fields_on_profile_save', 10 ); | |
add_action( 'rcp_edit_member', 'pw_rcp_save_user_fields_on_profile_save', 10 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment