Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.