| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <?php
- /*------------------------------------------------------*/
- /* taskereasy Heading
- /*------------------------------------------------------*/
- vc_map(array(
- "name" => esc_html__("Icon with text", 'taskereasy'),
- "base" => "taskereasy_icon_text",
- 'icon' => get_template_directory_uri() . '/assets/images/favicon-icon/shortcode-icon.png',
- "class" => "",
- "description" => esc_html__("Add taskereasy image with text", 'taskereasy'),
- "category" => esc_html__('Taskereasy Shortcodes', 'taskereasy'),
- "params" => array(
- array(
- "type" => "param_group",
- "heading" => esc_html__("Icon List", 'taskereasy'),
- "param_name" => "icon_list",
- "params" => array(
- array(
- "type" => "iconpicker",
- "heading" => esc_html__("Icon", 'taskereasy'),
- "param_name" => "icon",
- ),
- array(
- "type" => "textfield",
- "heading" => esc_html__("Title", 'taskereasy'),
- "param_name" => "title",
- ),
- array(
- "type" => "textarea_safe",
- "heading" => esc_html__("Subtitle", 'taskereasy'),
- "param_name" => "subtext",
- ),
- array(
- 'type' => 'colorpicker',
- 'heading' => esc_html__( 'Icon Background', 'taskereasy' ),
- 'param_name' => 'icon_color',
- ),
- ),
- ),
- array(
- 'type' => 'colorpicker',
- 'heading' => esc_html__( 'Description Color', 'taskereasy' ),
- 'param_name' => 'des_color',
- 'group' => esc_html__( 'Custom Design', 'taskereasy' )
- ),
- array(
- 'type' => 'css_editor',
- 'heading' => esc_html__( 'CSS', 'taskereasy' ),
- 'param_name' => 'custom_design',
- 'group' => esc_html__( 'Design options', 'taskereasy' ),
- )
- )
- ));
- add_shortcode( 'taskereasy_icon_text', function($atts, $content = null) {
- extract(shortcode_atts(array(
- 'icon' => '',
- 'title' => '',
- 'subtext' => '',
- 'icon_color' => '#000000',
- 'custom_design' => '',
- ), $atts));
- $custom_design = vc_shortcode_custom_css_class( $custom_design, ' ' );
- $iconlists = vc_param_group_parse_atts( $atts['icon_list'] );
- $output = '';
- $count = 0;
- $output .= '<ul>';
- foreach ($iconlists as $iconlist) {
- $output .= '<li>
- <div class="list_icon" style="background-color:'.esc_attr($iconlists[$count]['icon_color']).';">
- <i class="'.esc_attr($iconlists[$count]['icon']).'"></i>
- </div>
- <h6>'.esc_html($iconlists[$count]['title']).'</h6>
- <p>'.esc_html($iconlists[$count]['subtext']).'</p>
- </li>';
- $count++;
- }
- $output .= '</ul>';
- return $output;
- });
|