Skip to:
Content

BuddyPress.org

Ticket #6789: 6789.01.diff

File 6789.01.diff, 2.2 KB (added by Offereins, 2 years ago)

profile type supports_multiple_values class property

  • src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php

    diff --git a/src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php b/src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php
    index 7267ad9..a4a2167 100644
    a b class BP_XProfile_Field_Type_Checkbox extends BP_XProfile_Field_Type { 
    2828                $this->category = _x( 'Multi Fields', 'xprofile field type category', 'buddypress' );
    2929                $this->name     = _x( 'Checkboxes', 'xprofile field type', 'buddypress' );
    3030
     31                $this->supports_multiple_values   = true;
    3132                $this->supports_multiple_defaults = true;
    3233                $this->accepts_null_value         = true;
    3334                $this->supports_options           = true;
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-multiselectbox.php

    diff --git a/src/bp-xprofile/classes/class-bp-xprofile-field-type-multiselectbox.php b/src/bp-xprofile/classes/class-bp-xprofile-field-type-multiselectbox.php
    index 5ecaa10..af92d00 100644
    a b class BP_XProfile_Field_Type_Multiselectbox extends BP_XProfile_Field_Type { 
    2828                $this->category = _x( 'Multi Fields', 'xprofile field type category', 'buddypress' );
    2929                $this->name     = _x( 'Multi Select Box', 'xprofile field type', 'buddypress' );
    3030
     31                $this->supports_multiple_values   = true;
    3132                $this->supports_multiple_defaults = true;
    3233                $this->accepts_null_value         = true;
    3334                $this->supports_options           = true;
  • src/bp-xprofile/classes/class-bp-xprofile-field-type.php

    diff --git a/src/bp-xprofile/classes/class-bp-xprofile-field-type.php b/src/bp-xprofile/classes/class-bp-xprofile-field-type.php
    index f282a82..75035dd 100644
    a b abstract class BP_XProfile_Field_Type { 
    6666        public $supports_options = false;
    6767
    6868        /**
     69         * If allowed to store multiple values.
     70         *
     71         * @since 2.9.0
     72         * @var bool Does this field support multiple values? e.g. multiselectbox, checkbox.
     73         */
     74        public $supports_multiple_values = false;
     75
     76        /**
    6977         * If allowed to support multiple options as default.
    7078         *
    7179         * @since 2.0.0