[buddypress-trac] [BuddyPress Trac] #5500: Date xprofile field enhancement

buddypress-trac noreply at wordpress.org
Tue Aug 30 04:17:01 UTC 2016

#5500: Date xprofile field enhancement
 Reporter:  sooskriszta              |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  2.7
Component:  Extended Profile         |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |

Comment (by boonebgorges):

 [attachment:5500.3.diff] makes two main changes to address problems raised
 during last week's meeting:

 1. In the Dashboard, when selecting the 'datebox' field type and then
 selecting another field type, the field's settings weren't disappearing.
 The current code decides which fields to hide based on an array called
 `supports_options_field_types`, since the assumption is that only field
 types with "options" will need to have a settings section. I changed this
 to `do_settings_section_field_types`, and added a `do_settings_section()`
 method to the field type object; if the field type doesn't declare a
 `do_settings_section` value explicitly, it falls back on
 `supports_options`. @mercime Could you test that this fixes the bug?
 @DJPaul Could you think about this for a moment and let me know whether
 you think it's a reasonable way of handling the presence of settings
 sections for field types?

 2. I've removed the references to `$_POST` in the `admin_save_settings()`
 method of the Datebox field type. Instead, I've organized the form so that
 all settings are in an array `field_settings`;
 `xprofile_admin_manage_field()` then passes the `field_settings` array
 through to `admin_save_settings()`. @DJPaul I'd appreciate your review of
 this, too.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5500#comment:56>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list