Advertisement
rejuancse

pricing-table

Dec 19th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 42.03 KB | None | 0 0
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3.     exit; // Exit if accessed directly.
  4. }
  5.  
  6. class Eventco_Pricing_Table{
  7.  
  8.     public function get_name(){
  9.         return 'eventco_pricing_table';
  10.     }
  11.     public function get_title(){
  12.         return 'Pricing Table';
  13.     }
  14.     public function get_icon() {
  15.         return 'wppb-font-pricing-table';
  16.     }
  17.     public function get_category_name(){
  18.         return __( 'Eventco Widgets', 'eventco-core' );
  19.     }
  20.  
  21.     // Pricing Settings Fields
  22.     public function get_settings() {
  23.  
  24.         $settings = array(
  25.             'pricing_layout' => array(
  26.                 'type' => 'radioimage',
  27.                 'title' => 'Select layout',
  28.                 'values'=> array(
  29.                     'one' =>  WPPB_DIR_URL.'addons/pricing_table/img/pricing-img1.png',
  30.                     'two' =>  WPPB_DIR_URL.'addons/pricing_table/img/pricing-img2.png',
  31.                     'three' =>  WPPB_DIR_URL.'addons/pricing_table/img/pricing-img3.png',
  32.                     'four' =>  WPPB_DIR_URL.'addons/pricing_table/img/pricing-img3.png',
  33.                 ),
  34.                 'std' => 'one',
  35.             ),
  36.             'title' => array(
  37.                 'type' => 'text',
  38.                 'title' => __('Title','wp-pagebuilder'),
  39.                 'std' => 'Standards',
  40.             ),
  41.             'subtitle' => array(
  42.                 'type' => 'text',
  43.                 'title' => __('Sub title','wp-pagebuilder'),
  44.                 'std' => 'Best plan for you',
  45.                 'depends' => array(array('pricing_layout', '!=', array('three'))),
  46.             ),
  47.             'currency' => array(
  48.                 'type' => 'text',
  49.                 'title' => __('Currency symbol','wp-pagebuilder'),
  50.                 'std' => '$',
  51.             ),
  52.             'pricing' => array(
  53.                 'type' => 'text',
  54.                 'title' => __('Sales Price','wp-pagebuilder'),
  55.                 'std' => '89',
  56.             ),
  57.             'sales' => array(
  58.                 'type' => 'text',
  59.                 'title' => __('Regular Price','wp-pagebuilder'),
  60.                 'std' => '',
  61.             ),
  62.             'period' => array(
  63.                 'type' => 'text',
  64.                 'title' => __('Period','wp-pagebuilder'),
  65.                 'std' => '/ Month',
  66.             ),
  67.             'pt_icon_list' => array(
  68.                 'type' => 'icon',
  69.                 'title' => __('Icon list','wp-pagebuilder'),
  70.                 'std' => 'fa fa-star-o',
  71.                 'depends' => array(array('pricing_layout', '!=', array('three'))),
  72.             ),
  73.             'pricing_feature' => array(
  74.                 'title' => __('Pricing Features','wp-pagebuilder'),
  75.                 'type' => 'repeatable',
  76.                 'label' => 'feature_text',
  77.                 'std' => array(
  78.                     array(
  79.                         'feature_text' => 'One year support',
  80.                         'icon_list' => 'fa fa-check',
  81.                         'icon_list_color' => '#23c131'
  82.                     ),
  83.                     array(
  84.                         'feature_text' => 'Unlimited ready theme',
  85.                         'icon_list' => 'fa fa-close',
  86.                         'icon_list_color' => '#ff0000'
  87.                     ),
  88.                     array(
  89.                         'feature_text' => 'Unlimited Free addons',
  90.                         'icon_list' => 'fa fa-check',
  91.                         'icon_list_color' => '#23c131'
  92.                     ),
  93.                     array(
  94.                         'feature_text' => 'Five site support',
  95.                         'icon_list' => 'fa fa-check',
  96.                         'icon_list_color' => '#23c131'
  97.                     ),
  98.                 ),
  99.                 'attr' => array(
  100.                     'feature_text' => array(
  101.                         'type' => 'text',
  102.                         'title' => __('Title','wp-pagebuilder'),
  103.                         'std' => 'One year support'
  104.                     ),
  105.                     'icon_list' => array(
  106.                         'type' => 'icon',
  107.                         'title' => __('Icon','wp-pagebuilder'),
  108.                         'std' => 'fa fa-check'
  109.                     ),
  110.                     'icon_list_color' => array(
  111.                         'type' => 'color',
  112.                         'title' => __('Icon color','wp-pagebuilder'),
  113.                         'selector' => '{{SELECTOR}} .wppb-pricing-list i { color: {{data.icon_list_color}}; }'
  114.                     ),
  115.                 ),
  116.             ),         
  117.  
  118.             'button_text' => array(
  119.                 'type' => 'text',
  120.                 'title' => __('Button text','wp-pagebuilder'),
  121.                 'std' => 'Buy Now',
  122.                 'placeholder'=> 'Button',
  123.             ),
  124.             'btn_link' => array(
  125.                 'type' => 'link',
  126.                 'title' => __('Button Link','wp-pagebuilder'),
  127.                 'std' => array('link'=>'#','window'=>true,'nofolow'=>false),
  128.                 'depends' => array(array('button_text', '!=', '')),
  129.             ),
  130.             'icon_list' => array(
  131.                 'type' => 'icon',
  132.                 'title' => __('Button icon','wp-pagebuilder'),
  133.                 'std' => '',
  134.                 'depends' => array(array('button_text', '!=', '')),
  135.             ),
  136.             'icon_position' => array(
  137.                 'type' => 'select',
  138.                 'title' => __('Button icon position','wp-pagebuilder'),
  139.                 'depends' => array(array('icon_list', '!=', '')),
  140.                 'values' => array(
  141.                     'left' => __('Left','wp-pagebuilder'),
  142.                     'right' => __('Right','wp-pagebuilder'),
  143.                 ),
  144.                 'std' => 'left',
  145.             ),
  146.  
  147.             'aditional_info' => array(
  148.                 'type' => 'text',
  149.                 'title' => __('Aditional Info','wp-pagebuilder'),
  150.                 'std' => 'Support Time 24 hrs',
  151.             ),
  152.  
  153.             'pricing_align' => array(
  154.                 'type' => 'alignment',
  155.                 'title' => __('Alignment','wp-pagebuilder'),
  156.                 'std' => array( 'md' => 'center', 'sm' => 'center', 'xs' => 'center' ),
  157.                 'responsive' => true,
  158.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content{ text-align: {{data.pricing_align}}; }'
  159.             ),
  160.  
  161.             // Style Area
  162.             'pricing_content_color' => array(
  163.                 'type' => 'color',
  164.                 'title' => __('Color','wp-pagebuilder'),
  165.                 'tab' => 'style',
  166.                 'section' => 'Pricing Feature',
  167.                 'selector' => '{{SELECTOR}} .wppb-pricing-feature { color: {{data.pricing_content_color}}; }'
  168.             ),
  169.             'pricing_content_odd' => array(
  170.                 'type' => 'color',
  171.                 'title' => __('Odd number bg color','wp-pagebuilder'),
  172.                 'tab' => 'style',
  173.                 'section' => 'Pricing Feature',
  174.                 'selector' => '{{SELECTOR}} .wppb-pricing-feature div:nth-child(odd) .wppb-pricing-list { background: {{data.pricing_content_odd}}; }'
  175.             ),
  176.             'pricing_content_even' => array(
  177.                 'type' => 'color',
  178.                 'title' => __('Even number bg color','wp-pagebuilder'),
  179.                 'tab' => 'style',
  180.                 'section' => 'Pricing Feature',
  181.                 'selector' => '{{SELECTOR}} .wppb-pricing-feature div:nth-child(even) .wppb-pricing-list { background: {{data.pricing_content_even}}; }'
  182.             ),
  183.             'content_fontstyle' => array(
  184.                 'type' => 'typography',
  185.                 'title' => __('Typography','wp-pagebuilder'),
  186.                 'std' => array(
  187.                     'fontFamily' => '',
  188.                     'fontSize' => array( 'md'=>'14px', 'sm'=>'', 'xs'=>'' ),
  189.                     'lineHeight' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  190.                     'fontWeight' => '400',
  191.                     'textTransform' => '',
  192.                     'fontStyle' => '',
  193.                     'letterSpacing' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  194.                 ),
  195.                 'selector' => '{{SELECTOR}} .wppb-pricing-feature',
  196.                 'section' => 'Pricing Feature',
  197.                 'tab' => 'style',
  198.             ),
  199.             'content_margin' => array(
  200.                 'type' => 'dimension',
  201.                 'title' => 'Margin',
  202.                 'unit' => array( 'px','em','%' ),
  203.                 'responsive' => true,
  204.                 'tab' => 'style',
  205.                 'selector' => '{{SELECTOR}} .wppb-pricing-feature { margin: {{data.content_margin}}; }',
  206.                 'section' => 'Pricing Feature',
  207.             ),
  208.             'content_border' => array(
  209.                 'type' => 'border',
  210.                 'title' => 'Border bottom',
  211.                 'std' => array(
  212.                     'borderWidth' => array( 'bottom' => '1px' ),
  213.                     'borderStyle' => 'solid',
  214.                     'borderColor' => '#e5e5e5'
  215.                 ),
  216.                 'tab' => 'style',
  217.                 'section' => 'Pricing Feature',
  218.                 'selector' => '{{SELECTOR}} .wppb-pricing-list'
  219.             ),
  220.  
  221.             //title
  222.             'title_color' => array(
  223.                 'type' => 'color',
  224.                 'title' => __('Color','wp-pagebuilder'),
  225.                 'tab' => 'style',
  226.                 'section' => 'Pricing Title',
  227.                 'selector' => '{{SELECTOR}} .wppb-pricing-title, {{SELECTOR}} .pricing-layout-two .wppb-pricing-title, {{SELECTOR}} .pricing-layout-one .wppb-pricing-title { color: {{data.title_color}}; }'
  228.             ),
  229.             'title_bg' => array(
  230.                 'type' => 'color2',
  231.                 'title' => __('Background','wp-pagebuilder'),
  232.                 'tab' => 'style',
  233.                 'clip' => false,
  234.                 'std' => array(
  235.                     'colorType' => 'color',
  236.                     'colorColor' => '#36ADFF',
  237.                     'clip' => false,
  238.                 ),
  239.                 'section' => 'Pricing Title',
  240.                 'selector' => '{{SELECTOR}} .pricing-layout-two .wppb-pricing-title-wrap,
  241.                 {{SELECTOR}} .pricing-layout-one .wppb-pricing-title-wrap',
  242.                 'depends' => array(array('pricing_layout', '!=', array('three'))),
  243.             ),
  244.             'title_fontstyle' => array(
  245.                 'type' => 'typography',
  246.                 'title' => __('Typography','wp-pagebuilder'),
  247.                 'std' => array(
  248.                     'fontFamily' => '',
  249.                     'fontSize' => array( 'md'=>'28px', 'sm'=>'', 'xs'=>'' ),
  250.                     'lineHeight' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  251.                     'fontWeight' => '700',
  252.                     'textTransform' => '',
  253.                     'fontStyle' => '',
  254.                     'letterSpacing' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  255.                 ),
  256.                 'selector' => '{{SELECTOR}} .wppb-pricing-title',
  257.                 'section' => 'Pricing Title',
  258.                 'tab' => 'style',
  259.             ),
  260.             'title_radius' => array(
  261.                 'type' => 'dimension',
  262.                 'title' => __('Border radius','wp-pagebuilder'),
  263.                 'responsive' => true,
  264.                 'tab' => 'style',
  265.                 'unit' => array( 'px','%','em' ),
  266.                 'section' => 'Pricing Title',
  267.                 'depends' => array(array('pricing_layout', '!=', array('three'))),
  268.                 'selector' => '{{SELECTOR}} .wppb-pricing-title-wrap { border-radius: {{data.title_radius}}; }'
  269.             ),
  270.             'title_padding' => array(
  271.                 'type' => 'dimension',
  272.                 'title' => 'Padding',
  273.                 'unit' => array( 'px','em','%' ),
  274.                 'responsive' => true,
  275.                 'tab' => 'style',
  276.                 'selector' => '{{SELECTOR}} .wppb-pricing-title-wrap { padding: {{data.title_padding}}; }',
  277.                 'section' => 'Pricing Title',
  278.                 'depends' => array(array('pricing_layout', '!=', array('three'))),
  279.             ),
  280.             'title_margin' => array(
  281.                 'type' => 'dimension',
  282.                 'title' => 'Margin',
  283.                 'unit' => array( 'px','em','%' ),
  284.                 'responsive' => true,
  285.                 'tab' => 'style',
  286.                 'selector' => '{{SELECTOR}} .wppb-pricing-title { margin: {{data.title_margin}}; }',
  287.                 'section' => 'Pricing Title',
  288.             ),
  289.            
  290.             //sub title
  291.             'pricing_subtitle' => array(
  292.                 'type' => 'color',
  293.                 'title' => __('Pricing sub Color','wp-pagebuilder'),
  294.                 'tab' => 'style',
  295.                 'section' => 'Pricing Sub title',
  296.                 'selector' => '{{SELECTOR}} .wppb-pricing-subtitle,{{SELECTOR}} .pricing-layout-two .wppb-pricing-subtitle, {{SELECTOR}} .pricing-layout-one .wppb-pricing-subtitle { color: {{data.pricing_subtitle}}; }',
  297.                 'depends' => array(array('pricing_layout', '!=', array('three'))),
  298.             ),
  299.             'subtitle_fontstyle' => array(
  300.                 'type' => 'typography',
  301.                 'title' => __('Typography','wp-pagebuilder'),
  302.                 'std' => array(
  303.                     'fontFamily' => '',
  304.                     'fontSize' => array( 'md'=>'28px', 'sm'=>'', 'xs'=>'' ),
  305.                     'lineHeight' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  306.                     'fontWeight' => '700',
  307.                     'textTransform' => '',
  308.                     'fontStyle' => '',
  309.                     'letterSpacing' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  310.                 ),
  311.                 'selector' => '{{SELECTOR}} .wppb-pricing-subtitle',
  312.                 'section' => 'Pricing Sub title',
  313.                 'tab' => 'style',
  314.                 'depends' => array(array('pricing_layout', '!=', array('three'))),
  315.             ),
  316.             'subtitle_margin' => array(
  317.                 'type' => 'slider',
  318.                 'title' => __('Sub margin bottom','wp-pagebuilder'),
  319.                 'unit' => array( 'px','%','em' ),
  320.                 'range' => array(
  321.                         'em' => array(
  322.                             'min' => 0,
  323.                             'max' => 25,
  324.                             'step' => .1,
  325.                         ),
  326.                         'px' => array(
  327.                             'min' => 0,
  328.                             'max' => 200,
  329.                             'step' => 1,
  330.                         ),
  331.                         '%' => array(
  332.                             'min' => 0,
  333.                             'max' => 100,
  334.                             'step' => 1,
  335.                         ),
  336.                     ),
  337.                 'std' => array(
  338.                         'md' => '10px',
  339.                         'sm' => '',
  340.                         'xs' => '',
  341.                     ),
  342.                 'responsive' => true,
  343.                 'tab' => 'style',
  344.                 'section' => 'Pricing Sub title',
  345.                 'selector' => '{{SELECTOR}} .wppb-pricing-subtitle { margin-bottom: {{data.subtitle_margin}}; }',
  346.                 'depends' => array(array('pricing_layout', '!=', array('three'))),
  347.             ), 
  348.  
  349.             //Icon
  350.             'icon_color' => array(
  351.                 'type' => 'color',
  352.                 'title' => __('Icon','wp-pagebuilder'),
  353.                 'tab' => 'style',
  354.                 'section' => 'Icon',
  355.                 'selector' => '{{SELECTOR}} .wppb-pricing-table-icon i { color: {{data.icon_color}}; }'
  356.             ),
  357.             'icon_bg' => array(
  358.                 'type' => 'color',
  359.                 'title' => __('Icon Background','wp-pagebuilder'),
  360.                 'tab' => 'style',
  361.                 'section' => 'Icon',
  362.                 'selector' => '{{SELECTOR}} .wppb-pricing-table-icon i { background: {{data.icon_bg}}; }'
  363.             ),
  364.             'icon_section_bg' => array(
  365.                 'type' => 'color2',
  366.                 'title' => __('Icon section background color','wp-pagebuilder'),
  367.                 'tab' => 'style',
  368.                 'section' => 'Icon',
  369.                 'clip' => false,
  370.                 'std' => array(
  371.                     'colorType' => 'color',
  372.                     'colorColor' => '#2399ea',
  373.                     'clip' => false,
  374.                 ),
  375.                 'selector' => '{{SELECTOR}} .wppb-pricing-table-icon,
  376.                 {{SELECTOR}} .pricing-layout-two .wppb-pricing-table-icon,
  377.                 {{SELECTOR}} .pricing-layout-one .wppb-pricing-table-icon',
  378.                 'depends' => array(array('pricing_layout', '!=', array('three'))),
  379.             ),
  380.             'icon_size' => array(
  381.                 'type' => 'slider',
  382.                 'title' => __('Icon Size','wp-pagebuilder'),
  383.                 'unit' => array( 'px','%','em' ),
  384.                 'range' => array(
  385.                         'em' => array(
  386.                             'min' => 0,
  387.                             'max' => 100,
  388.                             'step' => .1,
  389.                         ),
  390.                         'px' => array(
  391.                             'min' => 0,
  392.                             'max' => 300,
  393.                             'step' => 1,
  394.                         ),
  395.                         '%' => array(
  396.                             'min' => 0,
  397.                             'max' => 100,
  398.                             'step' => 1,
  399.                         ),
  400.                     ),
  401.                 'std' => array(
  402.                         'md' => '20px',
  403.                         'sm' => '',
  404.                         'xs' => '',
  405.                     ),
  406.                 'responsive' => true,
  407.                 'tab' => 'style',
  408.                 'section' => 'Icon',
  409.                 'selector' => '{{SELECTOR}} .wppb-pricing-table-icon i { font-size: {{data.icon_size}}; }'
  410.             ),
  411.             'icon_line_height' => array(
  412.                 'type' => 'slider',
  413.                 'title' => __('Icon line height','wp-pagebuilder'),
  414.                 'unit' => array( 'px','%','em' ),
  415.                 'range' => array(
  416.                         'em' => array(
  417.                             'min' => 0,
  418.                             'max' => 100,
  419.                             'step' => .1,
  420.                         ),
  421.                         'px' => array(
  422.                             'min' => 0,
  423.                             'max' => 300,
  424.                             'step' => 1,
  425.                         ),
  426.                         '%' => array(
  427.                             'min' => 0,
  428.                             'max' => 100,
  429.                             'step' => 1,
  430.                         ),
  431.                     ),
  432.                 'std' => array(
  433.                         'md' => '60px',
  434.                         'sm' => '',
  435.                         'xs' => '',
  436.                     ),
  437.                 'responsive' => true,
  438.                 'tab' => 'style',
  439.                 'section' => 'Icon',
  440.                 'selector' => '{{SELECTOR}} .wppb-pricing-table-icon i { line-height: {{data.icon_line_height}}; }'
  441.             ),
  442.             'icon_width' => array(
  443.                 'type' => 'slider',
  444.                 'title' => __('Icon Width','wp-pagebuilder'),
  445.                 'unit' => array( 'px','%','em' ),
  446.                 'range' => array(
  447.                         'em' => array(
  448.                             'min' => 0,
  449.                             'max' => 20,
  450.                             'step' => .1,
  451.                         ),
  452.                         'px' => array(
  453.                             'min' => 0,
  454.                             'max' => 300,
  455.                             'step' => 1,
  456.                         ),
  457.                         '%' => array(
  458.                             'min' => 0,
  459.                             'max' => 100,
  460.                             'step' => 1,
  461.                         ),
  462.                     ),
  463.                 'std' => array(
  464.                         'md' => '60px',
  465.                         'sm' => '',
  466.                         'xs' => '',
  467.                     ),
  468.                 'responsive' => true,
  469.                 'tab' => 'style',
  470.                 'section' => 'Icon',
  471.                 'selector' => '{{SELECTOR}} .wppb-pricing-table-icon i { width: {{data.icon_width}}; }'
  472.             ),
  473.             'icon_height' => array(
  474.                 'type' => 'slider',
  475.                 'title' => __('Icon Height','wp-pagebuilder'),
  476.                 'unit' => array( 'px','%','em' ),
  477.                 'range' => array(
  478.                         'em' => array(
  479.                             'min' => 0,
  480.                             'max' => 20,
  481.                             'step' => .1,
  482.                         ),
  483.                         'px' => array(
  484.                             'min' => 0,
  485.                             'max' => 300,
  486.                             'step' => 1,
  487.                         ),
  488.                         '%' => array(
  489.                             'min' => 0,
  490.                             'max' => 100,
  491.                             'step' => 1,
  492.                         ),
  493.                     ),
  494.                 'std' => array(
  495.                         'md' => '60px',
  496.                         'sm' => '',
  497.                         'xs' => '',
  498.                     ),
  499.                 'responsive' => true,
  500.                 'tab' => 'style',
  501.                 'section' => 'Icon',
  502.                 'selector' => '{{SELECTOR}} .wppb-pricing-table-icon i{ height: {{data.icon_height}}; }'
  503.             ),
  504.             'icon_border' => array(
  505.                 'type' => 'border',
  506.                 'title' => 'Icon Title',
  507.                 'std' => array(
  508.                     'borderWidth' => array( 'top' => '0px', 'right' => '0px', 'bottom' => '0px', 'left' => '0px' ),
  509.                     'borderStyle' => 'solid',
  510.                     'borderColor' => '#cccccc'
  511.                 ),
  512.                 'tab' => 'style',
  513.                 'section' => 'Icon',
  514.                 'selector' => '{{SELECTOR}} .wppb-pricing-table-icon i'
  515.             ),
  516.             'icon_radius' => array(
  517.                 'type' => 'dimension',
  518.                 'title' => __('Icon border radius','wp-pagebuilder'),
  519.                 'unit' => array( 'px','%','em' ),
  520.                 'std' => array(
  521.                     'md' => array( 'top' => '100px', 'right' => '100px', 'bottom' => '100px', 'left' => '100px' ),
  522.                     'sm' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '' ),
  523.                     'xs' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '' ),
  524.                 ),
  525.                 'responsive' => true,
  526.                 'tab' => 'style',
  527.                 'section' => 'Icon',
  528.                 'selector' => '{{SELECTOR}} .wppb-pricing-table-icon i { border-radius: {{data.icon_radius}}; }'
  529.             ),
  530.             'icon_section_padding' => array(
  531.                 'type' => 'dimension',
  532.                 'title' => 'Icon padding',
  533.                 'unit' => array( 'px','em','%' ),
  534.                 'responsive' => true,
  535.                 'tab' => 'style',
  536.                 'selector' => '{{SELECTOR}} .wppb-pricing-table-icon { padding: {{data.icon_section_padding}}; }',
  537.                 'section' => 'Icon',
  538.             ),
  539.  
  540.             //currency symbol
  541.             'pricing_symbol' => array(
  542.                 'type' => 'color',
  543.                 'title' => __('Currency symbol color','wp-pagebuilder'),
  544.                 'tab' => 'style',
  545.                 'section' => 'Currency symbol',
  546.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content .wppb-title-currency { color: {{data.pricing_symbol}}; }'
  547.             ),
  548.             'currency_fontstyle' => array(
  549.                 'type' => 'typography',
  550.                 'title' => __('Typography','wp-pagebuilder'),
  551.                 'std' => array(
  552.                     'fontFamily' => '',
  553.                     'fontSize' => array( 'md'=>'28px', 'sm'=>'', 'xs'=>'' ),
  554.                     'lineHeight' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  555.                     'fontWeight' => '700',
  556.                     'textTransform' => '',
  557.                     'fontStyle' => '',
  558.                     'letterSpacing' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  559.                 ),
  560.                 'selector' => '{{SELECTOR}} .wppb-title-currency',
  561.                 'section' => 'Currency symbol',
  562.                 'tab' => 'style',
  563.             ),
  564.  
  565.             //pricing sales
  566.             'pricing_sales' => array(
  567.                 'type' => 'color',
  568.                 'title' => __('Pricing sales color','wp-pagebuilder'),
  569.                 'tab' => 'style',
  570.                 'section' => 'Sales',
  571.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content .wppb-title-sales, {{SELECTOR}} .wppb-pricing-addon-content .wppb-title-sales-wrapper .wppb-title-currency{ color: {{data.pricing_sales}}; }'
  572.             ),
  573.             'sales_fontstyle' => array(
  574.                 'type' => 'typography',
  575.                 'title' => __('Typography','wp-pagebuilder'),
  576.                 'std' => array(
  577.                     'fontFamily' => '',
  578.                     'fontSize' => array( 'md'=>'16px', 'sm'=>'', 'xs'=>'' ),
  579.                     'lineHeight' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  580.                     'fontWeight' => '400',
  581.                     'textTransform' => '',
  582.                     'fontStyle' => '',
  583.                     'letterSpacing' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  584.                 ),
  585.                 'selector' => '{{SELECTOR}} .wppb-title-sales',
  586.                 'section' => 'Sales',
  587.                 'tab' => 'style',
  588.             ),
  589.             //pricing text 
  590.             'pricing_color' => array(
  591.                 'type' => 'color',
  592.                 'title' => __('Pricing text color','wp-pagebuilder'),
  593.                 'tab' => 'style',
  594.                 'section' => 'Pricing',
  595.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content .wppb-pricing-text { color: {{data.pricing_color}}; }'
  596.             ),
  597.             'pricing_fontstyle' => array(
  598.                 'type' => 'typography',
  599.                 'title' => __('Typography','wp-pagebuilder'),
  600.                 'std' => array(
  601.                     'fontFamily' => '',
  602.                     'fontSize' => array( 'md'=>'32px', 'sm'=>'', 'xs'=>'' ),
  603.                     'lineHeight' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  604.                     'fontWeight' => '400',
  605.                     'textTransform' => '',
  606.                     'fontStyle' => '',
  607.                     'letterSpacing' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  608.                 ),
  609.                 'selector' => '{{SELECTOR}} .wppb-pricing-text',
  610.                 'section' => 'Pricing',
  611.                 'tab' => 'style',
  612.             ), 
  613.             'pricing_margin' => array(
  614.                 'type' => 'dimension',
  615.                 'title' => 'Margin',
  616.                 'unit' => array( 'px','em','%' ),
  617.                 'responsive' => true,
  618.                 'tab' => 'style',
  619.                 'selector' => '{{SELECTOR}} .wppb-pricing-text { margin: {{data.pricing_margin}}; }',
  620.                 'section' => 'Pricing',
  621.             ),
  622.    
  623.             //pricing priods   
  624.             'period_color' => array(
  625.                 'type' => 'color',
  626.                 'title' => __('Color','wp-pagebuilder'),
  627.                 'tab' => 'style',
  628.                 'section' => 'Period',
  629.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content .wppb-title-period { color: {{data.period_color}}; }',
  630.             ),
  631.             'period_fontstyle' => array(
  632.                 'type' => 'typography',
  633.                 'title' => __('Typography','wp-pagebuilder'),
  634.                 'std' => array(
  635.                     'fontFamily' => '',
  636.                     'fontSize' => array( 'md'=>'14px', 'sm'=>'', 'xs'=>'' ),
  637.                     'lineHeight' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  638.                     'fontWeight' => '400',
  639.                     'textTransform' => '',
  640.                     'fontStyle' => '',
  641.                     'letterSpacing' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  642.                 ),
  643.                 'selector' => '{{SELECTOR}} .wppb-title-period',
  644.                 'section' => 'Period',
  645.                 'tab' => 'style',
  646.             ),
  647.  
  648.             //button   
  649.             'button_fontstyle' => array(
  650.                 'type' => 'typography',
  651.                 'title' => __('Typography','wp-pagebuilder'),
  652.                 'std' => array(
  653.                     'fontFamily' => '',
  654.                     'fontSize' => array( 'md'=>'14px', 'sm'=>'', 'xs'=>'' ),
  655.                     'lineHeight' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  656.                     'fontWeight' => '400',
  657.                     'textTransform' => '',
  658.                     'fontStyle' => '',
  659.                     'letterSpacing' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  660.                 ),
  661.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content .wppb-btn-pricing',
  662.                 'section' => 'Button',
  663.                 'tab' => 'style',
  664.             ),
  665.  
  666.             'button_color' => array(
  667.                 'type' => 'color',
  668.                 'title' => __('Color','wp-pagebuilder'),
  669.                 'tab' => 'style',
  670.                 'section' => 'Button',
  671.                 'std'     => '#ffffff',
  672.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content .wppb-btn-pricing { color: {{data.button_color}}; }'
  673.             ),
  674.  
  675.             'button_hcolor' => array(
  676.                 'type' => 'color',
  677.                 'title' => __('Hover color','wp-pagebuilder'),
  678.                 'tab' => 'style',
  679.                 'section' => 'Button',
  680.                 'std'     => '#ffffff',
  681.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content .wppb-btn-pricing:hover { color: {{data.button_hcolor}}; }'
  682.             ),
  683.  
  684.             'button_bg' => array(
  685.                 'type' => 'color',
  686.                 'title' => __('Background','wp-pagebuilder'),
  687.                 'tab' => 'style',
  688.                 'section' => 'Button',
  689.                 'std'     => '#36ADFF',
  690.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content .wppb-btn-pricing{ background: {{data.button_bg}}; }'
  691.             ),
  692.  
  693.             'button_hover_bg' => array(
  694.                 'type' => 'color',
  695.                 'title' => __('Hover background','wp-pagebuilder'),
  696.                 'tab' => 'style',
  697.                 'section' => 'Button',
  698.                 'std'     => '#0074e6',
  699.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content .wppb-btn-pricing:hover{ background: {{data.button_hover_bg}}; }'
  700.             ),
  701.             'button_border' => array(
  702.                 'type' => 'border',
  703.                 'title' => 'Border',
  704.                 'std' => array(
  705.                     'borderWidth' => array( 'top' => '0px', 'right' => '0px', 'bottom' => '0px', 'left' => '0px' ),
  706.                     'borderStyle' => 'solid',
  707.                     'borderColor' => '#cccccc'
  708.                 ),
  709.                 'tab' => 'style',
  710.                 'section' => 'Button',
  711.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content .wppb-btn-pricing'
  712.             ),
  713.             'button_border_hcolor' => array(
  714.                 'type' => 'border',
  715.                 'title' => 'Border hover',
  716.                 'std' => array(
  717.                     'borderWidth' => array( 'top' => '0px', 'right' => '0px', 'bottom' => '0px', 'left' => '0px' ),
  718.                     'borderStyle' => 'solid',
  719.                     'borderColor' => '#cccccc'
  720.                 ),
  721.                 'tab' => 'style',
  722.                 'section' => 'Button',
  723.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content .wppb-btn-pricing:hover'
  724.             ),
  725.             'button_radius' => array(
  726.                 'type' => 'dimension',
  727.                 'title' => __('Border radius','wp-pagebuilder'),
  728.                 'unit' => array( 'px','%','em' ),
  729.                 'std' => array(
  730.                     'md' => array( 'top' => '0px', 'right' => '0px', 'bottom' => '0px', 'left' => '0px' ),
  731.                     'sm' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '' ),
  732.                     'xs' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '' ),
  733.                 ),
  734.                 'responsive' => true,
  735.                 'tab' => 'style',
  736.                 'section' => 'Button',
  737.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content .wppb-btn-pricing { border-radius: {{data.button_radius}}; }'
  738.             ),
  739.             'button_padding' => array(
  740.                 'type' => 'dimension',
  741.                 'title' => 'Padding',
  742.                 'unit' => array( 'px','em','%' ),
  743.                 'responsive' => true,
  744.                 'tab' => 'style',
  745.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content .wppb-btn-pricing { padding: {{data.button_padding}}; }',
  746.                 'section' => 'Button',
  747.             ),
  748.             'button_margin' => array(
  749.                 'type' => 'dimension',
  750.                 'title' => 'Margin',
  751.                 'unit' => array( 'px','em','%' ),
  752.                 'responsive' => true,
  753.                 'tab' => 'style',
  754.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content .wppb-btn-pricing { margin: {{data.button_margin}}; }',
  755.                 'section' => 'Button',
  756.             ),
  757.             'button_display' => array(
  758.                 'type' => 'select',
  759.                 'title' => __('Button display','wp-pagebuilder'),
  760.                 'values' => array(
  761.                     'btnblock' => __('Block','wp-pagebuilder'),
  762.                     'btninlineblock' => __('Inline Block','wp-pagebuilder'),
  763.                     'btninline' => __('Inline','wp-pagebuilder'),
  764.                 ),
  765.                 'std' => 'btninlineblock',
  766.                 'tab' => 'style',
  767.                 'section' => 'Button',
  768.             ),
  769.             //Additional   
  770.             'addition_text' => array(
  771.                 'type' => 'color',
  772.                 'title' => __('Text color','wp-pagebuilder'),
  773.                 'tab' => 'style',
  774.                 'section' => 'Addition Info',
  775.                 'selector' => '{{SELECTOR}} .wppb-title-aditional-info { color: {{data.addition_text}}; }',
  776.             ),
  777.             'addition_fontstyle' => array(
  778.                 'type' => 'typography',
  779.                 'title' => __('Typography','wp-pagebuilder'),
  780.                 'std' => array(
  781.                     'fontFamily' => '',
  782.                     'fontSize' => array( 'md'=>'14px', 'sm'=>'', 'xs'=>'' ),
  783.                     'lineHeight' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  784.                     'fontWeight' => '400',
  785.                     'textTransform' => '',
  786.                     'fontStyle' => '',
  787.                     'letterSpacing' => array( 'md'=>'', 'sm'=>'', 'xs'=>'' ),
  788.                 ),
  789.                 'selector' => '{{SELECTOR}} .wppb-title-aditional-info',
  790.                 'section' => 'Addition Info',
  791.                 'tab' => 'style',
  792.             ),
  793.  
  794.             //wrap
  795.             'wrap_background' => array(
  796.                 'type' => 'background',
  797.                 'title' => '',
  798.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content',
  799.                 'tab' => 'style',
  800.                 'section' => 'Price Wrapper',
  801.             ),
  802.             'wrap_border' => array(
  803.                 'type' => 'border',
  804.                 'title' => 'Border',
  805.                 'std' => array(
  806.                     'borderWidth' => array( 'top' => '0px', 'right' => '0px', 'bottom' => '0px', 'left' => '0px' ),
  807.                     'borderStyle' => 'solid',
  808.                     'borderColor' => '#cccccc'
  809.                 ),
  810.                 'tab' => 'style',
  811.                 'section' => 'Price Wrapper',
  812.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content'
  813.             ),
  814.             'wrap_border_hcolor' => array(
  815.                 'type' => 'color',
  816.                 'title' => __('hover color','wp-pagebuilder'),
  817.                 'tab' => 'style',
  818.                 'section' => 'Price Wrapper',
  819.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content:hover{ border-color: {{data.button_border_hcolor}}; }'
  820.             ),
  821.             'wrap_radius' => array(
  822.                 'type' => 'dimension',
  823.                 'title' => __('Border radius','wp-pagebuilder'),
  824.                 'responsive' => true,
  825.                 'tab' => 'style',
  826.                 'unit' => array( 'px','%','em' ),
  827.                 'section' => 'Price Wrapper',
  828.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content { border-radius: {{data.wrap_radius}}; }'
  829.             ),
  830.             'wrap_padding' => array(
  831.                 'type' => 'dimension',
  832.                 'title' => 'Padding',
  833.                 'unit' => array( 'px','em','%' ),
  834.                 'responsive' => true,
  835.                 'tab' => 'style',
  836.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content { padding: {{data.wrap_padding}}; }',
  837.                 'section' => 'Price Wrapper',
  838.             ),
  839.             'wrap_margin' => array(
  840.                 'type' => 'dimension',
  841.                 'title' => 'Margin',
  842.                 'unit' => array( 'px','em','%' ),
  843.                 'responsive' => true,
  844.                 'tab' => 'style',
  845.                 'selector' => '{{SELECTOR}} .wppb-pricing-addon-content { margin: {{data.wrap_margin}}; }',
  846.                 'section' => 'Price Wrapper',
  847.             ),
  848.  
  849.             //two title wrap
  850.             'two_title_background' => array(
  851.                 'type' => 'background',
  852.                 'title' => '',
  853.                 'selector' => '{{SELECTOR}} .wppb-pricing-content-one,{{SELECTOR}} .wppb-pricing-content-two',
  854.                 'tab' => 'style',
  855.                 'section' => 'Content wrap',
  856.                 'depends' => array(array('pricing_layout', '=', array('one','two'))),
  857.             ),
  858.             'two_border' => array(
  859.                 'type' => 'border',
  860.                 'title' => 'Border',
  861.                 'std' => array(
  862.                     'borderWidth' => array( 'top' => '0px', 'right' => '0px', 'bottom' => '0px', 'left' => '0px' ),
  863.                     'borderStyle' => 'solid',
  864.                     'borderColor' => '#cccccc'
  865.                 ),
  866.                 'tab' => 'style',
  867.                 'section' => 'Content wrap',
  868.                 'selector' => '{{SELECTOR}} .wppb-pricing-content-one, {{SELECTOR}} .wppb-pricing-content-two',
  869.                 'depends' => array(array('pricing_layout', '=', array('one','two'))),
  870.             ),
  871.             'two_border_hcolor' => array(
  872.                 'type' => 'color',
  873.                 'title' => __('hover color','wp-pagebuilder'),
  874.                 'tab' => 'style',
  875.                 'section' => 'Content wrap',
  876.                 'selector' => '{{SELECTOR}} .wppb-pricing-content-one:hover, {{SELECTOR}} .wppb-pricing-content-two:hover{ border-color: {{data.button_border_hcolor}}; }',
  877.                 'depends' => array(array('pricing_layout', '=', array('one','two'))),
  878.             ),
  879.             'two_title_radius' => array(
  880.                 'type' => 'dimension',
  881.                 'title' => __('Border radius','wp-pagebuilder'),
  882.                 'responsive' => true,
  883.                 'tab' => 'style',
  884.                 'unit' => array( 'px','%','em' ),
  885.                 'section' => 'Content wrap',
  886.                 'depends' => array(array('pricing_layout', '=', array('one','two'))),
  887.                 'selector' => '{{SELECTOR}} .wppb-pricing-content-one,{{SELECTOR}} .wppb-pricing-content-two { border-radius: {{data.two_title_radius}}; }'
  888.             ),
  889.             'two_title_padding' => array(
  890.                 'type' => 'dimension',
  891.                 'title' => 'Padding',
  892.                 'unit' => array( 'px','em','%' ),
  893.                 'responsive' => true,
  894.                 'tab' => 'style',
  895.                 'selector' => '{{SELECTOR}} .wppb-pricing-content-one, {{SELECTOR}} .wppb-pricing-content-two { padding: {{data.two_title_padding}}; }',
  896.                 'section' => 'Content wrap',
  897.                 'depends' => array(array('pricing_layout', '=', array('one','two'))),
  898.             ),
  899.         );
  900.  
  901.         return $settings;
  902.     }
  903.  
  904.     // Pricing Render HTML
  905.     public function render($data = null){
  906.         $settings           = $data['settings'];
  907.  
  908.         $title              = isset($settings["title"]) ? $settings["title"] : '';
  909.         $subtitle           = isset($settings["subtitle"]) ? $settings["subtitle"] : '';
  910.         $pt_icon_list       = isset($settings["pt_icon_list"]) ? $settings["pt_icon_list"] : '';
  911.         $pricing            = isset($settings["pricing"]) ? $settings["pricing"] : '';
  912.         $sales              = isset($settings["sales"]) ? $settings["sales"] : '';
  913.         $currency           = isset($settings["currency"]) ? $settings["currency"] : '';
  914.         $period             = isset($settings["period"]) ? $settings["period"] : '';
  915.         $aditional_info     = isset($settings["aditional_info"]) ? $settings["aditional_info"] : '';
  916.         $btn_link           = isset($settings["btn_link"]) ? $settings["btn_link"] : array();
  917.         $button_text        = isset($settings["button_text"]) ? $settings["button_text"] : '';
  918.         $icon_list          = isset($settings["icon_list"]) ? $settings["icon_list"] : '';
  919.         $icon_position      = isset($settings["icon_position"]) ? $settings["icon_position"] : '';
  920.         $pricing_feature    = isset($settings["pricing_feature"]) ? $settings["pricing_feature"] : array();
  921.         $pricing_layout     = isset($settings["pricing_layout"]) ? $settings["pricing_layout"] : '';
  922.         $button_display     = isset($settings["button_display"]) ? $settings["button_display"] : 'btnblock';
  923.  
  924.         $output = $button = $data_pt_media = '';
  925.  
  926.         if( $pt_icon_list ){
  927.             $data_pt_media  .= '<div class="wppb-pricing-table-icon">';
  928.             $data_pt_media  .= '<i class="fa ' . esc_attr($pt_icon_list) . '"></i>';
  929.             $data_pt_media  .= '</div>';
  930.         }
  931.         if( $icon_position == 'left' ) {
  932.             $button = (esc_attr($icon_list)) ? '<i class="fa ' . esc_attr($icon_list) . '"></i> ' . esc_attr($button_text) : esc_attr($button_text);
  933.         } elseif( $icon_position == 'right' ){
  934.             $button = (esc_attr($icon_list)) ? esc_attr($button_text) . ' <i class="fa ' . esc_attr($icon_list) . '"></i>' : esc_attr($button_text);
  935.         } else {
  936.             $button = (esc_attr($icon_list)) ? esc_attr($button_text) : esc_attr($button_text);
  937.         }
  938.         $target = !empty($btn_link['window']) ? "_blank" : "_self";
  939.         $nofolow = ! empty($btn_link['nofolow']) ? "rel=nofollow" : " ";
  940.  
  941.         $output  .= '<div class="wppb-pricing-addon">';
  942.             $output  .= '<div class="wppb-pricing-addon-content pricing-layout-'.esc_attr($pricing_layout).'">';
  943.  
  944.  
  945.                 if( $pricing_layout == "two" ){
  946.                     $output  .= '<div class="wppb-pricing-content-two">';
  947.                         if( !empty($title) ){
  948.                             $output  .= '<div class="wppb-pricing-title-wrap">';
  949.                                 if( !empty($title) ){
  950.                                     $output  .= '<h3 class="wppb-pricing-title">'.wp_kses_post($title).'</h3>';
  951.                                 }
  952.                                 if( !empty($subtitle) ){   
  953.                                     $output  .= '<span class="wppb-pricing-subtitle">'.wp_kses_post($subtitle).'</span>';
  954.                                 }
  955.                                 if( !empty($pricing) || !empty($sales) || !empty($currency) || !empty($period) ){
  956.                                     $output  .= '<div class="wppb-pricing-content">';  
  957.                                         if( !empty($pricing) ){
  958.                                             $output  .= '<div class="wppb-pricing-text-wrapper">';
  959.                                                 if( !empty($sales) ){
  960.                                                     $output  .= '<span class="wppb-title-sales-wrapper">';
  961.                                                         if( !empty($currency) ){
  962.                                                             $output  .= '<span class="wppb-title-currency">'.esc_attr($currency).'</span>';
  963.                                                         }
  964.                                                         $output  .= '<span class="wppb-title-sales">'.esc_attr($sales).'</span>';
  965.                                                         $output  .= '</span>';
  966.                                                 }
  967.                                                 if( !empty($currency) ){
  968.                                                     $output  .= '<sup><span class="wppb-title-currency">'.esc_attr($currency).'</span></sup>';
  969.                                                 }
  970.                                                 if( !empty($pricing) ){
  971.                                                     $output  .= '<span class="wppb-pricing-text">'.$pricing.'</span>';
  972.                                                 }
  973.                                                 if( !empty($period) ){
  974.                                                     $output  .= '<sub class="wppb-title-period">'.esc_attr($period).'</sub>';
  975.                                                 }
  976.                                             $output  .= '</div>';
  977.                                         }
  978.                                     $output  .= '</div>';
  979.                                 }
  980.                             $output  .= '</div>';  
  981.                         }
  982.                         $output  .= $data_pt_media;
  983.  
  984.                         if ( is_array($pricing_feature) && count($pricing_feature)){
  985.                             $output  .= '<div class="wppb-pricing-feature">';
  986.                             foreach ( $pricing_feature as $key => $value ) {
  987.                                 $output  .= '<div class="repeater-'.$key.'">';
  988.                                     $output  .= '<div class="wppb-pricing-list">';
  989.                                     if( ! empty( $value['icon_list'] ) ) {
  990.                                         $output  .= '<i class="fa '.$value['icon_list'].'"></i>';
  991.                                     }
  992.                                     if( ! empty( $value['feature_text'] ) ) {
  993.                                         $output  .= '<span>'.$value['feature_text'].'</span>';
  994.                                     }
  995.                                     $output  .= '</div>';
  996.                                 $output  .= '</div>';
  997.                             }
  998.                             $output  .= '</div>';
  999.                         }
  1000.    
  1001.                         if( !empty($btn_link['link']) ) {
  1002.                             $output  .= '<a class="wppb-btn-pricing wppb-'.esc_attr($button_display).'" '.$nofolow.' href="' . esc_url($btn_link['link']) . '" target="'.esc_attr($target).'">' . $button  . '</a>';
  1003.                         }
  1004.    
  1005.                         if( !empty($aditional_info) ){
  1006.                             $output  .= '<span class="wppb-title-aditional-info">'.wp_kses_post($aditional_info).'</span>';
  1007.                         }
  1008.  
  1009.                     $output  .= '</div>';//wppb-pricing-content-two
  1010.                 } elseif ( $pricing_layout == "three" ) {
  1011.  
  1012.                     if( !empty($title) || !empty($subtitle) ){
  1013.                         $output  .= '<div class="wppb-pricing-title-wrap">';
  1014.                             if( !empty($title) ){
  1015.                                 $output  .= '<h3 class="wppb-pricing-title">'.wp_kses_post($title).'</h3>';
  1016.                             }
  1017.                             $output  .= '</div>';
  1018.                     }
  1019.  
  1020.                     if( !empty($pricing) || !empty($sales) || !empty($currency) || !empty($period) ){
  1021.                         $output  .= '<div class="wppb-pricing-content">';  
  1022.  
  1023.                             if( !empty($pricing) ){
  1024.                                 $output  .= '<div class="wppb-pricing-text-wrapper">';
  1025.                                     if( !empty($sales) ){
  1026.                                         $output  .= '<span class="wppb-title-sales-wrapper">';
  1027.                                             if( !empty($currency) ){
  1028.                                                 $output  .= '<span class="wppb-title-currency">'.esc_attr($currency).'</span>';
  1029.                                             }
  1030.                                             $output  .= '<span class="wppb-title-sales">'.esc_attr($sales).'</span>';
  1031.                                             $output  .= '</span>';
  1032.                                     }
  1033.  
  1034.                                     if( !empty($currency) ){
  1035.                                         $output  .= '<sup><span class="wppb-title-currency">'.esc_attr($currency).'</span></sup>';
  1036.                                     }
  1037.                                     if( !empty($pricing) ){
  1038.                                         $output  .= '<span class="wppb-pricing-text">'.$pricing.'</span>';
  1039.                                     }
  1040.                                     if( !empty($period) ){
  1041.                                         $output  .= '<sub class="wppb-title-period">'.esc_attr($period).'</sub>';
  1042.                                     }
  1043.                                 $output  .= '</div>';
  1044.                             }
  1045.                         $output  .= '</div>';
  1046.                     }
  1047.  
  1048.                     if ( is_array($pricing_feature) && count($pricing_feature)){
  1049.                         $output  .= '<div class="wppb-pricing-feature">';
  1050.                             foreach ( $pricing_feature as $key => $value ) {
  1051.                                 $output  .= '<div class="repeater-'.$key.'">';
  1052.                                     $output  .= '<div class="wppb-pricing-list">';
  1053.                                     if( ! empty( $value['icon_list'] ) ) {
  1054.                                         $output  .= '<i class="fa '.$value['icon_list'].'"></i>';
  1055.                                     }
  1056.                                     if( ! empty( $value['feature_text'] ) ) {
  1057.                                         $output  .= '<span>'.$value['feature_text'].'</span>';
  1058.                                     }
  1059.                                     $output  .= '</div>';
  1060.                                 $output  .= '</div>';
  1061.                             }
  1062.                         $output  .= '</div>';
  1063.                     }
  1064.  
  1065.                     if( !empty($btn_link['link']) ) {
  1066.                         $output  .= '<a class="wppb-btn-pricing  wppb-'.esc_attr($button_display).'" '.$nofolow.' href="' . esc_url($btn_link['link']) . '" target="'.esc_attr($target).'">' . $button  . '</a>';
  1067.                     }
  1068.  
  1069.                     if( !empty($aditional_info) ){
  1070.                         $output  .= '<span class="wppb-title-aditional-info">'.wp_kses_post($aditional_info).'</span>';
  1071.                     }
  1072.                 } elseif ($pricing_layout == "four") {
  1073.  
  1074.                     $output  .= '<div class="wppb-pricing-content-one style-four">';
  1075.                        
  1076.  
  1077.                     $output  .= '<div class="wppb-pricing-header">';
  1078.                         if( !empty($pricing) || !empty($sales) || !empty($currency) || !empty($period) ){
  1079.                             $output  .= '<div class="wppb-pricing-content">';  
  1080.                                 if( !empty($pricing) ){
  1081.                                     $output  .= '<div class="wppb-pricing-text-wrapper">';
  1082.                                         if( !empty($sales) ){
  1083.                                             $output  .= '<span class="wppb-title-sales-wrapper">';
  1084.                                                 if( !empty($currency) ){
  1085.                                                     $output  .= '<span class="wppb-title-currency">'.esc_attr($currency).'</span>';
  1086.                                                 }
  1087.                                                 $output  .= '<span class="wppb-title-sales">'.esc_attr($sales).'</span>';
  1088.                                                 $output  .= '</span>';
  1089.                                         }
  1090.  
  1091.                                         if( !empty($currency) ){
  1092.                                             $output  .= '<sup><span class="wppb-title-currency">'.esc_attr($currency).'</span></sup>';
  1093.                                         }
  1094.                                         if( !empty($pricing) ){
  1095.                                             $output  .= '<span class="wppb-pricing-text">'.$pricing.'</span>';
  1096.                                         }
  1097.                                     $output  .= '</div>';
  1098.                                 }
  1099.                             $output  .= '</div>';
  1100.                         }
  1101.  
  1102.                         if( !empty($title) ){
  1103.                             $output  .= '<div class="wppb-pricing-title-wrap">';
  1104.                                 if( !empty($title) ){
  1105.                                     $output  .= '<h3 class="wppb-pricing-title">'.wp_kses_post($title).'</h3>';
  1106.                                 }
  1107.                                 if( !empty($subtitle) ){   
  1108.                                     $output  .= '<span class="wppb-pricing-subtitle">'.wp_kses_post($subtitle).'</span>';
  1109.                                 }
  1110.                                 $output  .= '</div>';
  1111.                         }
  1112.                     $output  .= '</div>';
  1113.  
  1114.  
  1115.  
  1116.                         if ( isset($pricing_feature) && count($pricing_feature)){
  1117.                             $output  .= '<div class="wppb-pricing-feature align-left">';
  1118.                             foreach ( $pricing_feature as $key => $value ) {
  1119.                                 $output  .= '<div class="repeater-'.$key.'">';
  1120.                                     $output  .= '<div class="wppb-pricing-list">';
  1121.                                     if( ! empty( $value['icon_list'] ) ) {
  1122.                                         $output  .= '<i class="fa '.$value['icon_list'].'"></i>';
  1123.                                     }
  1124.                                     if( ! empty( $value['feature_text'] ) ) {
  1125.                                         $output  .= '<span>'.$value['feature_text'].'</span>';
  1126.                                     }
  1127.                                     $output  .= '</div>';
  1128.                                 $output  .= '</div>';
  1129.                             }
  1130.                             $output  .= '</div>';
  1131.                         }
  1132.  
  1133.                         if( !empty($btn_link['link']) ) {
  1134.                             $output  .= '<a class="wppb-btn-pricing  wppb-'.esc_attr($button_display).'" '.$nofolow.' href="' . esc_url($btn_link['link']) . '" target="'.esc_attr($target).'">' . $button  . '</a>';
  1135.                         }
  1136.                     $output .= '</div>';   
  1137.                 }
  1138.  
  1139.  
  1140.  
  1141.                 else {
  1142.                     $output  .= '<div class="wppb-pricing-content-one">';
  1143.                         if( !empty($title) ){
  1144.                             $output  .= '<div class="wppb-pricing-title-wrap">';
  1145.                                 if( !empty($title) ){
  1146.                                     $output  .= '<h3 class="wppb-pricing-title">'.wp_kses_post($title).'</h3>';
  1147.                                 }
  1148.                                 if( !empty($subtitle) ){   
  1149.                                     $output  .= '<span class="wppb-pricing-subtitle">'.wp_kses_post($subtitle).'</span>';
  1150.                                 }
  1151.                                 $output  .= '</div>';
  1152.                         }
  1153.  
  1154.                         $output  .= $data_pt_media;
  1155.  
  1156.                         if( !empty($pricing) || !empty($sales) || !empty($currency) || !empty($period) ){
  1157.                             $output  .= '<div class="wppb-pricing-content">';  
  1158.  
  1159.                                 if( !empty($pricing) ){
  1160.                                     $output  .= '<div class="wppb-pricing-text-wrapper">';
  1161.                                         if( !empty($sales) ){
  1162.                                             $output  .= '<span class="wppb-title-sales-wrapper">';
  1163.                                                 if( !empty($currency) ){
  1164.                                                     $output  .= '<span class="wppb-title-currency">'.esc_attr($currency).'</span>';
  1165.                                                 }
  1166.                                                 $output  .= '<span class="wppb-title-sales">'.esc_attr($sales).'</span>';
  1167.                                                 $output  .= '</span>';
  1168.                                         }
  1169.  
  1170.                                         if( !empty($currency) ){
  1171.                                             $output  .= '<sup><span class="wppb-title-currency">'.esc_attr($currency).'</span></sup>';
  1172.                                         }
  1173.                                         if( !empty($pricing) ){
  1174.                                             $output  .= '<span class="wppb-pricing-text">'.$pricing.'</span>';
  1175.                                         }
  1176.                                         if( !empty($period) ){
  1177.                                             $output  .= '<sub class="wppb-title-period">'.esc_attr($period).'</sub>';
  1178.                                         }
  1179.                                     $output  .= '</div>';
  1180.                                 }
  1181.                             $output  .= '</div>';
  1182.                         }
  1183.                         if ( isset($pricing_feature) && count($pricing_feature)){
  1184.                             $output  .= '<div class="wppb-pricing-feature">';
  1185.                             foreach ( $pricing_feature as $key => $value ) {
  1186.                                 $output  .= '<div class="repeater-'.$key.'">';
  1187.                                     $output  .= '<div class="wppb-pricing-list">';
  1188.                                     if( ! empty( $value['icon_list'] ) ) {
  1189.                                         $output  .= '<i class="fa '.$value['icon_list'].'"></i>';
  1190.                                     }
  1191.                                     if( ! empty( $value['feature_text'] ) ) {
  1192.                                         $output  .= '<span>'.$value['feature_text'].'</span>';
  1193.                                     }
  1194.                                     $output  .= '</div>';
  1195.                                 $output  .= '</div>';
  1196.                             }
  1197.                             $output  .= '</div>';
  1198.                         }
  1199.  
  1200.                         if( !empty($btn_link['link']) ) {
  1201.                             $output  .= '<a class="wppb-btn-pricing  wppb-'.esc_attr($button_display).'" '.$nofolow.' href="' . esc_url($btn_link['link']) . '" target="'.esc_attr($target).'">' . $button  . '</a>';
  1202.                         }
  1203.  
  1204.                         if( !empty($aditional_info) ){
  1205.                             $output  .= '<span class="wppb-title-aditional-info">'.wp_kses_post($aditional_info).'</span>';
  1206.                         }
  1207.                     $output .= '</div>';   
  1208.                 }
  1209.             $output  .= '</div>';
  1210.         $output  .= '</div>';
  1211.  
  1212.         return $output;
  1213.     }
  1214.  
  1215. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement