esc_html__("FAQs", 'taskereasy'), "base" => "taskereasy_faqs", 'icon' => get_template_directory_uri() . '/assets/images/favicon-icon/shortcode-icon.png', "class" => "", "description" => esc_html__("Add taskereasy faqs", 'taskereasy'), "category" => esc_html__('Taskereasy Shortcodes', 'taskereasy'), "params" => array( array( "type" => "param_group", "heading" => esc_html__("FAQs", 'taskereasy'), "param_name" => "faqs_list", "value" => '', "params" => array( array( "type" => "textfield", "heading" => esc_html__("Title", 'taskereasy'), "param_name" => "title", ), array( "type" => "textarea_safe", "heading" => esc_html__("Description", 'taskereasy'), "param_name" => "faq_description", ), array( "type" => "checkbox", "heading" => esc_html__("Show Icon", 'taskereasy'), "param_name" => "show_icon", ), array( "type" => "iconpicker", "heading" => esc_html__("Icon", 'taskereasy'), "param_name" => "faq_icon", "dependency" => array('element' => "show_icon", 'not_empty' => TRUE), ), array( "type" => "colorpicker", "heading" => esc_html__("Icon Color", 'taskereasy'), "param_name" => "icon_color", "dependency" => array('element' => "show_icon", 'not_empty' => TRUE), ), ), ), array( 'type' => 'css_editor', 'heading' => esc_html__( 'CSS', 'taskereasy' ), 'param_name' => 'custom_design', 'group' => esc_html__( 'Design options', 'taskereasy' ), ), ) )); add_shortcode( 'taskereasy_faqs', function($atts, $content = null) { extract(shortcode_atts(array( 'faq_icon' => '', 'icon_color' => '#000000', 'custom_design' => '', ), $atts)); $custom_design = vc_shortcode_custom_css_class( $custom_design, ' ' ); $faqs_list = vc_param_group_parse_atts( $atts['faqs_list'] ); $output = ''; $count = 0; $showicon = ($faqs_list[$count]['show_icon'] == 'true') ? 'showicon' : ''; $output .='
'; foreach ($faqs_list as $faq) { if($count == 0) { $show = 'show'; } else{ $show = '';} $output .= '
'.esc_html($faqs_list[$count]['faq_description']).'
'; $count++; } $output .= '
'; return $output; });