choices-field-parser.php
23 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace JFB_Modules\Advanced_Choices\Block_Parsers; |
| 5 | |
| 6 | use JFB_Modules\Block_Parsers\Field_Data_Parser; |
| 7 | |
| 8 | // If this file is called directly, abort. |
| 9 | if ( ! defined( 'WPINC' ) ) { |
| 10 | die; |
| 11 | } |
| 12 | |
| 13 | class Choices_Field_Parser extends Field_Data_Parser { |
| 14 | |
| 15 | public function type() { |
| 16 | return 'choices-field'; |
| 17 | } |
| 18 | |
| 19 | protected function allows_array_value(): bool { |
| 20 | return (bool) $this->get_setting( 'allow_multiple' ); |
| 21 | } |
| 22 | } |
| 23 |