コード例 #1
0
ファイル: view.php プロジェクト: anderfilth/4rodasWP
?>
filter-settings">
				<?php 
$options = array(array('label' => array('text' => __('Content type', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'radio', 'name' => 'content-type', 'options' => PT_CV_Values::post_types(), 'std' => 'post'))), !get_option('pt_cv_version_pro') ? PT_CV_Settings::get_cvpro(__('Filter custom post type (product, event...) ?', PT_CV_TEXTDOMAIN), 10) : '', apply_filters(PT_CV_PREFIX_ . 'custom_filters', array()), array('label' => array('text' => __('Common filters', PT_CV_TEXTDOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_group_class())), 'params' => array(array('type' => 'group', 'params' => array(apply_filters(PT_CV_PREFIX_ . 'sticky_posts_setting', array()), array('label' => array('text' => __('Include only', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'text', 'name' => 'post__in', 'std' => '', 'desc' => apply_filters(PT_CV_PREFIX_ . 'setting_post_in', __('List of post IDs to display (comma-separated values, e.g. 1,2,3)', PT_CV_TEXTDOMAIN))))), apply_filters(PT_CV_PREFIX_ . 'include_extra_settings', array()), array('label' => array('text' => __('Exclude', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'text', 'name' => 'post__not_in', 'std' => '', 'desc' => apply_filters(PT_CV_PREFIX_ . 'setting_post_not_in', __('List of post IDs to exclude (comma-separated values, e.g. 1,2,3)', PT_CV_TEXTDOMAIN))))), apply_filters(PT_CV_PREFIX_ . 'exclude_extra_settings', array()), array('label' => array('text' => __('Parent page', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'number', 'name' => 'post_parent', 'std' => '', 'desc' => __('Enter ID of parent page to query child pages', PT_CV_TEXTDOMAIN))), 'dependence' => array('content-type', 'page')), apply_filters(PT_CV_PREFIX_ . 'post_parent_settings', array()), array('label' => array('text' => __('Limit', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'number', 'name' => 'limit', 'std' => '10', 'min' => '1', 'desc' => __('The number of posts to show. Set empty to show all found posts (which match all filter settings)', PT_CV_TEXTDOMAIN)))), apply_filters(PT_CV_PREFIX_ . 'after_limit_option', PT_CV_Settings::get_cvpro(__('Skip some posts ?', PT_CV_TEXTDOMAIN), 12)))))), array('label' => array('text' => __('Advanced filters', PT_CV_TEXTDOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_group_class(), 'wrap-id' => PT_CV_Html::html_group_id('advanced-params'))), 'params' => array(array('type' => 'group', 'params' => array(array('label' => array('text' => ''), 'extra_setting' => array('params' => array('width' => 12)), 'params' => array(array('type' => 'checkbox', 'name' => 'advanced-settings[]', 'options' => PT_CV_Values::advanced_settings(), 'std' => '', 'class' => 'advanced-settings-item'))))))), array('label' => array('text' => ''), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_panel_group_class(), 'wrap-id' => PT_CV_Html::html_panel_group_id(PT_CV_Functions::string_random()))), 'params' => array(array('type' => 'panel_group', 'params' => apply_filters(PT_CV_PREFIX_ . 'advanced_settings_panel', array('taxonomy' => array(array('label' => array('text' => __('Taxonomies', PT_CV_TEXTDOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_PREFIX . 'taxonomies')), 'params' => array(array('type' => 'checkbox', 'name' => 'taxonomy[]', 'options' => PT_CV_Values::taxonomy_list(), 'std' => '', 'class' => 'taxonomy-item', 'desc' => __('Tick checkbox of taxonomies to filter posts by their terms', PT_CV_TEXTDOMAIN)))), !get_option('pt_cv_version_pro') ? PT_CV_Settings::get_cvpro(__('Filter by custom taxonomies ?', PT_CV_TEXTDOMAIN), 10) : '', array('label' => array('text' => __('Terms', PT_CV_TEXTDOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_panel_group_class() . ' terms', 'wrap-id' => PT_CV_Html::html_panel_group_id(PT_CV_Functions::string_random()))), 'params' => array(array('type' => 'panel_group', 'settings' => array('nice_name' => PT_CV_Values::taxonomy_list()), 'params' => PT_CV_Settings::terms_of_taxonomies()))), array('label' => array('text' => __('Relation', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'select', 'name' => 'taxonomy-relation', 'options' => PT_CV_Values::taxonomy_relation(), 'std' => PT_CV_Functions::array_get_first_key(PT_CV_Values::taxonomy_relation()), 'class' => 'taxonomy-relation', 'desc' => __('Select AND to show posts which match ALL settings of selected taxonomies.<br>Select OR to show posts which match settings of at least one selected taxonomy', PT_CV_TEXTDOMAIN)))), apply_filters(PT_CV_PREFIX_ . 'taxonomies_custom_settings', array())), 'order' => array(array('label' => array('text' => __('Order by', PT_CV_TEXTDOMAIN)), 'extra_setting' => array('params' => array('width' => 12)), 'params' => array(array('type' => 'panel_group', 'settings' => array('show_all' => 1), 'params' => PT_CV_Settings::orderby())))), 'author' => apply_filters(PT_CV_PREFIX_ . 'author_settings', array(array('label' => array('text' => __('Written by', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'select', 'name' => 'author__in[]', 'options' => PT_CV_Values::user_list(), 'std' => '', 'class' => 'select2', 'multiple' => $version_gt_37 ? '1' : '0'))), $version_gt_37 ? array('label' => array('text' => __('Not written by', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'select', 'name' => 'author__not_in[]', 'options' => PT_CV_Values::user_list(), 'std' => '', 'class' => 'select2', 'multiple' => $version_gt_37 ? '1' : '0'))) : array())), 'status' => array(array('label' => array('text' => __('Status', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'select', 'name' => 'post_status', 'options' => PT_CV_Values::post_statuses(), 'std' => 'publish', 'class' => 'select2', 'multiple' => '1', 'desc' => __('Select status of posts', PT_CV_TEXTDOMAIN))))), 'search' => array(array('label' => array('text' => __('Keyword', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'text', 'name' => 's', 'std' => '', 'desc' => __('Enter the keyword to searching for posts.', PT_CV_TEXTDOMAIN) . apply_filters(PT_CV_PREFIX_ . 'searchby_keyword_desc', '')))))))))));
echo PT_Options_Framework::do_settings($options, $settings);
?>
			</div>
			<!-- end Filter Settings -->

			<!-- Display Settings -->
			<div class="tab-pane" id="<?php 
