BP_XProfile_Field_Type_Checkbox_Acceptance::__construct()

Constructor for the Checkbox Acceptance field type.


Source Source

File: bp-xprofile/classes/class-bp-xprofile-field-type-checkbox-acceptance.php

	public function __construct() {
		parent::__construct();

		$this->name     = _x( 'Checkbox Acceptance', 'xprofile field type', 'buddypress' );
		$this->category = _x( 'Single Fields', 'xprofile field type category', 'buddypress' );

		$this->supports_options    = false;
		$this->do_settings_section = true;
		$this->accepts_null_value  = false;

		$this->set_format( '/^.+$/', 'replace' );

		/**
		 * Fires inside __construct() method for bp_xprofile_field_type_checkbox_acceptance class.
		 *
		 * @since 8.0.0
		 *
		 * @param BP_XProfile_Field_Type_Checkbox_Acceptance $this Current instance of the Checkbox Acceptance field type.
		 */
		do_action( 'bp_xprofile_field_type_checkbox_acceptance', $this );

		// Make sure it's not possible to edit an accepted Checkbox Acceptance field.
		add_filter( 'bp_xprofile_set_field_data_pre_validate', array( $this, 'enforce_field_value' ), 10, 2 );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
8.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.