array( 'name' => true, 'id' => true, 'class' => true, 'multiple' => true, ), 'option' => array( 'value' => true, 'selected' => true, ), 'optgroup' => array( 'label' => true, ), 'input' => array( 'type' => true, 'name' => true, 'value' => true, 'class' => true, 'id' => true, 'checked' => true, 'placeholder' => true, ), 'label' => array( 'for' => true, 'class' => true, ), ); public function allowed_html() { return array_merge($this->allowed(), $this->custom); } //public $asset_dir_url = ''; public function __construct() {} function admin_scripts() { wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-sortable'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-accordion'); wp_enqueue_style('jquery-ui'); wp_enqueue_script('wp-color-picker'); wp_enqueue_style('wp-color-picker'); wp_enqueue_style('select2'); wp_enqueue_script('select2'); wp_enqueue_style('font-awesome-5'); wp_enqueue_style('settings-tabs'); wp_enqueue_script('settings-tabs'); wp_enqueue_script('code-editor'); wp_enqueue_style('code-editor'); wp_enqueue_script('jquery.lazy'); wp_enqueue_script('jquery-ui-datepicker'); if (function_exists('wp_enqueue_editor')) { wp_enqueue_editor(); } } function field_template($option) { $id = isset($option['id']) ? $option['id'] : ""; $wraper_class = isset($option['wraper_class']) ? $option['wraper_class'] : ""; $conditions = isset($option['conditions']) ? $option['conditions'] : array(); $is_error = isset($option['is_error']) ? $option['is_error'] : false; $error_details = isset($option['error_details']) ? $option['error_details'] : ''; if (!empty($conditions)) : $depends = ''; $field = isset($conditions['field']) ? $conditions['field'] : ''; $cond_value = isset($conditions['value']) ? $conditions['value'] : ''; $type = isset($conditions['type']) ? $conditions['type'] : ''; $pattern = isset($conditions['pattern']) ? $conditions['pattern'] : ''; $modifier = isset($conditions['modifier']) ? $conditions['modifier'] : ''; $like = isset($conditions['like']) ? $conditions['like'] : ''; $strict = isset($conditions['strict']) ? $conditions['strict'] : ''; $empty = isset($conditions['empty']) ? $conditions['empty'] : ''; $sign = isset($conditions['sign']) ? $conditions['sign'] : ''; $min = isset($conditions['min']) ? $conditions['min'] : ''; $max = isset($conditions['max']) ? $conditions['max'] : ''; $depends .= "{'[name=$field]':"; $depends .= '{'; if (!empty($type)) : $depends .= "'type':"; $depends .= "'" . $type . "'"; endif; if (!empty($modifier)) : $depends .= ",'modifier':"; $depends .= "'" . $modifier . "'"; endif; if (!empty($like)) : $depends .= ",'like':"; $depends .= "'" . $like . "'"; endif; if (!empty($strict)) : $depends .= ",'strict':"; $depends .= "'" . $strict . "'"; endif; if (!empty($empty)) : $depends .= ",'empty':"; $depends .= "'" . $empty . "'"; endif; if (!empty($sign)) : $depends .= ",'sign':"; $depends .= "'" . $sign . "'"; endif; if (!empty($min)) : $depends .= ",'min':"; $depends .= "'" . $min . "'"; endif; if (!empty($max)) : $depends .= ",'max':"; $depends .= "'" . $max . "'"; endif; if (!empty($cond_value)) : $depends .= ",'value':"; if (is_array($cond_value)) : $count = count($cond_value); $i = 1; $depends .= "["; foreach ($cond_value as $val) : $depends .= "'" . $val . "'"; if ($i < $count) $depends .= ","; $i++; endforeach; $depends .= "]"; else : $depends .= "["; $depends .= "'" . $cond_value . "'"; $depends .= "]"; endif; endif; $depends .= '}}'; endif; ob_start(); ?>
data-depends="[]" class="setting-field ">
%s
%s

%s

field_select($option); elseif (isset($option['type']) && $option['type'] === 'select2') $this->field_select2($option); elseif (isset($option['type']) && $option['type'] === 'checkbox') $this->field_checkbox($option); elseif (isset($option['type']) && $option['type'] === 'radio') $this->field_radio($option); elseif (isset($option['type']) && $option['type'] === 'radio_image') $this->field_radio_image($option); elseif (isset($option['type']) && $option['type'] === 'textarea') $this->field_textarea($option); elseif (isset($option['type']) && $option['type'] === 'scripts_js') $this->field_scripts_js($option); elseif (isset($option['type']) && $option['type'] === 'scripts_css') $this->field_scripts_css($option); elseif (isset($option['type']) && $option['type'] === 'number') $this->field_number($option); elseif (isset($option['type']) && $option['type'] === 'text') $this->field_text($option); elseif (isset($option['type']) && $option['type'] === 'text_icon') $this->field_text_icon($option); elseif (isset($option['type']) && $option['type'] === 'text_multi') $this->field_text_multi($option); elseif (isset($option['type']) && $option['type'] === 'hidden') $this->field_hidden($option); elseif (isset($option['type']) && $option['type'] === 'range') $this->field_range($option); elseif (isset($option['type']) && $option['type'] === 'colorpicker') $this->field_colorpicker($option); elseif (isset($option['type']) && $option['type'] === 'colorpicker_multi') $this->field_colorpicker_multi($option); elseif (isset($option['type']) && $option['type'] === 'datepicker') $this->field_datepicker($option); elseif (isset($option['type']) && $option['type'] === 'faq') $this->field_faq($option); elseif (isset($option['type']) && $option['type'] === 'addons_grid') $this->field_addons_grid($option); elseif (isset($option['type']) && $option['type'] === 'custom_html') $this->field_custom_html($option); elseif (isset($option['type']) && $option['type'] === 'repeatable') $this->field_repeatable($option); elseif (isset($option['type']) && $option['type'] === 'media') $this->field_media($option); elseif (isset($option['type']) && $option['type'] === 'media_url') $this->field_media_url($option); elseif (isset($option['type']) && $option['type'] === 'option_group') $this->field_option_group($option); elseif (isset($option['type']) && $option['type'] === 'option_group_accordion') $this->field_option_group_accordion($option); elseif (isset($option['type']) && $option['type'] === 'wp_editor') $this->field_wp_editor($option); elseif (isset($option['type']) && $option['type'] === 'textarea_editor') $this->field_textarea_editor($option); elseif (isset($option['type']) && $option['type'] === $type) do_action("settings_tabs_field_$type", $option); } public function field_option_group_accordion($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $sortable = isset($option['sortable']) ? $option['sortable'] : false; $args_index = isset($option['args_index']) ? $option['args_index'] : array(); $args_index_default = isset($option['args_index_default']) ? $option['args_index_default'] : array(); $args_index_hide = isset($option['args_index_hide']) ? $option['args_index_hide'] : array(); $args_index = !empty($args_index) ? $args_index : $args_index_default; $args = isset($option['args']) ? $option['args'] : array(); $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $title = isset($option['title']) ? $option['title'] : ""; $group_details = isset($option['details']) ? $option['details'] : ""; if ($is_pro == true) { $group_details = '' . $pro_text . ' ' . $group_details; } ob_start(); ?>
$value ): $group_title = isset($args[$index]['title']) ? $args[$index]['title'] : ''; $is_hide = isset($args_index_hide[$index]) ? $args_index_hide[$index] : false; //$link = $value['link']; $options = isset($args[$index]['options']) ? $args[$index]['options'] : array(); ?>