echo esc_attr(PT_CV_PREFIX);
?>
display-settings">
				<?php 
$options = array(array('label' => array('text' => __('View type (Layout)', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'radio', 'name' => 'view-type', 'options' => PT_CV_Values::view_type(), 'std' => PT_CV_Functions::array_get_first_key(PT_CV_Values::view_type())))), array('label' => array('text' => __('View type settings', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'panel_group', 'settings' => array('no_panel' => 1, 'show_only_one' => 1), 'params' => PT_CV_Values::view_type_settings()))), apply_filters(PT_CV_PREFIX_ . 'responsive_settings', array()), array('label' => array('text' => __('Layout format', PT_CV_TEXTDOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_group_class())), 'params' => array(array('type' => 'group', 'params' => array(array('label' => array('text' => ''), 'extra_setting' => array('params' => array('width' => 12)), 'params' => array(array('type' => 'radio', 'name' => 'layout-format', 'options' => PT_CV_Values::layout_format(), 'std' => PT_CV_Functions::array_get_first_key(PT_CV_Values::layout_format()), 'desc' => __('This is layout format of output for each post', PT_CV_TEXTDOMAIN)))), array('label' => array('text' => ''), 'extra_setting' => array('params' => array('width' => 12)), 'params' => array(array('type' => 'checkbox', 'name' => 'lf-mobile-disable', 'options' => PT_CV_Values::yes_no('yes', __('Disable 2 columns format on mobile devices & extra small screens', PT_CV_TEXTDOMAIN)), 'std' => '')), 'dependence' => array('layout-format', '2-col')))))), array('label' => array('text' => __('Fields settings', PT_CV_TEXTDOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_group_class(), 'wrap-id' => PT_CV_Html::html_group_id('field-settings'))), 'params' => array(array('type' => 'group', 'params' => PT_CV_Settings::field_settings()))), array('label' => array('text' => __('Pagination settings', PT_CV_TEXTDOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_group_class())), 'params' => array(array('type' => 'group', 'params' => PT_CV_Settings::settings_pagination()))), array('label' => array('text' => __('Other settings', PT_CV_TEXTDOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_group_class())), 'params' => array(array('type' => 'group', 'params' => PT_CV_Settings::settings_other()))));
$options = apply_filters(PT_CV_PREFIX_ . 'display_settings', $options);
echo PT_Options_Framework::do_settings($options, $settings);
?>
			</div>
			<!-- end Display Settings -->

			<?php 
do_action(PT_CV_PREFIX_ . 'setting_tabs_content', $settings);
?>

		</div>

		<div class="clearfix"></div>
		<hr>
		<!-- Save -->
コード例 #2
0
ファイル: settings.php プロジェクト: anderfilth/4rodasWP
 /**
  * Settings of View Type = Scrollable
  *
  * @return array
  */
 static function view_type_settings_scrollable()
 {
     $prefix = 'scrollable-';
     $result = array(PT_CV_Settings::setting_no_option());
     $result = apply_filters(PT_CV_PREFIX_ . 'view_type_settings_scrollable', $result);
     return $result;
 }
コード例 #3
0
?>
filter-settings">
				<?php 
$options = array(array('label' => array('text' => __('Content type', PT_CV_DOMAIN)), 'params' => array(array('type' => 'radio', 'name' => 'content-type', 'options' => PT_CV_Values::post_types(), 'std' => 'post'))), !get_option('pt_cv_version_pro') ? array('label' => array('text' => ''), 'extra_setting' => array('params' => array('width' => 10)), 'params' => array(array('type' => 'html', 'content' => sprintf('<p class="text-muted">&rarr; %s</p>', __('Filter custom content type (or post type) ?', PT_CV_DOMAIN) . sprintf(' <a href="%s" target="_blank">%s</a>', esc_url('http://www.contentviewspro.com/pricing/?utm_source=client&utm_medium=view'), __('Please upgrade to Pro', PT_CV_DOMAIN)))))) : '', apply_filters(PT_CV_PREFIX_ . 'custom_filters', array()), array('label' => array('text' => __('Common filters', PT_CV_DOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_group_class())), 'params' => array(array('type' => 'group', 'params' => array(apply_filters(PT_CV_PREFIX_ . 'sticky_posts_setting', array()), array('label' => array('text' => __('In list', PT_CV_DOMAIN)), 'params' => array(array('type' => 'text', 'name' => 'post__in', 'std' => '', 'desc' => __('List of post ids to retrieve (comma-separated values, e.g. 1,2,3)<br>A post is displayed only if its ID is equal to any of the values IN this list', PT_CV_DOMAIN)))), apply_filters(PT_CV_PREFIX_ . 'include_extra_settings', array()), array('label' => array('text' => __('Excludes', PT_CV_DOMAIN)), 'params' => array(array('type' => 'text', 'name' => 'post__not_in', 'std' => '', 'desc' => __('List of post ids to exclude (comma-separated values, e.g. 1,2,3)', PT_CV_DOMAIN)))), apply_filters(PT_CV_PREFIX_ . 'exclude_extra_settings', array()), array('label' => array('text' => __('Parent page', PT_CV_DOMAIN)), 'params' => array(array('type' => 'number', 'name' => 'post_parent', 'std' => '', 'desc' => __('Enter ID of parent page to query child pages', PT_CV_DOMAIN))), 'dependence' => array('content-type', 'page')), apply_filters(PT_CV_PREFIX_ . 'post_parent_settings', array()), array('label' => array('text' => __('Limit', PT_CV_DOMAIN)), 'params' => array(array('type' => 'number', 'name' => 'limit', 'std' => '10', 'min' => '1', 'append_text' => '1 &rarr; 999', 'desc' => __('The number of posts to show. Set empty to show all found posts (which match all filter settings)', PT_CV_DOMAIN)))), apply_filters(PT_CV_PREFIX_ . 'after_limit_option', array()))))), array('label' => array('text' => __('Advanced filters', PT_CV_DOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_group_class(), 'wrap-id' => PT_CV_Html::html_group_id('advanced-params'))), 'params' => array(array('type' => 'group', 'params' => array(array('label' => array('text' => ''), 'extra_setting' => array('params' => array('width' => 12)), 'params' => array(array('type' => 'checkbox', 'name' => 'advanced-settings[]', 'options' => PT_CV_Values::advanced_settings(), 'std' => '', 'class' => 'advanced-settings-item'))))))), array('label' => array('text' => ''), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_panel_group_class(), 'wrap-id' => PT_CV_Html::html_panel_group_id(PT_CV_Functions::string_random()))), 'params' => array(array('type' => 'panel_group', 'params' => apply_filters(PT_CV_PREFIX_ . 'advanced_settings_panel', array('taxonomy' => array(array('label' => array('text' => __('Taxonomies', PT_CV_DOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_PREFIX . 'taxonomies')), 'params' => array(array('type' => 'checkbox', 'name' => 'taxonomy[]', 'options' => PT_CV_Values::taxonomy_list(), 'std' => '', 'class' => 'taxonomy-item', 'desc' => __('Check checkbox of taxonomies to filter posts by their terms', PT_CV_DOMAIN)))), array('label' => array('text' => __('Terms', PT_CV_DOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_panel_group_class() . ' terms', 'wrap-id' => PT_CV_Html::html_panel_group_id(PT_CV_Functions::string_random()))), 'params' => array(array('type' => 'panel_group', 'settings' => array('nice_name' => PT_CV_Values::taxonomy_list()), 'params' => PT_CV_Settings::terms_of_taxonomies()))), array('label' => array('text' => __('Relation', PT_CV_DOMAIN)), 'params' => array(array('type' => 'select', 'name' => 'taxonomy-relation', 'options' => PT_CV_Values::taxonomy_relation(), 'std' => PT_CV_Functions::array_get_first_key(PT_CV_Values::taxonomy_relation()), 'class' => 'taxonomy-relation', 'desc' => __('Select AND to show posts which match ALL settings of selected taxonomies<br>Select OR to show posts which match settings of at least one selected taxonomy', PT_CV_DOMAIN)))), apply_filters(PT_CV_PREFIX_ . 'taxonomies_custom_settings', array())), 'order' => array(array('label' => array('text' => __('Order by', PT_CV_DOMAIN)), 'extra_setting' => array('params' => array('width' => 12)), 'params' => array(array('type' => 'panel_group', 'settings' => array('show_all' => 1), 'params' => PT_CV_Settings::orderby())))), 'author' => apply_filters(PT_CV_PREFIX_ . 'author_settings', array(array('label' => array('text' => __('Written by', PT_CV_DOMAIN)), 'params' => array(array('type' => 'select', 'name' => 'author__in[]', 'options' => PT_CV_Values::user_list(), 'std' => '', 'class' => 'select2', 'multiple' => $version_gt_37 ? '1' : '0'))), $version_gt_37 ? array('label' => array('text' => __('Not written by', PT_CV_DOMAIN)), 'params' => array(array('type' => 'select', 'name' => 'author__not_in[]', 'options' => PT_CV_Values::user_list(), 'std' => '', 'class' => 'select2', 'multiple' => $version_gt_37 ? '1' : '0'))) : array())), 'status' => array(array('label' => array('text' => __('Status', PT_CV_DOMAIN)), 'params' => array(array('type' => 'select', 'name' => 'post_status', 'options' => PT_CV_Values::post_statuses(), 'std' => 'publish', 'class' => 'select2', 'multiple' => '1', 'desc' => __('Select status of posts', PT_CV_DOMAIN))))), 'search' => array(array('label' => array('text' => __('Keyword', PT_CV_DOMAIN)), 'params' => array(array('type' => 'text', 'name' => 's', 'std' => '', 'desc' => __('Enter the keyword to searching for posts', PT_CV_DOMAIN) . apply_filters(PT_CV_PREFIX_ . 'searchby_keyword_desc', '')))))))))));
echo balanceTags(PT_Options_Framework::do_settings($options, $settings));
?>
			</div>
			<!-- end Filter Settings -->

			<!-- Display Settings -->
			<div class="tab-pane" id="<?php 
