/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/give/src/FormAPI/Form
NameSizeModeActions
Colorpicker.php730644editdlrm
Field.php32010644editdlrm
File.php660644editdlrm
Group.php20590644editdlrm
Media.php6890644editdlrm
Radio.php8460644editdlrm
Select.php5440644editdlrm
Text.php14120644editdlrm
Textarea.php700644editdlrm
Wysiwyg.php690644editdlrm
Edit: /var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/give/src/FormAPI/Form/Field.php (3201B)
id = $array['id']; $this->name = $array['name']; $this->type = $array['type']; $this->desc = isset($array['desc']) ? $array['desc'] : ''; $this->style = isset($array['style']) ? $array['style'] : ''; $this->wrapperClass = isset($array['wrapper_class']) ? $array['wrapper_class'] : ''; $this->defaultValue = isset($array['default']) ? $array['default'] : null; $this->value = isset($array['value']) ? $array['value'] : null; $this->attributes = isset($array['attributes']) ? $array['attributes'] : []; } /** * Get Field object. * * @since 2.7.0 * * @param array $array * * @return static */ public static function fromArray($array) { $field = new static(); $field->validate($array); $field->parse($array); return $field; } /** * Validate field arguments * * @since 2.7.0 * * @param $array */ public function validate($array) { $required = ['id', 'name', 'type']; $array = array_filter($array); // Remove empty values. if (array_diff($required, array_keys($array))) { throw new InvalidArgumentException( __('To create a TextField object, please provide valid id, name and type.', 'give') ); } } /** * Convert field object to array. * * @since 2.7.0 * @return array */ public function toArray() { return [ 'id' => $this->id, 'name' => $this->name, 'type' => $this->type, 'desc' => $this->desc, 'style' => $this->style, 'wrapper_class' => $this->wrapperClass, 'value' => $this->value, 'default' => $this->defaultValue, 'attributes' => $this->attributes, ]; } }