-
-
Save pippinsplugins/8477b840a66f7779808b 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 | |
/** | |
* Adds the custom fields to the registration form and profile editor | |
* | |
*/ | |
function pw_rcp_add_user_fields() { | |
$profession = get_user_meta( get_current_user_id(), 'rcp_profession', true ); | |
$location = get_user_meta( get_current_user_id(), 'rcp_location', true ); | |
?> | |
<p> | |
<label for="rcp_profession"><?php _e( 'Your Profession', 'rcp' ); ?></label> | |
<input name="rcp_profession" id="rcp_profession" type="text" value="<?php echo esc_attr( $profession ); ?>"/> | |
</p> | |
<p> | |
<label for="rcp_location"><?php _e( 'Your Location', 'rcp' ); ?></label> | |
<input name="rcp_location" id="rcp_location" type="text" value="<?php echo esc_attr( $location ); ?>"/> | |
</p> | |
<?php | |
} | |
add_action( 'rcp_after_password_registration_field', 'pw_rcp_add_user_fields' ); | |
add_action( 'rcp_profile_editor_after', 'pw_rcp_add_user_fields' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment