start_controls_section( 'monthly_table', [ 'label' => esc_html__( 'Monthly Table', 'thinkai' ), 'tab' => Controls_Manager::TAB_LAYOUT, ] ); //Layout $this->add_control( 'layout_control', [ 'label' => esc_html__( 'Layout Style', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::SELECT, 'default' => '1', 'options' => array( '1' => esc_html__( 'Style One ', 'thinkai'), '2' => esc_html__( 'Style Two ', 'thinkai'), '3' => esc_html__( 'Style Three ', 'thinkai'), ), ] ); //Show Shape Image $this->add_control( 'show_shape_image', [ 'label' => esc_html__( 'Enable Shape Image', 'thinkai' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'On', 'thinkai' ), 'label_off' => esc_html__( 'Off', 'thinkai' ), 'return_value' => 'yes', 'default' => 'no', 'condition' => [ 'layout_control' => ['2','3'], ], ] ); //Shape img V1 $this->add_control( 'shape_image_v1', [ 'label' => __( 'Shape Image V1', 'thinkai' ), 'type' => Controls_Manager::MEDIA, 'default' => ['url' => Utils::get_placeholder_image_src(),], 'condition' => [ 'layout_control' => ['2','3'], 'show_shape_image' => 'yes' ], ] ); //Shape img V1 $this->add_control( 'shape_image_v2', [ 'label' => __( 'Shape Image V2', 'thinkai' ), 'type' => Controls_Manager::MEDIA, 'default' => ['url' => Utils::get_placeholder_image_src(),], 'condition' => [ 'layout_control' => ['2','3'], 'show_shape_image' => 'yes' ], ] ); $this->add_control( 'monthly_btn_title', [ 'label' => __('Monthly Button Title', 'thinkai'), 'label_block' => true, 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__('Bill Monthly', 'thinkai'), 'condition' => [ 'layout_control' => ['1','2'], ], ] ); //Monthly Plan Table $repeater = new Repeater(); $repeater->add_control( 'icon', [ 'label' => esc_html__('Enter The icons', 'thinkai'), 'type' => \Elementor\Controls_Manager::ICONS, 'default' => [ 'value' => 'icon-input', 'library' => 'solid', ], ] ); $repeater->add_control( 'plan_title', [ 'label' => __( 'Plan Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Plan Title', 'thinkai' ), ] ); $repeater->add_control( 'plan_text', [ 'label' => __( 'Plan Description', 'thinkai' ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Plan Description', 'thinkai' ), ] ); $repeater->add_control( 'currency_sing', [ 'label' => __( 'Currency Symbols', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter Your Currency Symbols', 'thinkai' ), ] ); $repeater->add_control( 'price', [ 'label' => __( 'Price', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Title', 'thinkai' ), ] ); $repeater->add_control( 'duration', [ 'label' => __( 'Duration', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Duration', 'thinkai' ), ] ); $repeater->add_control( 'features_list', [ 'label' => __( 'Feature List', 'thinkai' ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Feature List', 'thinkai' ), ] ); $repeater->add_control( 'btn_title', [ 'label' => __( 'Button Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Button Title', 'thinkai' ), ] ); $repeater->add_control( 'link_option', [ 'label' => esc_html__( 'Select link Option', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::SELECT, 'default' => 'extranal', 'options' => array( 'extranal' => esc_html__( 'Extranal ', 'thinkai'), 'page' => esc_html__( 'Page ', 'thinkai'), ), ] ); $repeater->add_control( 'link', [ 'label' => __( 'External Link', 'thinkai' ), 'type' => Controls_Manager::URL, 'label_block' => true, 'placeholder' => __( 'https://your-link.com', 'thinkai' ), 'show_external' => true, 'default' => [ 'url' => '', 'is_external' => true, 'nofollow' => true, ], 'condition' => [ 'link_option' => 'extranal' ] ] ); $repeater->add_control( 'page_select', [ 'label' => esc_html__( 'Select Page', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::SELECT2, 'default' => 'extranal', 'options' => thinkai_page_list(), 'condition' => [ 'link_option' => 'page' ] ] ); $this->add_control( 'monthly', [ 'label' => __('Add Monthly Plan', 'thinkai'), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'title_field' => '{{{ plan_title }}}', 'condition' => [ 'layout_control' => ['1','2'], ], ] ); $this->end_controls_section(); $this->start_controls_section( 'yearly_table', [ 'label' => esc_html__( 'Yearly Table', 'thinkai' ), 'tab' => Controls_Manager::TAB_LAYOUT, 'condition' => [ 'layout_control' => ['1','2'], ], ] ); $this->add_control( 'yearly_btn_title', [ 'label' => __('Yearly Button Title', 'thinkai'), 'label_block' => true, 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__('Bill Yearly', 'thinkai'), ] ); //Yearly Plan Table $repeater = new Repeater(); $repeater->add_control( 'icon_v2', [ 'label' => esc_html__('Enter The icons', 'thinkai'), 'type' => \Elementor\Controls_Manager::ICONS, 'default' => [ 'value' => 'icon-input', 'library' => 'solid', ], ] ); $repeater->add_control( 'plan_title_v2', [ 'label' => __( 'Plan Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Plan Title', 'thinkai' ), ] ); $repeater->add_control( 'plan_text_v2', [ 'label' => __( 'Plan Description', 'thinkai' ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Plan Description', 'thinkai' ), ] ); $repeater->add_control( 'currency_sing_v2', [ 'label' => __( 'Currency Symbols', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter Your Currency Symbols', 'thinkai' ), ] ); $repeater->add_control( 'price_v2', [ 'label' => __( 'Price', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Title', 'thinkai' ), ] ); $repeater->add_control( 'duration_v2', [ 'label' => __( 'Duration', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Duration', 'thinkai' ), ] ); $repeater->add_control( 'features_list_v2', [ 'label' => __( 'Feature List', 'thinkai' ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Feature List', 'thinkai' ), ] ); $repeater->add_control( 'btn_title_v2', [ 'label' => __( 'Button Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Button Title', 'thinkai' ), ] ); $repeater->add_control( 'link_option_v2', [ 'label' => esc_html__( 'Select link Option', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::SELECT, 'default' => 'extranal', 'options' => array( 'extranal_v2' => esc_html__( 'Extranal ', 'thinkai'), 'page_v2' => esc_html__( 'Page ', 'thinkai'), ), ] ); $repeater->add_control( 'link_v2', [ 'label' => __( 'External Link', 'thinkai' ), 'type' => Controls_Manager::URL, 'label_block' => true, 'placeholder' => __( 'https://your-link.com', 'thinkai' ), 'show_external' => true, 'default' => [ 'url' => '', 'is_external' => true, 'nofollow' => true, ], 'condition' => [ 'link_option_v2' => 'extranal_v2' ] ] ); $repeater->add_control( 'page_select_v2', [ 'label' => esc_html__( 'Select Page', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::SELECT2, 'default' => 'extranal', 'options' => thinkai_page_list(), 'condition' => [ 'link_option_v2' => 'page_v2' ] ] ); $this->add_control( 'yearly', [ 'label' => __('Add Yearly Plan', 'thinkai'), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'title_field' => '{{{ plan_title_v2 }}}', ] ); $this->end_controls_section(); $this->start_controls_section( 'monthly_yearly_table', [ 'label' => esc_html__( 'Monthly/Yearly Table', 'thinkai' ), 'tab' => Controls_Manager::TAB_LAYOUT, 'condition' => [ 'layout_control' => ['3'], ], ] ); //Yearly Plan Table $repeater = new Repeater(); $repeater->add_control( 'tab_btn_title', [ 'label' => __('Tab Button Title', 'thinkai'), 'label_block' => true, 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__('Bill Monthly', 'thinkai'), ] ); $repeater->add_control( 'popular_tag_title', [ 'label' => __( 'Popular Tag Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Popular Tag Title', 'thinkai' ), ] ); $repeater->add_control( 'title', [ 'label' => __( 'Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Title', 'thinkai' ), ] ); $repeater->add_control( 'plan_title', [ 'label' => __( 'Plan Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Plan Title', 'thinkai' ), ] ); $repeater->add_control( 'plan_text', [ 'label' => __( 'Plan Description', 'thinkai' ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Plan Description', 'thinkai' ), ] ); $repeater->add_control( 'list_title_v1', [ 'label' => __( 'List Title V1', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your List Title', 'thinkai' ), ] ); $repeater->add_control( 'list_text_v1', [ 'label' => __( 'List Text V1', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Text Title', 'thinkai' ), ] ); $repeater->add_control( 'list_title_v2', [ 'label' => __( 'List Title V2', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your List Title', 'thinkai' ), ] ); $repeater->add_control( 'list_text_v2', [ 'label' => __( 'List Text V2', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Text Title', 'thinkai' ), ] ); $repeater->add_control( 'inqueries_title', [ 'label' => __( 'Inqueries Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Inqueries Title', 'thinkai' ), ] ); $repeater->add_control( 'inqueries_link', [ 'label' => __( 'External Link', 'thinkai' ), 'type' => Controls_Manager::URL, 'label_block' => true, 'placeholder' => __( 'https://your-link.com', 'thinkai' ), 'show_external' => true, 'default' => [ 'url' => '', 'is_external' => true, 'nofollow' => true, ], ] ); $repeater->add_control( 'icon', [ 'label' => esc_html__('Enter The icons', 'thinkai'), 'type' => \Elementor\Controls_Manager::ICONS, 'default' => [ 'value' => 'icon-geometric', 'library' => 'solid', ], ] ); $repeater->add_control( 'price', [ 'label' => __( 'Price', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Price', 'thinkai' ), ] ); $repeater->add_control( 'space_title', [ 'label' => __( 'Total Space', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Total Space', 'thinkai' ), ] ); $repeater->add_control( 'features_list', [ 'label' => __( 'Feature List', 'thinkai' ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Feature List', 'thinkai' ), ] ); $repeater->add_control( 'btn_title', [ 'label' => __( 'Button Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Button Title', 'thinkai' ), ] ); $repeater->add_control( 'link_option', [ 'label' => esc_html__( 'Select link Option', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::SELECT, 'default' => 'extranal', 'options' => array( 'extranal' => esc_html__( 'Extranal ', 'thinkai'), 'page' => esc_html__( 'Page ', 'thinkai'), ), ] ); $repeater->add_control( 'link', [ 'label' => __( 'External Link', 'thinkai' ), 'type' => Controls_Manager::URL, 'label_block' => true, 'placeholder' => __( 'https://your-link.com', 'thinkai' ), 'show_external' => true, 'default' => [ 'url' => '', 'is_external' => true, 'nofollow' => true, ], 'condition' => [ 'link_option' => 'extranal' ] ] ); $repeater->add_control( 'page_select', [ 'label' => esc_html__( 'Select Page', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::SELECT2, 'default' => 'extranal', 'options' => thinkai_page_list(), 'condition' => [ 'link_option' => 'page' ] ] ); $this->add_control( 'pricing_table', [ 'label' => __('Add Pricing Plan', 'thinkai'), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'title_field' => '{{{ plan_title }}}', ] ); $this->end_controls_section(); } /** * Render button widget output on the frontend. * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); $allowed_tags = wp_kses_allowed_html('post'); $layout = $settings[ 'layout_control' ]; ?>
<?php bloginfo( 'name' ); ?>
<?php bloginfo( 'name' ); ?>
    $item): ?>
