BP_XProfile_Field_Type_Datebox::__construct()

Constructor for the datebox field type.


Source Source

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

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

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

		$this->set_format( '/^\d{4}-\d{1,2}-\d{1,2} 00:00:00$/', 'replace' ); // "Y-m-d 00:00:00"

		$this->do_settings_section = true;

		/**
		 * Fires inside __construct() method for BP_XProfile_Field_Type_Datebox class.
		 *
		 * @since 2.0.0
		 *
		 * @param BP_XProfile_Field_Type_Datebox $this Current instance of
		 *                                             the field type datebox.
		 */
		do_action( 'bp_xprofile_field_type_datebox', $this );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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