fields = isset($args['fields']) ? $args['fields'] : array(); parent::__construct($manager, $id, $args); } public function render_content() { $saved_value = json_decode($this->value(), true); if (!is_array($saved_value)) { $saved_value = array(); } ?> link(); ?> value="">
'; foreach ($this->fields as $field) { $key = $field['id']; $value = isset($itemData[$key]) ? esc_attr($itemData[$key]) : ''; switch ($field['type']) { case 'text': $html .= ''; break; case 'textarea': $html .= ''; break; case 'image': $html .= ''; $html .= ''; $html .= ''; break; case 'url': $html .= ''; break; } } $html .= ''; $html .= ''; return $html; } } }