-
-
Save pippinsplugins/901bca4b7b13deddd4f7 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 member edit screen | |
* | |
*/ | |
function pw_rcp_add_member_edit_fields( $user_id = 0 ) { | |
$profession = get_user_meta( $user_id, 'rcp_profession', true ); | |
$location = get_user_meta( $user_id, 'rcp_location', true ); | |
?> | |
<tr valign="top"> | |
<th scope="row" valign="top"> | |
<label for="rcp_profession"><?php _e( 'Profession', 'rcp' ); ?></label> | |
</th> | |
<td> | |
<input name="rcp_profession" id="rcp_profession" type="text" value="<?php echo esc_attr( $profession ); ?>"/> | |
<p class="description"><?php _e( 'The member\'s profession', 'rcp' ); ?></p> | |
</td> | |
</tr> | |
<tr valign="top"> | |
<th scope="row" valign="top"> | |
<label for="rcp_location"><?php _e( 'Location', 'rcp' ); ?></label> | |
</th> | |
<td> | |
<input name="rcp_location" id="rcp_location" type="text" value="<?php echo esc_attr( $location ); ?>"/> | |
<p class="description"><?php _e( 'The member\'s location', 'rcp' ); ?></p> | |
</td> | |
</tr> | |
<?php | |
} | |
add_action( 'rcp_edit_member_after', 'pw_rcp_add_member_edit_fields' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment