Overhaul implementation of xprofile field types
|Reported by:||DJPaul||Owned by:||DJPaul|
|Component:||Component - XProfile||Keywords:||has-patch dev-feedback early|
|Cc:||donmik, vivek@…, shane@…|
Description (last modified by DJPaul)
It's pretty hard to add a new type of profile field to BuddyPress; some plugins such as this one do a good job, but we make it hard because we hardcoded values and checks and templates across several places. Examples of new profile field types might be inspired by HTML5 input types such as number or email (#4694), or a birthday field (#4582), or advanced types like a map/co-ord mashup (#5028).
Places that need changing (currently via actions or filters) when you add a new profile field type are listed below. There may be more, as I'm still re-discovering where everything is:
- Templates in /members/single/profile/edit.php, /members/register.php, BP_XProfile_Field->render_admin_form().
- Logic in bp_core_screen_signup(), xprofile_screen_edit_profile() and xprofile_set_field_data().
I believe profile types should be implemented as a class; there's a lot of places where we can benefit from an object orientated approach to profile field types. And, eventually, I'd like it to be as easy to add a profile field type to BuddyPress as creating a Group extension is. No changes to other files, filters, or actions should be required.
Change History (40)
- Keywords early added
- Milestone changed from Awaiting Review to 2.0
- Owner set to DJPaul
- Status changed from new to assigned