Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/15/2014 12:51:03 PM (12 years ago)
Author:
boonebgorges
Message:

Add 'option' to the whitelist of xprofile field types

The 'option' field type is not full-fledged, in the sense that it has an
associated BP_XProfile_Field_Type class; it is used only to save the values
that are child options of type 'radio', 'select', 'multiselect' and other
option-supporting field types. It is important that 'option' thus be added
manually to the field type whitelist, so that option fields can be created
programatically.

Fixes #5472

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-loader.php

    r8277 r8518  
    103103                $this->field_types = apply_filters( 'xprofile_field_types', array_keys( bp_xprofile_get_field_types() ) );
    104104
     105                // 'option' is a special case. It is not a top-level field, so
     106                // does not have an associated BP_XProfile_Field_Type class,
     107                // but it must be whitelisted
     108                $this->field_types[] = 'option';
     109
    105110                // Register the visibility levels. See bp_xprofile_get_visibility_levels() to filter
    106111                $this->visibility_levels = array(
Note: See TracChangeset for help on using the changeset viewer.