echo esc_attr(PT_CV_PREFIX);
?>
display-settings">
				<?php 
$options = array(array('label' => array('text' => __('View type', PT_CV_DOMAIN)), 'params' => array(array('type' => 'radio', 'name' => 'view-type', 'options' => PT_CV_Values::view_type(), 'std' => PT_CV_Functions::array_get_first_key(PT_CV_Values::view_type())))), array('label' => array('text' => __('View type settings', PT_CV_DOMAIN)), 'params' => array(array('type' => 'panel_group', 'settings' => array('no_panel' => 1, 'no_animation' => 1, 'show_only_one' => 1), 'params' => PT_CV_Values::view_type_settings()))), apply_filters(PT_CV_PREFIX_ . 'responsive_settings', array()), array('label' => array('text' => __('Layout format', PT_CV_DOMAIN)), 'params' => array(array('type' => 'radio', 'name' => 'layout-format', 'options' => PT_CV_Values::layout_format(), 'std' => PT_CV_Functions::array_get_first_key(PT_CV_Values::layout_format()), 'desc' => __('This is layout format of output for each post', PT_CV_DOMAIN)))), array('label' => array('text' => __('Fields settings', PT_CV_DOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_group_class(), 'wrap-id' => PT_CV_Html::html_group_id('field-settings'))), 'params' => array(array('type' => 'group', 'params' => PT_CV_Settings::field_settings()))), array('label' => array('text' => __('Pagination settings', PT_CV_DOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_group_class())), 'params' => array(array('type' => 'group', 'params' => PT_CV_Settings::settings_pagination()))), array('label' => array('text' => __('Other settings', PT_CV_DOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_Html::html_group_class())), 'params' => array(array('type' => 'group', 'params' => PT_CV_Settings::settings_other()))));
$options = apply_filters(PT_CV_PREFIX_ . 'display_settings', $options);
echo balanceTags(PT_Options_Framework::do_settings($options, $settings));
?>
			</div>
			<!-- end Display Settings -->

			<?php 