field_select($option); elseif (isset($option['type']) && $option['type'] === 'select2') $this->field_select2($option); elseif (isset($option['type']) && $option['type'] === 'checkbox') $this->field_checkbox($option); elseif (isset($option['type']) && $option['type'] === 'radio') $this->field_radio($option); elseif (isset($option['type']) && $option['type'] === 'radio_image') $this->field_radio_image($option); elseif (isset($option['type']) && $option['type'] === 'textarea') $this->field_textarea($option); elseif (isset($option['type']) && $option['type'] === 'scripts_js') $this->field_scripts_js($option); elseif (isset($option['type']) && $option['type'] === 'scripts_css') $this->field_scripts_css($option); elseif (isset($option['type']) && $option['type'] === 'number') $this->field_number($option); elseif (isset($option['type']) && $option['type'] === 'text') $this->field_text($option); elseif (isset($option['type']) && $option['type'] === 'text_icon') $this->field_text_icon($option); elseif (isset($option['type']) && $option['type'] === 'text_multi') $this->field_text_multi($option); elseif (isset($option['type']) && $option['type'] === 'hidden') $this->field_hidden($option); elseif (isset($option['type']) && $option['type'] === 'range') $this->field_range($option); elseif (isset($option['type']) && $option['type'] === 'colorpicker') $this->field_colorpicker($option); elseif (isset($option['type']) && $option['type'] === 'colorpicker_multi') $this->field_colorpicker_multi($option); elseif (isset($option['type']) && $option['type'] === 'datepicker') $this->field_datepicker($option); elseif (isset($option['type']) && $option['type'] === 'faq') $this->field_faq($option); elseif (isset($option['type']) && $option['type'] === 'addons_grid') $this->field_addons_grid($option); elseif (isset($option['type']) && $option['type'] === 'custom_html') $this->field_custom_html($option); elseif (isset($option['type']) && $option['type'] === 'repeatable') $this->field_repeatable($option); elseif (isset($option['type']) && $option['type'] === 'media') $this->field_media($option); elseif (isset($option['type']) && $option['type'] === 'media_url') $this->field_media_url($option); endforeach; endif; ?>
field_template($option); $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $title = isset($option['title']) ? $option['title'] : ""; $group_details = isset($option['details']) ? $option['details'] : ""; if ($is_pro == true) { $group_details = '' . $pro_text . ' ' . $group_details; } ob_start(); ?>
field_select($option); elseif (isset($option['type']) && $option['type'] === 'select2') $this->field_select2($option); elseif (isset($option['type']) && $option['type'] === 'checkbox') $this->field_checkbox($option); elseif (isset($option['type']) && $option['type'] === 'radio') $this->field_radio($option); elseif (isset($option['type']) && $option['type'] === 'radio_image') $this->field_radio_image($option); elseif (isset($option['type']) && $option['type'] === 'textarea') $this->field_textarea($option); elseif (isset($option['type']) && $option['type'] === 'scripts_js') $this->field_scripts_js($option); elseif (isset($option['type']) && $option['type'] === 'scripts_css') $this->field_scripts_css($option); elseif (isset($option['type']) && $option['type'] === 'number') $this->field_number($option); elseif (isset($option['type']) && $option['type'] === 'text') $this->field_text($option); elseif (isset($option['type']) && $option['type'] === 'text_icon') $this->field_text_icon($option); elseif (isset($option['type']) && $option['type'] === 'text_multi') $this->field_text_multi($option); elseif (isset($option['type']) && $option['type'] === 'hidden') $this->field_hidden($option); elseif (isset($option['type']) && $option['type'] === 'range') $this->field_range($option); elseif (isset($option['type']) && $option['type'] === 'colorpicker') $this->field_colorpicker($option); elseif (isset($option['type']) && $option['type'] === 'colorpicker_multi') $this->field_colorpicker_multi($option); elseif (isset($option['type']) && $option['type'] === 'datepicker') $this->field_datepicker($option); elseif (isset($option['type']) && $option['type'] === 'faq') $this->field_faq($option); elseif (isset($option['type']) && $option['type'] === 'addons_grid') $this->field_addons_grid($option); elseif (isset($option['type']) && $option['type'] === 'custom_html') $this->field_custom_html($option); elseif (isset($option['type']) && $option['type'] === 'repeatable') $this->field_repeatable($option); elseif (isset($option['type']) && $option['type'] === 'media') $this->field_media($option); elseif (isset($option['type']) && $option['type'] === 'media_url') $this->field_media_url($option); endforeach; endif; ?>
allowed_html()); } public function field_media($option) { $id = isset($option['id']) ? $option['id'] : ""; if (empty($id)) return; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $field_name = isset($option['field_name']) ? $option['field_name'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $title = isset($option['title']) ? $option['title'] : ""; $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $value = isset($option['value']) ? $option['value'] : ''; $value = !empty($value) ? $value : $default; $media_url = wp_get_attachment_url($value); $media_type = get_post_mime_type($value); $media_title = !empty($value) ? get_the_title($value) : "Placeholder"; $media_url = !empty($media_url) ? $media_url : $default; $media_url = !empty($media_url) ? $media_url : $placeholder; $media_basename = wp_basename($media_type); $field_name = !empty($field_name) ? $field_name : $id; $field_name = !empty($parent) ? $parent . '[' . $field_name . ']' : $field_name; ob_start(); //wp_enqueue_media(); ?>
allowed_html()); } public function field_media_url($option) { $id = isset($option['id']) ? $option['id'] : ""; if (empty($id)) return; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $field_name = isset($option['field_name']) ? $option['field_name'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $placeholder_img = isset($option['placeholder_img']) ? $option['placeholder_img'] : ""; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $value = isset($option['value']) ? $option['value'] : ''; $value = !empty($value) ? $value : $default; $media_url = $value; $media_type = get_post_mime_type($value); $media_title = get_the_title($value); $media_url = !empty($media_url) ? $media_url : ''; $media_url = !empty($media_url) ? $media_url : $placeholder_img; $field_name = !empty($field_name) ? $field_name : $id; $field_name = !empty($parent) ? $parent . '[' . $field_name . ']' : $field_name; wp_enqueue_media(); ob_start(); ?>
allowed_html()); } public function field_repeatable($option) { $id = isset($option['id']) ? $option['id'] : ""; if (empty($id)) return; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $field_name = isset($option['field_name']) ? $option['field_name'] : $id; $field_name = !empty($parent) ? $parent . '[' . $field_name . ']' : $field_name; $sortable = isset($option['sortable']) ? $option['sortable'] : true; $collapsible = isset($option['collapsible']) ? $option['collapsible'] : true; $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $values = isset($option['value']) ? $option['value'] : array(); $fields = isset($option['fields']) ? $option['fields'] : array(); $title_field = isset($option['title_field']) ? $option['title_field'] : ''; $remove_text = isset($option['remove_text']) ? $option['remove_text'] : ''; $limit = isset($option['limit']) ? $option['limit'] : ''; $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $settings_tabs_field = new settings_tabs_field(); ob_start(); ?>
#TIMEINDEX
generate_field($field); ?>
$val) : $title_field_val = !empty($val[$title_field]) ? $val[$title_field] : '#' . $count; ?>
$field) : $fieldId = $field['id']; $field_css_id = isset($field['css_id']) ? str_replace('TIMEINDEX', $index, $field['css_id']) : ''; $title_field_class = ($title_field == $field_index) ? 'title-field' : ''; ?>
generate_field($field); if ($collapsible) : ?>
allowed_html()); } public function field_select($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $args = isset($option['args']) ? $option['args'] : array(); $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $disabled = isset($option['disabled']) ? $option['disabled'] : false; $disabledMessage = isset($option['disabledMessage']) ? $option['disabledMessage'] : ''; $multiple = isset($option['multiple']) ? $option['multiple'] : false; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; if ($is_pro == true) { $details = '' . $pro_text . ' ' . $details; } if ($multiple) { $value = isset($option['value']) ? $option['value'] : array(); $field_name = !empty($parent) ? $parent . '[' . $id . '][]' : $id . '[]'; $default = isset($option['default']) ? $option['default'] : array(); } else { $value = isset($option['value']) ? $option['value'] : ''; $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; $default = isset($option['default']) ? $option['default'] : ''; } $value = !empty($value) ? $value : $default; ob_start(); ?>

allowed_html()); } public function field_select2($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $args = isset($option['args']) ? $option['args'] : array(); $multiple = isset($option['multiple']) ? $option['multiple'] : ""; $attributes = isset($option['attributes']) ? $option['attributes'] : array(); $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; if ($multiple) { $value = isset($option['value']) ? $option['value'] : array(); $field_name = !empty($parent) ? $parent . '[' . $id . '][]' : $id . '[]'; $default = isset($option['default']) ? $option['default'] : array(); } else { $value = isset($option['value']) ? $option['value'] : ''; $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; $default = isset($option['default']) ? $option['default'] : ''; } $value = !empty($value) ? $value : $default; //$value = get_post_meta( $post_id, $id, true ); $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $attributes_html = ''; foreach ($attributes as $attributeId => $attribute) : $attributes_html = $attributeId . '=' . $attribute . ' '; endforeach; ob_start(); ?> allowed_html()); } public function field_text_multi($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $default = isset($option['default']) ? $option['default'] : array(); $values = isset($option['value']) ? $option['value'] : $default; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $remove_text = isset($option['remove_text']) ? $option['remove_text'] : ''; $sortable = isset($option['sortable']) ? $option['sortable'] : true; $allow_clone = isset($option['allow_clone']) ? $option['allow_clone'] : false; $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; if ($is_pro == true) { $details = '' . $pro_text . ' ' . $details; } $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; ob_start(); ?>
allowed_html()); } public function field_hidden($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $value = !empty($value) ? $value : $default; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; if ($is_pro == true) { $details = '' . $pro_text . ' ' . $details; } $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; ob_start(); ?> allowed_html()); } public function field_text($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $default = isset($option['default']) ? $option['default'] : ''; $value = isset($option['value']) ? $option['value'] : $default; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; if ($is_pro == true) { $details = '' . $pro_text . ' ' . $details; } $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; ob_start(); ?> allowed_html()); } public function field_number($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $value = !empty($value) ? $value : $default; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; if ($is_pro == true) { $details = '' . $pro_text . ' ' . $details; } $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; ob_start(); ?> allowed_html()); } public function field_wp_editor($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $value = !empty($value) ? $value : $default; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; if ($is_pro == true) { $details = '' . $pro_text . ' ' . $details; } $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; $editor_settings = isset($option['editor_settings']) ? $option['editor_settings'] : array('textarea_name' => $field_name, 'teeny' => true, 'textarea_rows' => 15,); ob_start(); ?>
allowed_html()); } public function field_text_icon($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $option_value = empty($value) ? $default : $value; $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; ob_start(); ?>
allowed_html()); } public function field_range($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $value = !empty($value) ? $value : $default; $args = isset($option['args']) ? $option['args'] : ""; $min = isset($args['min']) ? $args['min'] : ''; $max = isset($args['max']) ? $args['max'] : ''; $step = isset($args['step']) ? $args['step'] : ''; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; ob_start(); ?>
allowed_html()); } public function field_textarea($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $value = !empty($value) ? $value : $default; $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; if ($is_pro == true) { $details = '' . $pro_text . ' ' . $details; } ob_start(); ?> allowed_html()); } public function field_textarea_editor($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $value = !empty($value) ? $value : $default; $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; if ($is_pro == true) { $details = '' . $pro_text . ' ' . $details; } ob_start(); ?> allowed_html()); } public function field_scripts_js($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $value = !empty($value) ? $value : $default; $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; ob_start(); ?> allowed_html()); } public function field_scripts_css($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $value = !empty($value) ? $value : $default; $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; ?> allowed_html()); } public function field_checkbox($option) { $id = isset($option['id']) ? $option['id'] : ""; $parent = isset($option['parent']) ? $option['parent'] : ""; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $for = isset($option['for']) ? $option['for'] : ""; $args = isset($option['args']) ? $option['args'] : array(); $style = isset($option['style']) ? $option['style'] : array(); $style_inline = isset($style['inline']) ? $style['inline'] : true; $option_value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $option_value = !empty($option_value) ? $option_value : $default; $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; ?>
$value) : //$checked = ( $key == $option_value ) ? "checked" : ""; $checked = in_array($key, $option_value) ? "checked" : ""; $for = !empty($for) ? $for . '-' . $id . "-" . $key : $id . "-" . $key; ?>

