- Timestamp:
- 08/30/2016 03:17:16 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type.php
r10828 r11041 81 81 */ 82 82 public $supports_richtext = false; 83 84 /** 85 * If the field type has a type-specific settings section on the Edit Field panel. 86 * 87 * @since 2.7.0 88 * @var bool|null Boolean if set explicitly by the type object, otherwise null. 89 */ 90 protected $do_settings_section = null; 83 91 84 92 /** … … 227 235 */ 228 236 return (bool) apply_filters( 'bp_xprofile_field_type_is_valid', $validated, $values, $this ); 237 } 238 239 /** 240 * Check whether the current field type should have a settings ("options") section on the Edit Field panel. 241 * 242 * Falls back on `supports_options` if no value is set by the field type. 243 * 244 * @since 2.7.0 245 * 246 * @return bool 247 */ 248 public function do_settings_section() { 249 if ( null === $this->do_settings_section ) { 250 $this->do_settings_section = $this->supports_options; 251 } 252 253 return (bool) $this->do_settings_section; 229 254 } 230 255 … … 452 477 } 453 478 479 /** 480 * Save miscellaneous settings related to this field type. 481 * 482 * Override in a specific field type if it requires an admin save routine. 483 * 484 * @since 2.7.0 485 * 486 * @param int $field_id Field ID. 487 * @param array $settings Array of settings. 488 */ 489 public function admin_save_settings( $field_id, $settings ) {} 490 454 491 /** Protected *************************************************************/ 455 492
Note: See TracChangeset
for help on using the changeset viewer.