| @@ -15,5 +15,16 @@ | ||
| 15 | 15 | public function type() { |
| 16 | 16 | return 'default'; |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | + protected function allows_array_value(): bool { | |
| 20 | + switch ( $this->get_type() ) { | |
| 21 | + case 'checkbox-field': | |
| 22 | + return true; | |
| 23 | + case 'select-field': | |
| 24 | + return (bool) $this->get_setting( 'multiple' ); | |
| 25 | + default: | |
| 26 | + return false; | |
| 27 | + } | |
| 28 | + } | |
| 29 | + | |
| 19 | 30 | } |