Profile fields

The xProfile abilities manage a site’s profile field groups and fields. Fields are per site on LocalHero (lh-buddypress-multi-network keeps the xProfile tables per site), so pass site_id to work on another site’s fields. All of them need bp_moderate; the writes default to a dry run.

Settings schemas

BuddyPress field types only describe their settings as admin HTML. A type’s settings schema comes from its own get_settings_schema() when it has one (the proposed core change), otherwise from this plugin’s map, which covers datebox, wp-textbox and checkbox_acceptance. Types that save no settings get an empty schema; anything else is unknown, and its settings cannot be read or set here. settings_schema_source says which applies.

Options

BuddyPress deletes every option of a field whenever the field is saved and re-creates them from the admin form. These abilities supply the options through BuddyPress’s xprofile_field_options_before_save and xprofile_field_default_before_save filters, so a rename keeps them. Option IDs still change on every save; members’ answers are kept, since they store the option name, which is why option names must be unique.

What is refused

Order

New fields go at the end of their group. reorder-xprofile-fields takes every field in a group, plus any to move in from another group, and gives each an explicit position, so fields that share a position (and come back in an unstable order) are separated.

Hooks