"Advanced Pricing List", "category" => 'Advanced Elements', "description" => "Create a nice gallary", "base" => "awavc_pricing_list", "class" => "", "icon" => "price_list_ico", "params" => array( array( "type" => "dropdown", "class" => "", "heading" => __("Styles", "awavcl"), "param_name" => "pricing_style", "value" => array( __("Style 1","awavcl") => 'pricing_1', __("Style 2","awavcl") => 'pricing_2', __("Style 3","awavcl") => 'pricing_3', __("Style 4","awavcl") => 'pricing_4', __("Style 5","awavcl") => 'pricing_5', ), "admin_label" => true, ), array( "type" => "textfield", "heading" => __("Title", 'awavcl'), "param_name" => "title", "description" => __("", 'awavcl'), "value" => __("Title", 'awavcl'), ), array( "type" => "textfield", "heading" => __("Price", 'awavcl'), "param_name" => "price", "description" => __("", 'awavcl'), "value" => __("69", 'awavcl'), ), array( "type" => "iconpicker", "heading" => __("Money Sign", "awavcl"), "param_name" => "font_icon", "value" => "fa fa-usd", ), array( "type" => "textfield", "heading" => __("Plan for", 'awavcl'), "param_name" => "time_frame", "description" => __("", 'awavcl'), "value" => __("monthly", 'awavcl'), ), array( 'type' => 'param_group', 'heading' => __( 'Dertails of Package', 'awavcl' ), 'param_name' => 'facilities_lists', "dependency" => array( 'element' => "pricing_style", 'value' => array('pricing_1','pricing_3') ), 'params' => array( array( "type" => "checkbox", "class" => "", "heading" => __( "Do You Want Text With Link Before Plan Facility Text?", "awavcl" ), "param_name" => "link_yes", "value" => array( __("Yes","awavcl")=>'yes', ), "description" => __( "", "awavcl" ) ), array( "type" => "vc_link", "heading" => __("Linked Text", 'awavcl'), "param_name" => "linked_text", "description" => __("Put your Title and url here{it will be the first part of the full text}", 'awavcl'), "value" => __("monthly", 'awavcl'), "dependency" => array( 'element' => "link_yes", 'value' => 'yes', ), ), array( "type" => "textfield", "heading" => __("Package Contains", 'awavcl'), "param_name" => "fc_text", "description" => __("", 'awavcl'), "value" => __("Have A Button", 'awavcl'), ), array( "type" => "textfield", "heading" => __("Tooltip/Hover Text", 'awavcl'), "param_name" => "tooltip_txt", "description" => __("", 'awavcl'), "value" => __("Lorem ipsum dolor sit amet, ei duis putent argumentum eam.", 'awavcl'), ), ), ), array( 'type' => 'param_group', 'heading' => __( 'Dertails of Package', 'awavcl' ), 'param_name' => 'at_lists', "dependency" => array( 'element' => "pricing_style", 'value' => array('pricing_2',) ), 'params' => array( array( "type" => "checkbox", "class" => "", "heading" => __( "Do You Want Text With Link Before Plan Facility Text?", "awavcl" ), "param_name" => "link_yes_s", "value" => array( __("Yes","awavcl")=>'y', ), "description" => __( "", "awavcl" ) ), array( "type" => "vc_link", "heading" => __("Linked Text", 'awavcl'), "param_name" => "linked_text_s", "description" => __("Put your Title and url here{it will be the first part of the full text}", 'awavcl'), "value" => __("monthly", 'awavcl'), "dependency" => array( 'element' => "link_yes_s", 'value' => 'y', ), ), ), ), array( 'type' => 'param_group', 'heading' => __( 'Dertails of Package', 'awavcl' ), 'param_name' => 'sol_lists', "dependency" => array( 'element' => "pricing_style", 'value' => array('pricing_4','pricing_5') ), 'params' => array( array( "type" => "checkbox", "class" => "", "heading" => __( "Do You Want Text With Link Before Plan Facility Text?", "awavcl" ), "param_name" => "link_yes_y", "value" => array( __("Yes","awavcl")=>'y', ), "description" => __( "", "awavcl" ) ), array( "type" => "vc_link", "heading" => __("Linked Text", 'awavcl'), "param_name" => "linked_text_y", "description" => __("Put your Title and url here{it will be the first part of the full text}", 'awavcl'), "value" => __("monthly", 'awavcl'), "dependency" => array( 'element' => "link_yes_y", 'value' => 'y', ), ), array( "type" => "textfield", "heading" => __("Package Contains", 'awavcl'), "param_name" => "fc_text_y", "description" => __("", 'awavcl'), "value" => __("Lorem Ipsum", 'awavcl'), ), array( "type" => "dropdown", "class" => "", "heading" => __( "This Facility ", "awavcl" ), "param_name" => "in_or_out", "value" => array( __("Included","awavcl")=>'fa-check', __("Excluded","awavcl")=>'fa-close', ), "description" => __( "", "awavcl" ) ), ), ), array( "type" => "vc_link", "heading" => __("Button Text And Title", 'awavcl'), "param_name" => "btn_text", "description" => __("Put the url and title", 'awavcl'), "value" => array( 'title' => 'Button', 'url' => '#', ), "group" => __("Button", 'awavcl'), ), array( "type" => "textfield", "heading" => __("Promotional Text", 'awavcl'), "param_name" => "promo_text", "description" => __("If you dont want to put a promotional text keep it blank", 'awavcl'), "value" => __("Best Seller", 'awavcl'), ), array( 'type' => 'prime_slider', 'heading' => __( 'Title Font Size', 'awavcl' ), 'param_name' => 'ttl_size', "value" => 42, "min" => 5, "max" => 110, "step" => 1, "unit" => "px", "description" => __("", "awavcl"), "group" => __("Settings", 'awavcl'), "dependency" => array( 'element' => "pricing_style", 'value' => array('pricing_1','pricing_4') ), ), array( 'type' => 'prime_slider', 'heading' => __( 'Title Font Size', 'awavcl' ), 'param_name' => 'ttl_size_s', "value" => 35, "min" => 5, "max" => 110, "step" => 1, "unit" => "px", "description" => __("", "awavcl"), "group" => __("Settings", 'awavcl'), "dependency" => array( 'element' => "pricing_style", 'value' => array('pricing_2','pricing_3') ), ), array( 'type' => 'prime_slider', 'heading' => __( 'Price Size', 'awavcl' ), 'param_name' => 'price_size', "value" => 60, "min" => 5, "max" => 110, "step" => 1, "unit" => "px", "description" => __("", "awavcl"), "group" => __("Settings", 'awavcl'), "dependency" => array( 'element' => "pricing_style", 'value' => array('pricing_1','pricing_4') ), ), array( 'type' => 'prime_slider', 'heading' => __( 'Price Size', 'awavcl' ), 'param_name' => 'price_size_s', "value" => 22, "min" => 5, "max" => 110, "step" => 1, "unit" => "px", "description" => __("", "awavcl"), "group" => __("Settings", 'awavcl'), "dependency" => array( 'element' => "pricing_style", 'value' => array('pricing_2','pricing_3') ), ), array( 'type' => 'prime_slider', 'heading' => __( 'Facility Text Size', 'awavcl' ), 'param_name' => 'fc_txt_size', "value" => 18, "min" => 5, "max" => 110, "step" => 1, "unit" => "px", "description" => __("", "awavcl"), "group" => __("Settings", 'awavcl'), ), array( "type" => "dropdown", "class" => "", "heading" => __("Facility Text Style", "awavcl"), "param_name" => "fc_font_style", "value" => array( __("Normal","awavcl") => '', __("Italic","awavcl") => 'italic', ), "group" => __("Settings", 'awavcl'), ), array( 'type' => 'prime_slider', 'heading' => __( 'Margin Bottom', 'awavcl' ), 'param_name' => 'pd_btm', "value" =>50, "min" => 5, "max" => 110, "step" => 1, "unit" => "px", "description" => __("", "awavcl"), "group" => __("Button", 'awavcl'), ), array( 'type' => 'prime_slider', 'heading' => __( 'Button Text Size', 'awavcl' ), 'param_name' => 'btn_txt_size', "value" =>22, "min" => 5, "max" => 110, "step" => 1, "unit" => "px", "description" => __("", "awavcl"), "group" => __("Button", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Top Background", 'awavcl'), "param_name" => "tp_bg_clr", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( 'element' => "pricing_style", 'value' => array('pricing_2','pricing_3','pricing_4') ), ), array( "type" => "colorpicker", "heading" => __("List Background", 'awavcl'), "param_name" => "bg_clr", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("List Background 2", 'awavcl'), "param_name" => "bg_clr_list", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( 'element' => "pricing_style", 'value' => array('pricing_2','pricing_4',) ), ), array( "type" => "colorpicker", "heading" => __("Title Color", 'awavcl'), "param_name" => "ttl_clr", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Price Color", 'awavcl'), "param_name" => "price_clr", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Plan Time Color", 'awavcl'), "param_name" => "time_clr", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Facility Text Color", 'awavcl'), "param_name" => "fc_txt_clr", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Facility Link Color", 'awavcl'), "param_name" => "fc_lnk_clr", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Heilighted Text", 'awavcl'), "param_name" => "highlighted_clr", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( 'element' => "pricing_style", 'value' => array('pricing_1',) ), ), array( "type" => "colorpicker", "heading" => __("Tooltip Text Color", 'awavcl'), "param_name" => "tooltip_clr", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( 'element' => "pricing_style", 'value' => array('pricing_3',) ), ), array( "type" => "colorpicker", "heading" => __("Border Color", 'awavcl'), "param_name" => "brdr_clr", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( 'element' => "pricing_style", 'value' => array('pricing_3','pricing_5') ), ), array( "type" => "colorpicker", "heading" => __("Button Text Color", 'awavcl'), "param_name" => "btn_txt_clr", "value" => "", "group" => __("Button", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Button Background", 'awavcl'), "param_name" => "btn_bg", "value" => "", "group" => __("Button", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Button Background on Hover", 'awavcl'), "param_name" => "btn_bg_hvr", "value" => "", "group" => __("Button", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Promo Color", 'awavcl'), "param_name" => "promo_clr", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Promo Background Color", 'awavcl'), "param_name" => "promo_bg", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "textfield", "heading" => esc_attr__("Extra class name", 'advc'), "param_name" => "el_class", "description" => esc_attr__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'advc'), ), ) )); function awavc_pricing_list_shortcode($atts, $content = null) { extract(shortcode_atts(array( //'show_btnnnn' => 'Yes', 'pricing_style' => 'pricing_1', 'title' => 'Premium', 'price' => '69', 'font_icon' => 'fa fa-usd', 'time_frame' => 'mo', 'facilities_lists' => '', 'btn_text' => 'Buy Now', 'promo_text' => 'Sell On', 'ttl_size' => '', 'fc_txt_size' => '', 'fc_font_style' => '', 'btn_txt_size' => '', 'bg_clr' => '', 'ttl_clr' => '', 'fc_txt_clr' => '', 'fc_lnk_clr' => '', 'highlighted_clr' => '', 'btn_txt_clr' => '', 'btn_bg' => '', 'btn_bg_hvr' => '', 'price_size' => '', 'price_clr' => '', 'time_clr' => '', 'promo_clr' => '', 'promo_bg' => '', 'promo_bg_hvr' => '', 'el_class' => '', 'ttl_size_s' => '', 'price_size_s' => '', 'at_lists' => '', 'tp_bg_clr' => '', 'bg_clr_list' => '', 'tooltip_clr' => '', 'brdr_clr' => '', 'pd_btm' => '', 'sol_lists' => '', ), $atts)); $btn_text = vc_build_link( $btn_text); $btn_url = $btn_text['url']; $btn_title = $btn_text['title']; $btn_target = $btn_text['target']; $facilities_lists = vc_param_group_parse_atts($facilities_lists); $at_lists = vc_param_group_parse_atts($at_lists); $sol_lists = vc_param_group_parse_atts($sol_lists); wp_register_style( 'awavcl.pricing-list', plugins_url( '/css/pricing-list.css', __FILE__) ); wp_enqueue_style( 'awavcl.pricing-list' ); if($pricing_style == 'pricing_3' || 'pricing_4'){ wp_register_style( 'awsxbootstrap.css', plugins_url( '/css/bootstrap.css', __FILE__) ); wp_enqueue_style( 'awsxbootstrap.css' ); wp_register_script('awsxbootstrap.js', plugins_url('js/bootstrap.min.js', __FILE__), array("jquery")); wp_enqueue_script('awsxbootstrap.js'); } //$image_url = wp_get_attachment_url( $image, 'full' ); //$image = aq_resize( $image_url, 296, 289, false ); //resize & crop the image //var_dump($image); $html = ''; if($pricing_style == 'pricing_1') { $add_class = (rand(99,9999)); $html .= '

'.$title.'

'.$price.' /'.$time_frame.'

    '; foreach($facilities_lists as $facilities_list){ if(!empty($facilities_list['linked_text'])){ $text_with_link =''; $linked_text = vc_build_link( $facilities_list['linked_text']); $link_url =$linked_text['url']; $link_txt =$linked_text['title']; $link_target =$linked_text['target']; $text_with_link =''.$link_txt.' '; } if($facilities_list['fc_text']){$fc_text = $facilities_list['fc_text'];} if($facilities_list['tooltip_txt']){$tooltip_txt = $facilities_list['tooltip_txt'];} $html .= '
  • '.$text_with_link.' '.$fc_text.' '.$tooltip_txt.'
  • '; } $html .= '
'.$btn_title.''; if(!empty($promo_text)){ $html .= ''; } $html .= '
'; } if($pricing_style == 'pricing_2') { $add_class = (rand(99,9999)); $html .= '
'; if(!empty($promo_text)){ $html .= ''.$promo_text.' '; } $html .= '

'.$title.'

'.$price.'

/'.$time_frame.'
    '; foreach($at_lists as $at_list){ if(!empty($at_list['linked_text_s'])){ $text_with_link =''; $linked_text_s = vc_build_link( $at_list['linked_text_s']); $link_url_s =$linked_text_s['url']; $link_txt_s =$linked_text_s['title']; $link_target_s =$linked_text_s['target']; $text_with_link =''.$link_txt_s.'  '; } if($at_list['fc_text_s']){$fc_text_s = $at_list['fc_text_s'];} $html .= '
  • '.$text_with_link.' '. $fc_text_s.'
  • '; } $html .='
'; if(!empty($btn_title)){ $html .=''.$btn_title.''; } $html .='
'; } if($pricing_style == 'pricing_3') { $add_class = rand(99,9999); $unq_id = rand(0,999); $html .= '
'; if(!empty($promo_text)){ $html .= ''.$promo_text.' '; } $html .= '

'.$title.' '.$price.'

'.$time_frame.'
'; if(!empty($btn_title)){ $html .=''.$btn_title.''; } $html .='
    '; foreach($facilities_lists as $facilities_list){ if(!empty($facilities_list['linked_text'])){ $text_with_link =''; $unq_id = rand(0,999); $linked_text = vc_build_link( $facilities_list['linked_text']); $link_url =$linked_text['url']; $link_txt =$linked_text['title']; $link_target =$linked_text['target']; $text_with_link =''.$link_txt.' '; } if($facilities_list['fc_text']){$fc_text = $facilities_list['fc_text'];} if($facilities_list['tooltip_txt']){$tooltip_txt = $facilities_list['tooltip_txt'];} $html .= '
  • '.$tooltip_txt.'
    '; } $html .= '
'; } if($pricing_style == 'pricing_4') { $add_class = rand(99,9999); $unq_id = rand(0,999); $html .= '
'; if(!empty($promo_text)){ $html .= ''.$promo_text.' '; } $html .= '

'.$title.'

'.$time_frame.'
'; } if($pricing_style == 'pricing_5') { $add_class = rand(99,9999); $unq_id = rand(0,999); $html .= '
'; if(!empty($promo_text)){ $html .= ''.$promo_text.' '; } $html .= '

'.$title.'

'.$time_frame.'
'; } return $html; } add_shortcode("awavc_pricing_list", "awavc_pricing_list_shortcode");