esc_html__("Pricing", 'taskereasy'), "base" => "taskereasy_pricing", 'icon' => get_template_directory_uri() . '/assets/images/favicon-icon/shortcode-icon.png', "class" => "", "description" => esc_html__("Add taskereasy pricing", 'taskereasy'), "category" => esc_html__('Taskereasy Shortcodes', 'taskereasy'), "params" => array( array( "type" => "param_group", "heading" => esc_html__("Price List", 'taskereasy'), "param_name" => "price_list", "params" => array( array( "type" => "textfield", "heading" => esc_html__("Title", 'taskereasy'), "param_name" => "title", ), array( "type" => "textfield", "heading" => esc_html__("price", 'taskereasy'), "param_name" => "price", ), array( 'type' => 'dropdown', 'heading' => esc_html__( 'Limit', 'taskereasy' ), 'param_name' => 'limit', 'value' => array('Monthly' => 'monthly', 'Yearly' => 'yearly'), ), array( "type" => "param_group", "heading" => esc_html__("Features", 'taskereasy'), "param_name" => "features", "params" => array( array( "type" => "textfield", "heading" => esc_html__("", 'taskereasy'), "param_name" => "feature", ), ) ), array( 'type' => 'checkbox', 'heading' => esc_html__( 'Plan Tag', 'taskereasy' ), 'param_name' => 'plan_tag', 'value' => '' ), array( 'type' => 'vc_link', 'heading' => esc_html__( 'Button Link', 'taskereasy' ), 'param_name' => 'btn_link', ), array( 'type' => 'dropdown', 'heading' => esc_html__( 'Button Style', 'taskereasy' ), 'param_name' => 'btn_style', 'value' => array('Style 1' => 'style1', 'Style 2' => 'style2') ), ) ), array( 'type' => 'css_editor', 'heading' => esc_html__( 'CSS', 'taskereasy' ), 'param_name' => 'custom_design', 'group' => esc_html__( 'Design options', 'taskereasy' ), ) ) )); add_shortcode( 'taskereasy_pricing', function($atts, $content = null) { extract(shortcode_atts(array( 'price_list' => '', 'custom_design' => '', 'btn_style' => 'style1', 'btn_link' => '', 'plan_tag' => '', ), $atts)); $custom_design = vc_shortcode_custom_css_class( $custom_design, ' ' ); $pricelist = vc_param_group_parse_atts( $atts['price_list'] ); $output = ''; $count = 0; $output .='
'; foreach ($pricelist as $price) { $count_feature = 0; $features_list = vc_param_group_parse_atts($pricelist[$count]['features']); $btnlink = vc_build_link( $pricelist[$count]['btn_link'] ); $btn_link = !empty($btnlink['url']) ? $btnlink['url'] : '#'; $btn_title = $btnlink['title']; $btn_target = !empty($btnlink['target']) ? $btnlink['target'] : '_self'; $output .= '
'; if(isset($pricelist[$count]['plan_tag']) ){ $output .= '
'.esc_html__("Popular", "taskereasy").'
'; } $output .= '
'.esc_html($pricelist[$count]['title']).'
$'.esc_html($pricelist[$count]['price']).' /'.esc_html($pricelist[$count]['limit']).'
    '; foreach ( $features_list as $feature) { $output .= '
  • '.esc_html($features_list[$count_feature]['feature']).'
  • '; $count_feature++; } $output .='
'; if(html_entity_decode(vc_value_from_safe($btn_style, true)) == 'style1'){ if($btn_title){ $output .= ''.esc_html($btn_title).' '; } } if(html_entity_decode(vc_value_from_safe($btn_style, true)) == 'style2'){ if($btn_title){ $output .= ''.esc_html($btn_title).' '; } } $output .= '
'; $count++; } $output .= '
'; return $output; });