start_controls_section( 'service_card', [ 'label' => esc_html__( 'Thinkai Service Card', 'thinkai' ), ] ); $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'), ), ] ); //BG Image $this->add_control( 'feature_image', [ 'label' => __( 'Feature Image Url', 'thinkai' ), 'type' => Controls_Manager::MEDIA, 'default' => ['url' => Utils::get_placeholder_image_src(),], 'condition' => [ 'layout_control' => ['1','2','3'], ] ] ); //Count Value $this->add_control( 'count_value', [ 'label' => __( 'Count Value', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( '01', 'thinkai' ), 'condition' => [ 'layout_control' => '1', ] ] ); //Switcher $this->add_control( 'show_image_caption_box', [ 'label' => esc_html__( 'Enable Image Box', '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' => '3', ] ] ); //Shape Image $this->add_control( 'shape_image', [ 'label' => __( 'Image Box Shape Url', 'thinkai' ), 'type' => Controls_Manager::MEDIA, 'default' => ['url' => Utils::get_placeholder_image_src(),], 'condition' => [ 'layout_control' => '3', 'show_image_caption_box' => 'yes' ] ] ); //Counter Value $this->add_control( 'counter_value', [ 'label' => __( 'Image Box Counter Value', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( '236', 'thinkai' ), 'condition' => [ 'layout_control' => '3', 'show_image_caption_box' => 'yes' ] ] ); //Currency Name $this->add_control( 'currency_name', [ 'label' => __( 'Currency Name', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( 'Million', 'thinkai' ), 'condition' => [ 'layout_control' => '3', 'show_image_caption_box' => 'yes' ] ] ); //image caption title $this->add_control( 'image_caption_title', [ 'label' => __( 'Image Box Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( 'Images Generated', 'thinkai' ), 'condition' => [ 'layout_control' => '3', 'show_image_caption_box' => 'yes' ] ] ); //Title $this->add_control( 'title', [ 'label' => __( 'Title', 'thinkai' ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( 'Image Generator', 'thinkai' ), ] ); //Text $this->add_control( 'text', [ 'label' => __( 'Description', 'thinkai' ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( 'Convert text to image.', 'thinkai' ), ] ); //Feature Image $this->add_control( 'feature_image_v2', [ 'label' => __( 'Feature Image V2 Url', 'thinkai' ), 'type' => Controls_Manager::MEDIA, 'default' => ['url' => Utils::get_placeholder_image_src(),], 'condition' => [ 'layout_control' => '3', ] ] ); //Text $this->add_control( 'text_v2', [ 'label' => __( 'Next Description', 'thinkai' ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( 'Description', 'thinkai' ), 'condition' => [ 'layout_control' => '3', ] ] ); //Button Title $this->add_control( 'btn_title', [ 'label' => __( 'Button Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( 'Read More', 'thinkai' ), 'condition' => [ 'layout_control' => '1', ] ] ); $this->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'), ), 'condition' => [ 'layout_control' => ['1','2'] ] ] ); $this->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' => [ 'layout_control' => ['1','2'], 'link_option' => 'extranal' ] ] ); $this->add_control( 'page_select', [ 'label' => esc_html__( 'Select Page', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::SELECT2, 'default' => 'extranal', 'options' => thinkai_page_list(), 'condition' => [ 'layout_control' => ['1','2'], 'link_option' => 'page' ] ] ); $this->end_controls_section(); /************************************************************************ Tab Style Start *************************************************************************/ /**Layout Control Style**/ $this->start_controls_section( 'thinkai_layout_style', [ 'label' => esc_html__('Thinkai Layout Setting', 'thinkai'), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'thinkai_layout_margin', [ 'label' => __( 'Spacing', 'thinkai' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .thinkai-card' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ], 'frontend_available' => true, ] ); $this->add_responsive_control( 'thinkai_layout_padding', [ 'label' => __( 'Gapping', 'thinkai' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .thinkai-card' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ], 'frontend_available' => true, ] ); $this->add_control( 'thinkai_layout_background', [ 'label' => __( 'Background', 'thinkai' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'thinkai_layout_bgtype', 'label' => __( 'Button Background', 'thinkai' ), 'types' => [ 'classic', 'gradient', 'video' ], 'selector' => '{{WRAPPER}} .thinkai-card', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'box_layout_border_type', 'selector' => '{{WRAPPER}} .thinkai-card', 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'box_layout_shadow', 'selector' => '{{WRAPPER}} .thinkai-card', 'separator' => 'before', ] ); $this->add_control( 'box_layout_border_radius', [ 'label' => esc_html__('Border Radius', 'thinkai'), 'type' => Controls_Manager::DIMENSIONS, 'separator' => 'before', 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} .thinkai-card' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ], ] ); $this->end_controls_section(); //SubTitle Style $this->start_controls_section( 'subtitle_style', [ 'label' => esc_html__( 'SubTitle Style Settings', 'thinkai' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'layout_control' => '2' ] ] ); $this->add_responsive_control( 'subtitle__margin', [ 'label' => esc_html__( 'Margin', 'thinkai' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .te-subtitle' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ], 'separator' => 'before', ] ); $this->add_responsive_control( 'subtitle_padding', [ 'label' => esc_html__( 'Padding', 'thinkai' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .te-subtitle' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ], 'separator' => 'before', ] ); $this->add_control( 'subtitle_color', [ 'label' => esc_html__( 'Text Color', 'thinkai' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .te-subtitle' => 'color: {{VALUE}} !important;', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'subtitle_typography', 'label' => __('Typography', 'thinkai'), 'selector' => '{{WRAPPER}} .te-subtitle', ] ); $this->add_group_control( Group_Control_Text_Stroke::get_type(), [ 'name' => 'subtitle_text_stroke', 'selector' => '{{WRAPPER}} .te-subtitle', ] ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), [ 'name' => 'subtitle_text_shadow', 'selector' => '{{WRAPPER}} .te-subtitle', ] ); $this->end_controls_section(); //Title Style $this->start_controls_section( 'title_style', [ 'label' => esc_html__( 'Title', 'thinkai' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'title__margin', [ 'label' => esc_html__( 'Margin', 'thinkai' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .te-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ], 'separator' => 'before', ] ); $this->add_responsive_control( 'title_padding', [ 'label' => esc_html__( 'Padding', 'thinkai' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .te-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ], 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'title_bgtype', 'label' => __( 'Background', 'thinkai' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .te-title', ] ); $this->add_control( 'title_color', [ 'label' => esc_html__( 'Text Color', 'thinkai' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .te-title' => 'color: {{VALUE}} !important;', '{{WRAPPER}} .te-title a' => 'color: {{VALUE}} !important;', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'label' => __('Typography', 'thinkai'), 'selector' => '{{WRAPPER}} .te-title', ] ); $this->add_group_control( Group_Control_Text_Stroke::get_type(), [ 'name' => 'title_text_stroke', 'selector' => '{{WRAPPER}} .te-title', ] ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), [ 'name' => 'title_text_shadow', 'selector' => '{{WRAPPER}} .te-title', ] ); $this->end_controls_section(); //Text Style $this->start_controls_section( 'text_style', [ 'label' => esc_html__( 'Text Style Settings', 'thinkai' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'text__margin', [ 'label' => esc_html__( 'Margin', 'thinkai' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .te-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ], 'separator' => 'before', ] ); $this->add_responsive_control( 'text_padding', [ 'label' => esc_html__( 'Padding', 'thinkai' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .te-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ], 'separator' => 'before', ] ); $this->add_control( 'text_color', [ 'label' => esc_html__( 'Text Color', 'thinkai' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .te-text' => 'color: {{VALUE}} !important;', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'text_typography', 'label' => __('Typography', 'thinkai'), 'selector' => '{{WRAPPER}} .te-text', ] ); $this->add_group_control( Group_Control_Text_Stroke::get_type(), [ 'name' => 'text_text_stroke', 'selector' => '{{WRAPPER}} .te-text', ] ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), [ 'name' => 'text_text_shadow', 'selector' => '{{WRAPPER}} .te-text', ] ); $this->end_controls_section(); /**Button Style**/ $this->start_controls_section( 'button_style', [ 'label' => esc_html__('Button Style Setting', 'thinkai'), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->start_controls_tabs( 'thinkai_tabs_btn' ); $this->start_controls_tab( 'thinkai_tab_btn_normal', [ 'label' => __( 'Normal', 'thinkai' ), ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'btn_bgtype', 'label' => __( 'Button Background', 'thinkai' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .yt-btn-title-v1', ] ); $this->add_responsive_control( 'btn_width_size', [ 'label' => __( 'Width', 'thinkai' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'em', '%', 'custom' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 500, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .yt-btn-title-v1' => 'width: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'btn_height_size', [ 'label' => __( 'Height', 'thinkai' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'em', '%', 'custom' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 500, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .yt-btn-title-v1' => 'height: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'btn_padding', [ 'label' => __( 'Padding', 'thinkai' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .yt-btn-title-v1' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ], 'frontend_available' => true, ] ); $this->add_responsive_control( 'btn_margin', [ 'label' => __( 'Margin', 'thinkai' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .yt-btn-title-v1' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ], 'frontend_available' => true, ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'btn_border_type', 'selector' => '{{WRAPPER}} .yt-btn-title-v1', 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'border_box_shadow', 'selector' => '{{WRAPPER}} .yt-btn-title-v1', 'separator' => 'before', ] ); $this->add_control( 'btn_border_radius', [ 'label' => esc_html__('Border Radius', 'thinkai'), 'type' => Controls_Manager::DIMENSIONS, 'separator' => 'before', 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} .yt-btn-title-v1' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'btn_title_typography', 'label' => __('Button Text Typography', 'thinkai'), 'selector' => '{{WRAPPER}} .yt-btn-title-v1', 'separator' => 'before', ] ); $this->add_control( 'btn_title_color', [ 'label' => __('Button Text Color', 'thinkai'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .yt-btn-title-v1' => 'color: {{VALUE}} !important' ], 'separator' => 'before', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'thinkai_tab_btn_hover', [ 'label' => __( 'Hover', 'thinkai' ), ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'btn_hover_bg_bgtype', 'label' => __( 'Button Hover Background', 'thinkai' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .yt-btn-title-v1:hover, .yt-btn-title-v1:before', ] ); $this->add_control( 'btn_title_hover_color', [ 'label' => __('Button Text Hover Color', 'thinkai'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .yt-btn-title-v1:hover' => 'color: {{VALUE}} !important' ], 'separator' => 'before', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $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' ); ?>

<?php bloginfo( 'name' ); ?>

<?php bloginfo( 'name' ); ?>