• File: pricing-table.php
  • Full Path: /home/slvgwrnz/public_html/wp-content/plugins/prinox-tools/elementor/widgets/pricing-table.php
  • Date Modified: 02/05/2025 11:48 AM
  • File size: 35.95 KB
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

/**
 * Elementor Single Widget
 * @package Prinox Tools
 * @since 1.0.0
 */

namespace Elementor;

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly.

class Prinox_Pricing_Table extends Widget_Base {

	/**
	 * Get widget name.
	 *
	 * Retrieve Elementor widget name.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget name.
	 */
	public function get_name() {
		return 'prionx-pricing-table-id';
	}

	/**
	 * Get widget title.
	 *
	 * Retrieve Elementor widget title.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget title.
	 */
	public function get_title() {
		return esc_html__( 'Prinox Pricing Table', 'prinox-tools' );
	}

	/**
	 * Get widget icon.
	 *
	 * Retrieve Elementor widget icon.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget icon.
	 */
	public function get_icon() {
		return 'mg-custom-icon';
	}

	/**
	 * Get widget categories.
	 *
	 * Retrieve the list of categories the Elementor widget belongs to.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return array Widget categories.
	 */
	public function get_categories() {
		return [ 'prinox_widgets' ];
	}

	
	protected function register_controls() {

		$this->start_controls_section(
			'prinox_pricing_option',
			[
				'label' => esc_html__( 'Pricing Option', 'prinox-tools' ),
				'tab'   => Controls_Manager::TAB_CONTENT,
			]
		);
		
        $this->add_control(
			'shape', [
				'label'       => esc_html__( 'Shape Image', 'prinox-tools' ),
				'type'        => Controls_Manager::MEDIA,
			]
		);
        $this->add_control(
			'sub_title', [
				'label' => esc_html__( 'Sub Title', 'prinox-tools' ),
				'type' => Controls_Manager::TEXT,
                'label_block' => true,
			]
		);
        $this->add_group_control(
			Group_Control_Background::get_type(),
			[
				'name' => 'title-bg',
				'label' => esc_html__( 'Background', 'prinox-tools' ),
				'types' => [ 'classic' ],
				'exclude' => [ 'color' ],
				'selector' => '{{WRAPPER}} .sec-title h2 span:before',
			]
		);
		$this->add_control(
			'title', [
				'label' => esc_html__( 'Title', 'prinox-tools' ),
				'type' => Controls_Manager::TEXTAREA,
                'label_block' => true,
			]
		);
		$this->add_control(
			'number', [
				'label' => esc_html__( 'Number', 'prinox-tools' ),
				'type' => Controls_Manager::TEXT,
                'label_block' => true,
			]
		);
		$this->add_control(
			'counter_title', [
				'label' => esc_html__( 'Counter Title', 'prinox-tools' ),
				'type' => Controls_Manager::TEXT,
                'label_block' => true,
			]
		);
		$this->add_control(
			'description', [
				'label' => esc_html__( 'Description', 'prinox-tools' ),
				'type' => Controls_Manager::TEXTAREA,
                'label_block' => true,
			]
		);
		$this->add_control(
			'short_info', [
				'label' => esc_html__( 'Short Info', 'prinox-tools' ),
				'type' => Controls_Manager::TEXTAREA,
                'label_block' => true,
			]
		);
		$this->add_control(
			'video_title', [
				'label' => esc_html__( 'Video Title', 'prinox-tools' ),
				'type' => Controls_Manager::TEXT,
                'label_block' => true,
			]
		);
		$this->add_control(
			'video_link', [
				'label' => esc_html__( 'Video Link', 'prinox-tools' ),
				'type' => Controls_Manager::URL,
                'label_block' => true,
			]
		);
        $this->add_control(
			'tab1', [
				'label' => esc_html__( 'Tab One', 'prinox-tools' ),
				'type' => Controls_Manager::TEXT,
                'label_block' => true,
			]
		);
        $this->add_control(
			'tab2', [
				'label' => esc_html__( 'Tab Two', 'prinox-tools' ),
				'type' => Controls_Manager::TEXT,
                'label_block' => true,
			]
		);
		$this->add_control(
			'projectorder',
			[
				'label'     => esc_html__( 'Pricing Order', 'prinox-tools' ),
				'type'      => Controls_Manager::SELECT,
				'default'   => 'ASC',
				'options'   => [
					'ASC'  => esc_html__( 'Ascending', 'prinox-tools' ),
					'DESC' => esc_html__( 'Descending', 'prinox-tools' ),
				],
			]
		);
		
		$this->add_control(
			'pjt_per_page',
			[
				'label'   => __( 'Pricing Count', 'prinox-tools' ),
				'type'    => Controls_Manager::NUMBER,
				'min'     => 1,
				'default' => 2,
			]
		);
		$this->end_controls_section();

		$this->start_controls_section(
            'content_style',
            [
                'label' => __( 'Content', 'prinox-tools' ),
                'tab' => Controls_Manager::TAB_STYLE,
            ]
        );

		$this->add_control(
            'subtitle_color',
            [
                'label'     => esc_html__( 'Sub Title Color', 'prinox-tools' ),
                'type'      => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .price-section .sec-title .title' => 'color: {{VALUE}} ',
                ],
            ]
        );
        $this->add_control(
            'subtitle_bg_color',
            [
                'label'     => esc_html__( 'Sub Title BG Color', 'prinox-tools' ),
                'type'      => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .price-section .sec-title .title:before' => 'background-color: {{VALUE}} ',
                ],
            ]
        );

        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name'           => 'subtitle_typography',
                'label'          => esc_html__( 'Sub Title Typography', 'prinox-tools' ),
                'selector'       => '{{WRAPPER}} .price-section .sec-title .title',
            ]
        );
        $this->add_control(
            'title_h',
            [
                'type'      => Controls_Manager::HEADING,
                'label'     => esc_html__( 'Title', 'prinox-tools' ),
                'separator' => 'before',
            ]
        );

		$this->add_control(
            'title_color',
            [
                'label'     => esc_html__( 'Title Color', 'prinox-tools' ),
                'type'      => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .price-section .sec-title h2' => 'color: {{VALUE}} ',
                ],
            ]
        );

        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name'           => 'title_typography',
                'label'          => esc_html__( 'Title Typography', 'prinox-tools' ),
                'selector'       => '{{WRAPPER}} .price-section .sec-title h2',
            ]
        );

		$this->add_control(
            'conetnt_h',
            [
                'type'      => Controls_Manager::HEADING,
                'label'     => esc_html__( 'Content', 'prinox-tools' ),
                'separator' => 'before',
            ]
        );

		$this->add_control(
            'content_color',
            [
                'label'     => esc_html__( 'Content Color', 'prinox-tools' ),
                'type'      => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .price-section .pricing-column .text' => 'color: {{VALUE}} ',
                ],
            ]
        );

        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name'           => 'content_typography',
                'label'          => esc_html__( 'Content Typography', 'prinox-tools' ),
                'selector'       => '{{WRAPPER}} .price-section .pricing-column .text',
            ]
        );

		$this->add_control(
            'count_h',
            [
                'type'      => Controls_Manager::HEADING,
                'label'     => esc_html__( 'Counter Number', 'prinox-tools' ),
                'separator' => 'before',
            ]
        );

		$this->add_control(
            'count_color',
            [
                'label'     => esc_html__( 'Counter Number Color', 'prinox-tools' ),
                'type'      => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .price-section .counter' => 'color: {{VALUE}} ',
                ],
            ]
        );
		$this->add_control(
            'count_cusmtomer_color',
            [
                'label'     => esc_html__( 'Counter Cusmtomer Text Color', 'prinox-tools' ),
                'type'      => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .price-section .counter i' => 'color: {{VALUE}} ',
                ],
            ]
        );
		$this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name'           => 'count_typography',
                'label'          => esc_html__( 'Typography', 'prinox-tools' ),
                'selector'       => '{{WRAPPER}} .price-section .counter',
            ]
        );

		$this->add_control(
            'c_content_h',
            [
                'type'      => Controls_Manager::HEADING,
                'label'     => esc_html__( 'Content', 'prinox-tools' ),
                'separator' => 'before',
            ]
        );

		$this->add_control(
            'c_content_color',
            [
                'label'     => esc_html__( 'Content Color', 'prinox-tools' ),
                'type'      => Controls_Manager::COLOR,
                'selectors' => [
                    '{{WRAPPER}} .price-section .title-column .text' => 'color: {{VALUE}} ',
                ],
            ]
        );

        $this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name'           => 'c_content_typography',
                'label'          => esc_html__( 'Content Typography', 'prinox-tools' ),
                'selector'       => '{{WRAPPER}} .price-section .title-column .text',
            ]
        );
		
		$this->add_control(
            'video_icon_h',
            [
                'type'      => Controls_Manager::HEADING,
                'label'     => esc_html__( 'Video Icon', 'prinox-tools' ),
                'separator' => 'before',
            ]
        );
		$this->add_control(
		    'p_play_btn_border_color',
		    [
		        'label'     => esc_html__('Play Button Border Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .price-section .play-box .play' => 'border-color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);

		$this->add_control(
		    'p_play_btn_icon_color',
		    [
		        'label'     => esc_html__('Play Button Icon Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .price-section .play-box .play' => 'color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);
		$this->add_control(
		    'p_play_btn_border_hover',
		    [
		        'label'     => esc_html__('Play Button Border Hover Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .price-section .play-box .play:hover' => 'border-color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);
		$this->add_control(
		    'p_play_btn_icon_hover',
		    [
		        'label'     => esc_html__('Play Button Icon Hover Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .price-section .play-box .play:hover' => 'color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);
		$this->add_control(
		    'p_play_btn_bg_hover',
		    [
		        'label'     => esc_html__('Play Button BG Hover Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .price-section .play-box .play:hover' => 'background-color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);
		$this->add_control(
		    'p_play_btn_text_hover',
		    [
		        'label'     => esc_html__('Text Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .price-section .play-box' => 'color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);
		$this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name'           => 'play_btn_typography',
                'label'          => esc_html__( 'Typography', 'prinox-tools' ),
                'selector'       => '{{WRAPPER}} .price-section .play-box',
            ]
        );
		
		$this->end_controls_section();

		$this->start_controls_section(
            'pricing_style',
            [
                'label' => __( 'Pricing', 'prinox-tools' ),
                'tab' => Controls_Manager::TAB_STYLE,
            ]
        );

		$this->add_control(
		    'price_box_bg_color',
		    [
		        'label'     => esc_html__('Background color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .price-block .inner-box' => 'background-color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);
		$this->add_control(
			'price_box_padding',
			[
				'label' => esc_html__( 'Padding', 'prinox-tools' ),
				'type' => \Elementor\Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%', 'em' ],
				'selectors' => [
					'{{WRAPPER}} .your-class' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
			]
		);

		$this->add_control(
            'price_title_h',
            [
                'type'      => Controls_Manager::HEADING,
                'label'     => esc_html__( 'Price Title', 'prinox-tools' ),
                'separator' => 'before',
            ]
        );

		$this->add_control(
		    'price_title_color',
		    [
		        'label'     => esc_html__('Price Title Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .price-block .price-title' => 'color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);
		$this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name'           => 'price_title_typography',
                'label'          => esc_html__( 'Typography', 'prinox-tools' ),
                'selector'       => '{{WRAPPER}} .price-block .price-title',
            ]
        );

		$this->add_control(
            'price_h',
            [
                'type'      => Controls_Manager::HEADING,
                'label'     => esc_html__( 'Price', 'prinox-tools' ),
                'separator' => 'before',
            ]
        );

		$this->add_control(
		    'price_color',
		    [
		        'label'     => esc_html__('Price Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .price-block .price' => 'color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);
		$this->add_control(
		    'price_text_color',
		    [
		        'label'     => esc_html__('Price Text Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .price-block .price span' => 'color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);
		$this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name'           => 'price_typography',
                'label'          => esc_html__( 'Typography', 'prinox-tools' ),
                'selector'       => '{{WRAPPER}} .price-block .price',
            ]
        );

		$this->add_control(
            'price_sub_title_h',
            [
                'type'      => Controls_Manager::HEADING,
                'label'     => esc_html__( 'Price Sub Title', 'prinox-tools' ),
                'separator' => 'before',
            ]
        );

		$this->add_control(
		    'price_sub_title_color',
		    [
		        'label'     => esc_html__('Price Text Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .price-block .sub-title' => 'color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);
		$this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name'           => 'price_sub_title_typography',
                'label'          => esc_html__( 'Typography', 'prinox-tools' ),
                'selector'       => '{{WRAPPER}} .price-block .sub-title',
            ]
        );

		$this->add_control(
            'price_list_h',
            [
                'type'      => Controls_Manager::HEADING,
                'label'     => esc_html__( 'Price List', 'prinox-tools' ),
                'separator' => 'before',
            ]
        );
		$this->add_control(
		    'list_color',
		    [
		        'label'     => esc_html__('Price Text Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .price-block .price-list li' => 'color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);
		$this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name'           => 'list_typography',
                'label'          => esc_html__( 'Typography', 'prinox-tools' ),
                'selector'       => '{{WRAPPER}} .price-block .price-list li',
            ]
        );

		$this->add_control(
            'button_h',
            [
                'type'      => Controls_Manager::HEADING,
                'label'     => esc_html__( 'Button', 'prinox-tools' ),
                'separator' => 'before',
            ]
        );

		
		$this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name'           => 'button_typography',
                'label'          => esc_html__( 'Button Typography', 'prinox-tools' ),
                'selector'       => '{{WRAPPER}} .price-block .start-btn',
            ]
        );

		
		$this->start_controls_tabs('button_style_tabs');

		//Default style tab start
		$this->start_controls_tab(
		    'btn_style_default',
		    [
		        'label' => esc_html__('Normal', 'prinox-tools'),
		    ]
		);


		$this->add_group_control(
		    Group_Control_Background::get_type(),
		    [
		        'name' => 'button_bg',
		        'label' => esc_html__( 'Background', 'prinox-tools' ),
		        'types' => [ 'classic', 'gradient'],
		        'exclude' => [
			        'image',
		        ],
		        'selector' => '{{WRAPPER}} .price-block .start-btn',
		    ]
		);


		$this->add_control(
		    'button_default_text_color',
		    [
		        'label'     => esc_html__('Text Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .price-block .start-btn' => 'color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);

		$this->end_controls_tab();

		//Hover style tab start
		$this->start_controls_tab(
		    'btn_style_hover',
		    [
		        'label' => esc_html__('Hover', 'prinox-tools'),
		    ]
		);

		$this->add_group_control(
		    Group_Control_Background::get_type(),
		    [
		        'name' => 'button_hover_bg',
		        'label' => esc_html__( 'Background', 'prinox-tools' ),
		        'types' => [ 'classic', 'gradient'],
				'selector' => '{{WRAPPER}} .price-block .start-btn:before',
                'exclude' => [
                        'image',
                ],
		    ]
		);

		$this->add_control(
		    'button_hover_text_color',
		    [
		        'label'     => esc_html__('Text Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .theme-btn.start-btn:hover' => 'color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);
		$this->end_controls_tabs();

		$this->add_control(
            'price_text_h',
            [
                'type'      => Controls_Manager::HEADING,
                'label'     => esc_html__( 'Text', 'prinox-tools' ),
                'separator' => 'before',
            ]
        );

		$this->add_control(
		    'text_color',
		    [
		        'label'     => esc_html__('Text Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .price-block .credit' => 'color: {{VALUE}};',
		        ],
		        'separator' => 'before',
		    ]
		);
		$this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name'           => 'text_typography',
                'label'          => esc_html__( 'Typography', 'prinox-tools' ),
                'selector'       => '{{WRAPPER}} .price-block .credit',
            ]
        );

		$this->add_control(
            'price_nav_h',
            [
                'type'      => Controls_Manager::HEADING,
                'label'     => esc_html__( 'Price Nav', 'prinox-tools' ),
                'separator' => 'before',
            ]
        );

		$this->add_control(
		    'nav_bg_color',
		    [
		        'label'     => esc_html__('Background Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .pricing-tabs .tab-buttons' => 'color: {{VALUE}};',
		        ],
		    ]
		);
		$this->add_control(
		    'nav_border_color',
		    [
		        'label'     => esc_html__('Border Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .pricing-tabs .tab-buttons' => 'border-color: {{VALUE}};',
		        ],
		    ]
		);

		$this->add_control(
		    'nav_number_color',
		    [
		        'label'     => esc_html__('Number Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .pricing-tabs .tab-buttons .tab-btn' => 'color: {{VALUE}};',
		        ],
		    ]
		);
		$this->add_control(
		    'nav_active_color',
		    [
		        'label'     => esc_html__('Active Number Color', 'prinox-tools'),
		        'type'      => Controls_Manager::COLOR,
		        'selectors' => [
		            '{{WRAPPER}} .pricing-tabs .tab-buttons .tab-btn:hover' => 'color: {{VALUE}};',
		            '{{WRAPPER}} .pricing-tabs .tab-buttons .tab-btn.active-btn' => 'color: {{VALUE}};',
		        ],
		    ]
		);

		$this->add_group_control(
		    Group_Control_Background::get_type(),
		    [
		        'name' => 'nav_active_bg_color',
		        'label' => esc_html__( 'Active BG Color', 'prinox-tools' ),
		        'types' => [ 'classic', 'gradient'],
		        'exclude' => [
			        'image',
		        ],
		        'selector' => '{{WRAPPER}} .pricing-tabs .tab-buttons .tab-btn:hover, .pricing-tabs .tab-buttons .tab-btn.active-btn',
		    ]
		);
		
		$this->add_group_control(
            Group_Control_Typography::get_type(),
            [
                'name'           => 'nav_typography',
                'label'          => esc_html__( 'Typography', 'prinox-tools' ),
                'selector'       => '{{WRAPPER}} .pricing-tabs .tab-buttons .tab-btn',
            ]
        );

		$this->end_controls_section();
	}


	protected function render() {
		$settings = $this->get_settings_for_display();		

    ?>
    <!-- Price Section -->
	<section class="price-section">
        <?php if(!empty($settings['shape']['url'])):?>
		<div class="pattern-layer" style="background-image: url(<?php echo esc_url($settings['shape']['url']);?>)"></div>
        <?php endif;?>
		<div class="auto-container">
			<div class="row clearfix">
				<!-- Title Box -->
				<div class="title-column col-lg-5 col-md-12 col-sm-12">
					<div class="inner-column">
						<div class="sec-title">
                            <?php if(!empty($settings['sub_title'])):?>
							<div class="title"><?php echo wp_kses( $settings['sub_title'], true )?></div>
                            <?php endif;?>

                            <?php if(!empty($settings['title'])):?>
							    <h2><?php echo wp_kses( $settings['title'], true )?></h2>
                            <?php endif;?>
						</div>
                        
						<div class="counter"><span class="odometer" data-count="<?php echo esc_attr($settings['number']);?>"></span>+ <i><?php echo esc_html($settings['counter_title']);?></i></div>
                        <?php if(!empty($settings['description'])):?>
						<div class="text"><?php echo wp_kses( $settings['description'], true )?></div>
                        <?php endif;?>
                        <?php if(!empty($settings['video_title'])):?>
						<!-- Play Box -->
						<div class="play-box">
							<a href="<?php echo esc_url($settings['video_link']['url']);?>" class="lightbox-video play"><span class="fa fa-play"></span><i class="ripple"></i></a>
							<?php echo wp_kses( $settings['video_title'], true )?>
						</div>
                        <?php endif;?>
					</div>
				</div>
				
				<!-- Pricing Box -->
				<div class="pricing-column col-lg-7 col-md-12 col-sm-12">
					<div class="inner-column">
                        <?php if(!empty($settings['short_info'])):?>
						<div class="text"><?php echo wp_kses( $settings['short_info'], true )?></div>
						<?php endif;?>
						<div class="pricing-tabs tabs-box">
							
							<!--Tab Btns-->
							<div class="buttons-outer">
								<ul class="tab-buttons clearfix">
									<li data-tab="#prod-monthly" class="tab-btn active-btn"><?php echo wp_kses( $settings['tab1'], true )?></li>
									<li data-tab="#prod-yearly" class="tab-btn"><?php echo wp_kses( $settings['tab1'], true )?></li>
								</ul>
							</div>
							<?php 
                                $args = array(
                                    'post_type'           => 'prinox_pricing',
                                    'posts_per_page'      => !empty( $settings['pjt_per_page'] ) ? $settings['pjt_per_page'] : 1,
                                    'post_status'         => 'publish',
                                    'ignore_sticky_posts' => 1,
                                    'order'               => $settings['projectorder'],
                                );
                                
                                $query = new \WP_Query( $args );
                            ?>
							<!-- Tabs Container -->
							<div class="tabs-content">
								
								<!-- Tab -->
								<div class="tab active-tab" id="prod-monthly">
									<div class="content">
									
										<div class="row clearfix">
                                            <?php
                                                if ( $query->have_posts() ) {
                                                while ( $query->have_posts() ) {
                                                $query->the_post();
                                                    $pricing_thumb = 'medium';

                                            if(get_post_meta(get_the_ID(), 'prinox_pricing_meta', true)) {
                                                $price_meta = get_post_meta(get_the_ID(), 'prinox_pricing_meta', true);
                                            } else {
                                                $price_meta = array();
                                            }
                                        
                                            if( array_key_exists( 'currency', $price_meta )) {
                                                $currency = $price_meta['currency'];
                                            } else {
                                                $currency = true;
                                            }

                                            if( array_key_exists( 'monthly_price', $price_meta )) {
                                                $monthly_price = $price_meta['monthly_price'];
                                            } else {
                                                $monthly_price = true;
                                            }

                                            if( array_key_exists( 'mon_period', $price_meta )) {
                                                $mon_period = $price_meta['mon_period'];
                                            } else {
                                                $mon_period = true;
                                            }
                                            if( array_key_exists( 'price_tagline', $price_meta )) {
                                                $price_tagline = $price_meta['price_tagline'];
                                            } else {
                                                $price_tagline = true;
                                            }
                                            if( array_key_exists( 'pricing_lists', $price_meta )) {
                                                $pricing_lists = $price_meta['pricing_lists'];
                                            } else {
                                                $pricing_lists = true;
                                            }
                                            if( array_key_exists( 'pricing_btn', $price_meta )) {
                                                $pricing_btn = $price_meta['pricing_btn'];
                                            } else {
                                                $pricing_btn = true;
                                            }
                                            if( array_key_exists( 'pricing_info', $price_meta )) {
                                                $pricing_info = $price_meta['pricing_info'];
                                            } else {
                                                $pricing_info = true;
                                            }
                                            ?>
											<!-- Price Block -->
											<div class="price-block col-lg-6 col-md-6 col-sm-12">
												<div class="inner-box">
													<div class="icon-box">
														<?php the_post_thumbnail( $pricing_thumb )?>
													</div>
													<div class="price-title"><?php the_title();?></div>
													<div class="price"><?php echo esc_html($currency); echo esc_html($monthly_price); ?> <span><?php echo esc_html($mon_period); ?></span></div>
													<div class="sub-title"><?php echo esc_html($price_tagline); ?></div>
													<ul class="price-list">
                                                        <?php foreach($pricing_lists as $list):?>
														<li <?php if($list['exclude-in-package'] == true):?> class="cancel" <?php endif;?>><?php echo esc_html($list['list-item']);?></li>
                                                        <?php endforeach;?>
													</ul>
													<div class="button-box">
														<a href="<?php echo esc_url($pricing_btn['url']);?>" class="theme-btn start-btn"><?php echo esc_html($pricing_btn['text']);?></a>
													</div>
													<div class="credit"><?php echo wp_kses( $pricing_info, true );?></div>
												</div>
											</div>
											<?php } wp_reset_query(); } ?> 
											
										</div>
									
									</div>
								</div>
								
								<!--Tab-->
								<div class="tab" id="prod-yearly">
									<div class="content">
										
										<div class="row clearfix">
											
											
                                        <?php
                                                if ( $query->have_posts() ) {
                                                while ( $query->have_posts() ) {
                                                $query->the_post();
                                                    $pricing_thumb = 'medium';

                                            if(get_post_meta(get_the_ID(), 'prinox_pricing_meta', true)) {
                                                $price_meta = get_post_meta(get_the_ID(), 'prinox_pricing_meta', true);
                                            } else {
                                                $price_meta = array();
                                            }
                                        
                                            if( array_key_exists( 'currency', $price_meta )) {
                                                $currency = $price_meta['currency'];
                                            } else {
                                                $currency = true;
                                            }

                                            if( array_key_exists( 'yearly_price', $price_meta )) {
                                                $yearly_price = $price_meta['yearly_price'];
                                            } else {
                                                $yearly_price = true;
                                            }

                                            if( array_key_exists( 'yr_period', $price_meta )) {
                                                $yr_period = $price_meta['yr_period'];
                                            } else {
                                                $yr_period = true;
                                            }
                                            if( array_key_exists( 'price_tagline', $price_meta )) {
                                                $price_tagline = $price_meta['price_tagline'];
                                            } else {
                                                $price_tagline = true;
                                            }
                                            if( array_key_exists( 'pricing_lists', $price_meta )) {
                                                $pricing_lists = $price_meta['pricing_lists'];
                                            } else {
                                                $pricing_lists = true;
                                            }
                                            if( array_key_exists( 'pricing_btn', $price_meta )) {
                                                $pricing_btn = $price_meta['pricing_btn'];
                                            } else {
                                                $pricing_btn = true;
                                            }
                                            if( array_key_exists( 'pricing_info', $price_meta )) {
                                                $pricing_info = $price_meta['pricing_info'];
                                            } else {
                                                $pricing_info = true;
                                            }
                                            ?>
											<!-- Price Block -->
											<div class="price-block col-lg-6 col-md-6 col-sm-12">
												<div class="inner-box">
													<div class="icon-box">
														<?php the_post_thumbnail( $pricing_thumb )?>
													</div>
													<div class="price-title"><?php the_title();?></div>
													<div class="price"><?php echo esc_html($currency); echo esc_html($yearly_price); ?> <span><?php echo esc_html($yr_period); ?></span></div>
													<div class="sub-title"><?php echo esc_html($price_tagline); ?></div>
													<ul class="price-list">
                                                        <?php foreach($pricing_lists as $list):?>
														<li <?php if($list['exclude-in-package'] == true):?> class="cancel" <?php endif;?>><?php echo esc_html($list['list-item']);?></li>
                                                        <?php endforeach;?>
													</ul>
													<div class="button-box">
														<a href="<?php echo esc_url($pricing_btn['url']);?>" class="theme-btn start-btn"><?php echo esc_html($pricing_btn['text']);?></a>
													</div>
													<div class="credit"><?php echo wp_kses( $pricing_info, true );?></div>
												</div>
											</div>
											<?php } wp_reset_query(); } ?> 
											
										</div>
										
									</div>
								</div>
								
							</div>
							
						</div>
						
					</div>
				</div>
				
			</div>
		</div>
	</section>
	<!-- End Price Section -->
    <?php 
    }
		
}


Plugin::instance()->widgets_manager->register( new Prinox_Pricing_Table() );