- Timestamp:
- 09/25/2015 02:19:11 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type.php
r9819 r10142 13 13 * Represents a type of XProfile field and holds meta information about the type of value that it accepts. 14 14 * 15 * @since BuddyPress (2.0.0)15 * @since 2.0.0 16 16 */ 17 17 abstract class BP_XProfile_Field_Type { 18 18 19 19 /** 20 * @since BuddyPress (2.0.0)20 * @since 2.0.0 21 21 * @var array Field type validation regexes 22 22 */ … … 24 24 25 25 /** 26 * @since BuddyPress (2.0.0)26 * @since 2.0.0 27 27 * @var array Field type whitelisted values 28 28 */ … … 30 30 31 31 /** 32 * @since BuddyPress (2.0.0)32 * @since 2.0.0 33 33 * @var string The name of this field type 34 34 */ … … 38 38 * The name of the category that this field type should be grouped with. Used on the [Users > Profile Fields] screen in wp-admin. 39 39 * 40 * @since BuddyPress (2.0.0)40 * @since 2.0.0 41 41 * @var string 42 42 */ … … 44 44 45 45 /** 46 * @since BuddyPress (2.0.0)46 * @since 2.0.0 47 47 * @var bool If this is set, allow BP to store null/empty values for this field type. 48 48 */ … … 52 52 * If this is set, BP will set this field type's validation whitelist from the field's options (e.g checkbox, selectbox). 53 53 * 54 * @since BuddyPress (2.0.0)54 * @since 2.0.0 55 55 * @var bool Does this field support options? e.g. selectbox, radio buttons, etc. 56 56 */ … … 58 58 59 59 /** 60 * @since BuddyPress (2.0.0)60 * @since 2.0.0 61 61 * @var bool Does this field type support multiple options being set as default values? e.g. multiselectbox, checkbox. 62 62 */ … … 64 64 65 65 /** 66 * @since BuddyPress (2.0.0)66 * @since 2.0.0 67 67 * @var BP_XProfile_Field If this object is created by instantiating a {@link BP_XProfile_Field}, this is a reference back to that object. 68 68 */ … … 72 72 * Constructor 73 73 * 74 * @since BuddyPress (2.0.0)74 * @since 2.0.0 75 75 */ 76 76 public function __construct() { … … 79 79 * Fires inside __construct() method for BP_XProfile_Field_Type class. 80 80 * 81 * @since BuddyPress (2.0.0)81 * @since 2.0.0 82 82 * 83 83 * @param BP_XProfile_Field_Type $this Current instance of … … 96 96 * @param string $replace_format Optional; if 'replace', replaces the format instead of adding to it. Defaults to 'add'. 97 97 * @return BP_XProfile_Field_Type 98 * @since BuddyPress (2.0.0)98 * @since 2.0.0 99 99 */ 100 100 public function set_format( $format, $replace_format = 'add' ) { … … 103 103 * Filters the regex format for the field type. 104 104 * 105 * @since BuddyPress (2.0.0)105 * @since 2.0.0 106 106 * 107 107 * @param string $format Regex string. … … 129 129 * @param string|array $values 130 130 * @return BP_XProfile_Field_Type 131 * @since BuddyPress (2.0.0)131 * @since 2.0.0 132 132 */ 133 133 public function set_whitelist_values( $values ) { … … 137 137 * Filters values for field type's whitelist that profile data will be asserted against. 138 138 * 139 * @since BuddyPress (2.0.0)139 * @since 2.0.0 140 140 * 141 141 * @param string $value Field value. … … 156 156 * @param string|array $values Value to check against the registered formats 157 157 * @return bool True if the value validates 158 * @since BuddyPress (2.0.0)158 * @since 2.0.0 159 159 */ 160 160 public function is_valid( $values ) { … … 191 191 * Filters whether or not field type is a valid format. 192 192 * 193 * @since BuddyPress (2.0.0)193 * @since 2.0.0 194 194 * 195 195 * @param bool $validated Whether or not the field type is valid. … … 206 206 * 207 207 * @param array $raw_properties Optional key/value array of permitted attributes that you want to add. 208 * @since BuddyPress (2.0.0)208 * @since 2.0.0 209 209 */ 210 210 abstract public function edit_field_html( array $raw_properties = array() ); … … 223 223 * 224 224 * @param array $args Optional. The arguments passed to {@link bp_the_profile_field_options()}. 225 * @since BuddyPress (2.0.0)225 * @since 2.0.0 226 226 */ 227 227 public function edit_field_options_html( array $args = array() ) {} … … 233 233 * 234 234 * @param array $raw_properties Optional key/value array of permitted attributes that you want to add. 235 * @since BuddyPress (2.0.0)235 * @since 2.0.0 236 236 */ 237 237 abstract public function admin_field_html( array $raw_properties = array() ); … … 248 248 * @param BP_XProfile_Field $current_field The current profile field on the add/edit screen. 249 249 * @param string $control_type Optional. HTML input type used to render the current field's child options. 250 * @since BuddyPress (2.0.0)250 * @since 2.0.0 251 251 */ 252 252 public function admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' ) { … … 357 357 * Fires at the end of the new field additional settings area. 358 358 * 359 * @since BuddyPress (2.3.0)359 * @since 2.3.0 360 360 * 361 361 * @param BP_XProfile_Field $current_field Current field being rendered. … … 383 383 * validation filtering. 384 384 * 385 * @since BuddyPress (2.1.0)385 * @since 2.1.0 386 386 * 387 387 * @param mixed $submitted_value Submitted value. … … 399 399 * filtering for output values. 400 400 * 401 * @since BuddyPress (2.1.0)401 * @since 2.1.0 402 402 * 403 403 * @param mixed $field_value Field value. … … 418 418 * @param array $properties Optional key/value array of attributes for this edit field. 419 419 * @return string 420 * @since BuddyPress (2.0.0)420 * @since 2.0.0 421 421 */ 422 422 protected function get_edit_field_html_elements( array $properties = array() ) { … … 436 436 * Filters the edit html elements and attributes. 437 437 * 438 * @since BuddyPress (2.0.0)438 * @since 2.0.0 439 439 * 440 440 * @param array $r Array of parsed arguments.
Note: See TracChangeset
for help on using the changeset viewer.