do_action(PT_CV_PREFIX_ . 'setting_tabs_content', $settings);
?>

		</div>

		<div class="clearfix"></div>
		<hr>
		<!-- Save -->
コード例 #4
0
 /**
  * Settings of All View Types
  *
  * @return array
  */
 static function view_type_settings()
 {
     $view_type_settings = array();
     // Settings of Grid type
     $view_type_settings['grid'] = PT_CV_Settings::view_type_settings_grid();
     // Settings of Collapsible type
     $view_type_settings['collapsible'] = PT_CV_Settings::view_type_settings_collapsible();
     // Settings of Scrollable type
     $view_type_settings['scrollable'] = PT_CV_Settings::view_type_settings_scrollable();
     $result = apply_filters(PT_CV_PREFIX_ . 'view_type_settings', $view_type_settings);
     return $result;
 }
コード例 #5
0
 /**
  * Print HTML code of field type: input, select, textarea...
  *
  * @param array $param Array of parameters of a setting option
  * @param array $data  Array of stored data
  *
  * @return string
  */
 public static function field_type($param, $data, $value_ = NULL)
 {
     if (!$param || !isset($param['type'])) {
         return '';
     }
     $html = $extend = '';
     $class = 'form-control ' . (isset($param['class']) ? ' ' . PT_CV_PREFIX . $param['class'] : '');
     $type = esc_attr($param['type']);
     $name = !empty($param['name']) ? PT_CV_PREFIX . esc_attr($param['name']) : '';
     $id = !empty($param['id']) ? "id='" . PT_CV_PREFIX . esc_attr($param['id']) . "'" : '';
     $value = isset($value_) ? $value_ : self::field_value($data, $param, $name);
     $description = isset($param['desc']) ? $param['desc'] : '';
     $placeholder = isset($param['placeholder']) ? $param['placeholder'] : '';
     // Add extra information of option type
     switch ($type) {
         case 'number':
             $min = !empty($param['min']) ? intval($param['min']) : 0;
             $extend = 'min="' . $min . '"';
             break;
         case 'color':
             $class .= ' ' . PT_CV_PREFIX . 'color';
             break;
         case 'checkbox':
         case 'radio':
             // Remove form-control class in checkbox, radio
             $class = str_replace('form-control', '', $class);
             break;
     }
     $class = esc_attr($class);
     // Show HTML of option type
     switch ($type) {
         case 'group':
             $html .= self::do_settings($param['params'], $data);
             break;
         case 'text':
         case 'email':
         case 'password':
         case 'number':
         case 'url':
             $prepend_text = !empty($param['prepend_text']) ? $param['prepend_text'] : '';
             $append_text = !empty($param['append_text']) ? $param['append_text'] : '';
             $input = "<input type='{$type}' name='{$name}' value='{$value}' class='{$class}' {$id} {$extend} placeholder='{$placeholder}'>";
             if (!empty($prepend_text) || !empty($append_text)) {
                 $input = "<div class='input-group'>{$prepend_text}{$input}<span class='input-group-addon'>{$append_text}</span></div>";
             }
             $html .= $input;
             break;
         case 'color':
             $html .= "<input type='text' name='{$name}' value='{$value}' class='{$class}' {$id} {$extend} style='background-color:{$value};'>";
             $html .= "<div class='" . PT_CV_PREFIX . "colorpicker' style='z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;'></div><br>";
             break;
         case 'textarea':
             $html .= "<textarea name='{$name}' class='{$class}' {$id} {$extend} placeholder='{$placeholder}' rows=4>{$value}</textarea>";
             break;
         case 'checkbox':
         case 'radio':
             if (!isset($param['options'])) {
                 break;
             }
             $settings = isset($param['settings']) ? $param['settings'] : array();
             foreach ($param['options'] as $key => $text) {
                 // Append Html to $text, such as image...
                 if ($settings) {
                     $append = isset($settings['text-append']) ? $settings['text-append'] : '';
                     if ($append == 'image') {
                         $path = isset($settings['path']) ? $settings['path'] : '';
                         if ($path) {
                             $text .= "<br> <img src='" . plugins_url($path . "/{$key}.png", PT_CV_FILE) . "' />";
                         }
                     }
                 }
                 $checked = in_array($key, (array) $value) || $value == 'all' ? 'checked' : '';
                 $html .= "<div class='{$type}'><label><input type='{$type}' name='{$name}' value='{$key}' class='{$class}' {$checked} {$id} {$extend}>{$text}</label></div>";
             }
             break;
         case 'select':
             if (!isset($param['options'])) {
                 break;
             }
             if (is_string($value) && strpos($value, ',') !== false) {
                 $value = explode(',', $value);
             }
             $options = '';
             foreach ($param['options'] as $key => $text) {
                 $selected = in_array(str_replace('&amp;', '&', $key), (array) $value) || $value == 'all' ? 'selected' : '';
                 $option_class = isset($param['option_class_prefix']) ? sprintf("class='%s'", $param['option_class_prefix'] . esc_attr(sanitize_title($key))) : '';
                 $options .= "<option value='{$key}' {$selected} {$option_class}>{$text}</option>";
             }
             if (empty($options)) {
                 $html .= PT_CV_Settings::setting_no_option(true);
             } else {
                 $multiple = '';
                 if (isset($param['multiple']) && $param['multiple'] == '1' || $value == 'all') {
                     $multiple = 'multiple';
                     // Auto add [] to name of select
                     $name .= substr($name, -2) == '[]' ? '' : '[]';
                 }
                 $html .= "<select name='{$name}' class='{$class}' {$multiple} {$id} {$extend}>{$options}</select>";
             }
             break;
         case 'color_picker':
             $html .= self::field_type($param['options'], $data);
             break;
         case 'html':
             if (isset($param['content'])) {
                 $html .= $param['content'];
             }
             break;
         case 'panel_group':
             // In format: key => array of params
             $parent_id = PT_CV_Functions::string_random(true);
             $settings = isset($param['settings']) ? $param['settings'] : array();
             foreach ($param['params'] as $key => $param_group) {
                 $html .= self::sub_panel_group($key, $param_group, $data, $parent_id, $settings);
             }
             break;
     }
     $description = apply_filters(PT_CV_PREFIX_ . 'options_description', $description, $param);
     if (!empty($description)) {
         // Append dot to end of description
         if (trim(strip_tags($description)) != '' && substr($description, -1) != '?') {
             $description .= '.';
         }
         $html .= "<p class='text-muted'>{$description}</p>";
     }
     return $html;
 }