class-kirki-field-background.php
5 years ago
class-kirki-field-checkbox.php
5 years ago
class-kirki-field-code.php
5 years ago
class-kirki-field-color-alpha.php
5 years ago
class-kirki-field-color-palette.php
5 years ago
class-kirki-field-color.php
5 years ago
class-kirki-field-custom.php
5 years ago
class-kirki-field-dashicons.php
5 years ago
class-kirki-field-date.php
5 years ago
class-kirki-field-dimension.php
5 years ago
class-kirki-field-dimensions.php
5 years ago
class-kirki-field-dropdown-pages.php
5 years ago
class-kirki-field-editor.php
5 years ago
class-kirki-field-fontawesome.php
5 years ago
class-kirki-field-generic.php
5 years ago
class-kirki-field-group-title.php
5 years ago
class-kirki-field-image.php
5 years ago
class-kirki-field-kirki-generic.php
5 years ago
class-kirki-field-link.php
5 years ago
class-kirki-field-multicheck.php
5 years ago
class-kirki-field-multicolor.php
5 years ago
class-kirki-field-number.php
5 years ago
class-kirki-field-palette.php
5 years ago
class-kirki-field-preset.php
5 years ago
class-kirki-field-radio-buttonset.php
5 years ago
class-kirki-field-radio-image.php
5 years ago
class-kirki-field-radio.php
5 years ago
class-kirki-field-repeater.php
5 years ago
class-kirki-field-select.php
5 years ago
class-kirki-field-select2-multiple.php
5 years ago
class-kirki-field-select2.php
5 years ago
class-kirki-field-slider.php
5 years ago
class-kirki-field-sortable.php
5 years ago
class-kirki-field-spacing.php
5 years ago
class-kirki-field-switch.php
5 years ago
class-kirki-field-text.php
5 years ago
class-kirki-field-textarea.php
5 years ago
class-kirki-field-toggle.php
5 years ago
class-kirki-field-typography.php
5 years ago
class-kirki-field-upload.php
5 years ago
class-kirki-field-url.php
5 years ago
class-kirki-field-kirki-generic.php
56 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Override field methods |
| 4 | * |
| 5 | * @package Kirki |
| 6 | * @subpackage Controls |
| 7 | * @copyright Copyright (c) 2020, David Vongries |
| 8 | * @license https://opensource.org/licenses/MIT |
| 9 | * @since 2.2.7 |
| 10 | */ |
| 11 | |
| 12 | /** |
| 13 | * Field overrides. |
| 14 | */ |
| 15 | class Kirki_Field_Kirki_Generic extends Kirki_Field { |
| 16 | |
| 17 | /** |
| 18 | * Sets the control type. |
| 19 | * |
| 20 | * @access protected |
| 21 | */ |
| 22 | protected function set_type() { |
| 23 | $this->type = 'kirki-generic'; |
| 24 | } |
| 25 | |
| 26 | |
| 27 | /** |
| 28 | * Sets the $choices |
| 29 | * |
| 30 | * @access protected |
| 31 | */ |
| 32 | protected function set_choices() { |
| 33 | if ( ! is_array( $this->choices ) ) { |
| 34 | $this->choices = array(); |
| 35 | } |
| 36 | if ( ! isset( $this->choices['element'] ) ) { |
| 37 | $this->choices['element'] = 'input'; |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * Sets the $sanitize_callback |
| 43 | * |
| 44 | * @access protected |
| 45 | */ |
| 46 | protected function set_sanitize_callback() { |
| 47 | |
| 48 | // If a custom sanitize_callback has been defined, |
| 49 | // then we don't need to proceed any further. |
| 50 | if ( ! empty( $this->sanitize_callback ) ) { |
| 51 | return; |
| 52 | } |
| 53 | $this->sanitize_callback = 'wp_kses_post'; |
| 54 | } |
| 55 | } |
| 56 |