Skip to content

Commit

Permalink
formatFieldMultiselectForFront : doesn't check against choices list f…
Browse files Browse the repository at this point in the history
…or front: good for performances
  • Loading branch information
jf-viguier committed Aug 31, 2023
1 parent 66c9ebd commit 2d829d8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion classes/prettyblocks/core/PrettyBlocksField.php
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,13 @@ private function formatFieldSelect()
*/
private function formatFieldMultiselectForFront()
{
return $this->formatFieldMultiselect();
if (is_array($this->value)) {
return $this->value;
}
// if value doesn't exists in DB and new value is not set return default value
if ($this->force_default_value && isset($this->field['default'])) {
return $this->field['default'];
}
}

/**
Expand Down

0 comments on commit 2d829d8

Please sign in to comment.