navasena/wp-content/plugins/thinkai-plugin/elementor/service_card.php

1008 lines
30 KiB
PHP

<?php namespace THINKAIPLUGIN\Element;
use Elementor\Controls_Manager;
use Elementor\Controls_Stack;
use Elementor\Group_Control_Typography;
use Elementor\Group_Control_Border;
use Elementor\Repeater;
use Elementor\Widget_Base;
use Elementor\Utils;
use Elementor\Group_Control_Text_Shadow;
use \Elementor\Group_Control_Box_Shadow;
use \Elementor\Group_Control_Background;
use \Elementor\Group_Control_Image_Size;
use \Elementor\Group_Control_Text_Stroke;
use Elementor\Plugin;
/**
* Elementor button widget.
* Elementor widget that displays a button with the ability to control every
* aspect of the button design.
*
* @since 1.0.0
*/
class Service_Card extends Widget_Base {
/**
* Get widget name.
* Retrieve button widget name.
*
* @since 1.0.0
* @access public
* @return string Widget name.
*/
public function get_name() {
return 'thinkai_service_card';
}
/**
* Get widget title.
* Retrieve button widget title.
*
* @since 1.0.0
* @access public
* @return string Widget title.
*/
public function get_title() {
return esc_html__( 'Thinkai Service Card', 'thinkai' );
}
/**
* Get widget icon.
* Retrieve button widget icon.
*
* @since 1.0.0
* @access public
* @return string Widget icon.
*/
public function get_icon() {
return 'eicon-gallery-grid';
}
/**
* Get widget categories.
* Retrieve the list of categories the button widget belongs to.
* Used to determine where to display the widget in the editor.
*
* @since 2.0.0
* @access public
* @return array Widget categories.
*/
public function get_categories() {
return [ 'thinkai' ];
}
/**
* Register button widget controls.
* Adds different input fields to allow the user to change and customize the widget settings.
*
* @since 1.0.0
* @access protected
*/
protected function register_controls() {
$this->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 if($layout == '3') : ?>
<!--Start service Page-->
<section class="service-page thinkai-card">
<div class="container">
<div class="service-page__inner">
<?php if($settings['title']){ ?>
<div class="service-page__inner-overlay-title paroller">
<h2 class="te-title"><?php echo wp_kses($settings['title'], true); ?></h2>
</div>
<?php } ?>
<!--Start Service Page Top -->
<div class="service-page__top">
<div class="row">
<div class="col-xl-5 col-lg-6">
<div class="service-page__top-img">
<?php if($settings['feature_image']){ ?>
<div class="service-page__top-img__inner">
<img src="<?php echo esc_url(wp_get_attachment_url($settings['feature_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
</div>
<?php } ?>
<?php if($settings['show_image_caption_box'] == 'yes'){ ?>
<div class="overlay-box">
<?php if($settings['shape_image']){ ?>
<div class="service-page__shape1 float-bob-y">
<img src="<?php echo esc_url(wp_get_attachment_url($settings['shape_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
</div>
<?php } ?>
<div class="top-title">
<h2><?php echo wp_kses($settings['counter_value'], true); ?></h2>
<h4><?php echo wp_kses($settings['currency_name'], true); ?></h4>
</div>
<div class="bottom-text">
<h4><?php echo wp_kses($settings['image_caption_title'], true); ?></h4>
</div>
</div>
<?php } ?>
</div>
</div>
<?php if($settings['text']){ ?>
<div class="col-xl-7 col-lg-6">
<div class="service-page__top-text">
<p class="te-text">
<?php echo wp_kses($settings['text'], true); ?>
</p>
</div>
</div>
<?php } ?>
</div>
</div>
<!--End Service Page Top -->
<!--Start Service Page Bottom -->
<div class="service-page__bottom">
<div class="row">
<?php if($settings['text_v2']){ ?>
<div class="col-xl-6">
<div class="service-page__bottom-text">
<p class="te-text">
<?php echo wp_kses($settings['text_v2'], true); ?>
</p>
</div>
</div>
<?php } ?>
<?php if($settings['feature_image_v2']){ ?>
<div class="col-xl-6">
<div class="service-page__bottom-img">
<img src="<?php echo esc_url(wp_get_attachment_url($settings['feature_image_v2']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
</div>
</div>
<?php } ?>
</div>
</div>
<!--End Service Page Bottom -->
</div>
</div>
</section>
<!--End service Page-->
<?php
elseif($layout == '2') :
$page = $settings['link_option'];
$page_select = $settings[ 'page_select' ];
$ext_url = $settings[ '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"' : '';
}
?>
<div class="revolution-style2__single">
<div class="revolution-style2__single-text">
<p class="te-text"><?php echo wp_kses($settings['text'], true); ?></p>
</div>
<div class="revolution-style2__single-img">
<?php if($settings['feature_image']){ ?>
<div class="inner">
<img src="<?php echo esc_url(wp_get_attachment_url($settings['feature_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
</div>
<?php } ?>
<div class="overlay-text">
<div class="text-box">
<h3 class="te-title"><a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>><?php echo wp_kses($settings['title'], true); ?></a></h3>
</div>
<div class="btn-box">
<a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>><span class="icon-right-arrow1"></span></a>
</div>
</div>
</div>
</div>
<?php
else:
$page = $settings['link_option'];
$page_select = $settings[ 'page_select' ];
$ext_url = $settings[ '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"' : '';
}
?>
<div class="revolution-style1__single thinkai-card">
<div class="revolution-style1__single-img">
<?php if($settings['count_value']){ ?>
<div class="count-text">
<h2 data-hover="<?php echo esc_attr($settings['count_value']); ?>"><?php echo wp_kses($settings['count_value'], true); ?></h2>
</div>
<?php } ?>
<div class="inner">
<img src="<?php echo esc_url(wp_get_attachment_url($settings['feature_image']['id'])); ?>" alt="<?php bloginfo( 'name' ); ?>">
<div class="overlay-content text-center">
<div class="icon">
<a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>><span class="icon-arrow"></span></a>
</div>
<div class="text-box">
<h2 class="te-title"><a href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>><?php echo wp_kses($settings['title'], true); ?></a></h2>
<p class="te-text"><?php echo wp_kses($settings['text'], true); ?></p>
</div>
<div class="btn-box">
<a class="yt-btn-title-v1" href="<?php echo esc_url( $mount_link );?>" <?php if( $page == 'extranal' ) echo esc_attr( $target );?> <?php if( $page == 'extranal' ) echo esc_attr( $nofollow );?>><span class="icon-right-arrow1"></span> <?php echo wp_kses($settings['btn_title'], true); ?></a>
</div>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php
}
}