field_template($option); $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $for = isset($option['for']) ? $option['for'] : ""; $args = isset($option['args']) ? $option['args'] : array(); $style = isset($option['style']) ? $option['style'] : array(); $style_inline = isset($style['inline']) ? $style['inline'] : true; $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $option_value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $option_value = !empty($option_value) ? $option_value : $default; $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; ob_start(); if (!empty($args)) foreach ($args as $key => $value) : $for = ''; $checked = ($key == $option_value) ? "checked" : ""; $for = !empty($for) ? $for . '-' . $css_id . "-" . $key : $css_id . "-" . $key; ?>
allowed_html()); } public function field_radio_image($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $args = isset($option['args']) ? $option['args'] : array(); //$args = is_array( $args ) ? $args : $this->generate_args_from_string( $args ); $option_value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $lazy_load_img = isset($option['lazy_load_img']) ? $option['lazy_load_img'] : ''; $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $width = isset($option['width']) ? $option['width'] : "250px"; $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; $option_value = empty($option_value) ? $default : $option_value; ob_start(); ?>
$value) : $name = isset($value['name']) ? $value['name'] : ''; $thumb = isset($value['thumb']) ? $value['thumb'] : ''; $disabled = isset($value['disabled']) ? $value['disabled'] : ''; $pro_msg = isset($value['pro_msg']) ? $value['pro_msg'] : ''; $link = isset($value['link']) ? $value['link'] : ''; $link_text = isset($value['link_text']) ? $value['link_text'] : 'Go'; $checked = ($key == $option_value) ? "checked" : ""; ?>
allowed_html()); } public function field_datepicker($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $format = isset($option['format']) ? $option['format'] : ""; $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $value = !empty($value) ? $value : $default; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; ob_start(); ?> allowed_html()); } public function field_colorpicker($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $placeholder = isset($option['placeholder']) ? $option['placeholder'] : ""; $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $value = !empty($value) ? $value : $default; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; ob_start(); ?> allowed_html()); } public function field_colorpicker_multi($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $args = isset($option['args']) ? $option['args'] : ""; $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $value = isset($option['value']) ? $option['value'] : ''; $default = isset($option['default']) ? $option['default'] : ''; $value = !empty($value) ? $value : $default; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; $field_name = !empty($parent) ? $parent . '[' . $id . ']' : $id; ob_start(); if (!empty($args)) : foreach ($args as $arg_key => $arg) : $item_value = isset($value[$arg_key]) ? $value[$arg_key] : $arg; ?>
allowed_html()); } public function field_custom_html($option) { $id = isset($option['id']) ? $option['id'] : ""; $css_id = isset($option['css_id']) ? $option['css_id'] : $id; $parent = isset($option['parent']) ? $option['parent'] : ""; $field_template = isset($option['field_template']) ? $option['field_template'] : $this->field_template($option); $html = isset($option['html']) ? $option['html'] : ""; $is_pro = isset($option['is_pro']) ? $option['is_pro'] : false; $pro_text = isset($option['pro_text']) ? $option['pro_text'] : ''; $title = isset($option['title']) ? $option['title'] : ""; $details = isset($option['details']) ? $option['details'] : ""; echo wp_kses(sprintf($field_template, esc_html($title), $html, wp_kses_post($details)), $this->allowed_html()); } } }