$item): $icon = $item['icon']; $page = $item['link_option']; $page_select = $item[ 'page_select' ]; $ext_url = $item[ 'link' ]; if( $page == 'page' ){ $mount_link = get_page_link( $page_select ); }else{ $mount_link = $ext_url['url']; $target = $ext_url['is_external'] ? ' target="_blank"' : ''; $nofollow = $ext_url['nofollow'] ? ' rel="nofollow"' : ''; } ?>
<?php bloginfo( 'name' ); ?>
<?php bloginfo( 'name' ); ?>
$item): $icon = $item['icon']; $page = $item['link_option']; $page_select = $item[ 'page_select' ]; $ext_url = $item[ 'link' ]; if( $page == 'page' ){ $mount_link = get_page_link( $page_select ); }else{ $mount_link = $ext_url['url']; $target = $ext_url['is_external'] ? ' target="_blank"' : ''; $nofollow = $ext_url['nofollow'] ? ' rel="nofollow"' : ''; } ?>

.00 /

$item): $icon_v2 = $item['icon_v2']; $page_v2 = $item['link_option_v2']; $page_select_v2 = $item[ 'page_select_v2' ]; $ext_url_v2 = $item[ 'link_v2' ]; if( $page_v2 == 'page_v2' ){ $mount_link_v2 = get_page_link( $page_select_v2 ); }else{ $mount_link_v2 = $ext_url_v2['url']; $target_v2 = $ext_url_v2['is_external'] ? ' target="_blank"' : ''; $nofollow_v2 = $ext_url_v2['nofollow'] ? ' rel="nofollow"' : ''; } ?>

.00 /