Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/13/2021 04:26:05 AM (3 years ago)
Author:
imath
Message:

xProfile: introduce the Checkbox Acceptance field type

This new field type helps community site administrators get members agreement about specific rules. It can be terms of service, code of conduct, game rules, etc.

When adding such a field, the xProfile field Admin screen will contain a specific metabox to select the WordPress page to use as the linked content needing members agreement.

This field can be required or not, but cannot be updated once members agreed to the WordPress page it relies to.

Props mahdiar, vapvarun

Fixes #4747

File:
1 edited

Legend:

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

    r12869 r12882  
    150150function bp_xprofile_get_field_types() {
    151151    $fields = array(
    152         'checkbox'       => 'BP_XProfile_Field_Type_Checkbox',
    153         'datebox'        => 'BP_XProfile_Field_Type_Datebox',
    154         'multiselectbox' => 'BP_XProfile_Field_Type_Multiselectbox',
    155         'number'         => 'BP_XProfile_Field_Type_Number',
    156         'url'            => 'BP_XProfile_Field_Type_URL',
    157         'radio'          => 'BP_XProfile_Field_Type_Radiobutton',
    158         'selectbox'      => 'BP_XProfile_Field_Type_Selectbox',
    159         'textarea'       => 'BP_XProfile_Field_Type_Textarea',
    160         'textbox'        => 'BP_XProfile_Field_Type_Textbox',
    161         'telephone'      => 'BP_XProfile_Field_Type_Telephone',
    162         'wp-biography'   => 'BP_XProfile_Field_Type_WordPress_Biography',
    163         'wp-textbox'     => 'BP_XProfile_Field_Type_WordPress_Textbox',
     152        'checkbox'            => 'BP_XProfile_Field_Type_Checkbox',
     153        'datebox'             => 'BP_XProfile_Field_Type_Datebox',
     154        'multiselectbox'      => 'BP_XProfile_Field_Type_Multiselectbox',
     155        'number'              => 'BP_XProfile_Field_Type_Number',
     156        'url'                 => 'BP_XProfile_Field_Type_URL',
     157        'radio'               => 'BP_XProfile_Field_Type_Radiobutton',
     158        'selectbox'           => 'BP_XProfile_Field_Type_Selectbox',
     159        'textarea'            => 'BP_XProfile_Field_Type_Textarea',
     160        'textbox'             => 'BP_XProfile_Field_Type_Textbox',
     161        'telephone'           => 'BP_XProfile_Field_Type_Telephone',
     162        'wp-biography'        => 'BP_XProfile_Field_Type_WordPress_Biography',
     163        'wp-textbox'          => 'BP_XProfile_Field_Type_WordPress_Textbox',
     164        'checkbox_acceptance' => 'BP_XProfile_Field_Type_Checkbox_Acceptance',
    164165    );
    165166
Note: See TracChangeset for help on using the changeset viewer.