Files
doitinpoland.com/wp-content/plugins/em-helper-plugin/includes/shortcodes/em_hero_slider.php
2023-09-12 21:41:04 +02:00

727 lines
31 KiB
PHP

<?php
/*
* Team Section
* Author: themetags
* Author URI: http://raytheme.com
* Version: 1.0
*/
/**
* =======================================================
* KC Shortcode Map
* =======================================================
*/
add_action('init', 'em_hero_slider');
if(!function_exists('em_hero_slider')):
function em_hero_slider(){
if(function_exists('kc_add_map')):
kc_add_map(
array(
'em_hero_slider' => array(
'name' => __( 'Cyber Hero Slider', 'cyber' ),
'title' => 'Single Item',
'icon' => 'fa-photo',
'category' => 'cyber',
'wrapper_class' => 'clearfix',
'description' => __( 'Display slider style. This Element Only use for EM hero Slider', 'cyber' ),
'params' => array(
'general' => array(
array(
'type' => 'radio_image',
'label' => __( 'Select Feature Style', 'cyber' ),
'name' => 'layout',
'admin_label' => true,
'options' => array(
'1' => EM40_EXTENSION_URI . 'asstes/images/blog/layout1.jpg',
'2' => EM40_EXTENSION_URI . 'asstes/images/slider/1.jpg',
'3' => EM40_EXTENSION_URI . 'asstes/images/slider/1.jpg',
'4' => EM40_EXTENSION_URI . 'asstes/images/slider/1.jpg',
'5' => EM40_EXTENSION_URI . 'asstes/images/slider/1.jpg',
'6' => EM40_EXTENSION_URI . 'asstes/images/slider/1.jpg',
'7' => EM40_EXTENSION_URI . 'asstes/images/slider/1.jpg',
),
'description' => __( 'Select Your Slider Style', 'cyber' ),
'value' => '1'
),
array(
'type' => 'text',
'name' => 'sub_title',
'label' => __( 'Sub Title', 'cyber' ),
'value' => 'Welcome To cyber',
'admin_label' => true
),
array(
'type' => 'text',
'name' => 'title1',
'label' => __( 'Heading 1', 'cyber' ),
'value' => 'Welcome To ',
'admin_label' => true
),
array(
'type' => 'text',
'name' => 'title2',
'label' => __( 'Heading 2', 'cyber' ),
'value' => 'Creative Multipurpose WP Theme',
'admin_label' => true
),
array(
'name' => 'highl',
'label' => __( 'Highlight Text', 'cyber' ),
'type' => 'text',
'value' => 'cyber.'
),
array(
'type' => 'textarea',
'name' => 'desc',
'label' => __( 'Description', 'cyber' ),
'value' => base64_encode('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut laboret dolore magna aliqua. Ut en ad minim ullamco laboris nisi ut aliquip.')
),
array(
'name' => 'show_button',
'label' => __( 'Display Button', 'cyber' ),
'type' => 'toggle',
'value' => 'yes',
),
array(
'name' => 'button_text',
'label' => __( 'Text Button', 'cyber' ),
'type' => 'text',
'value' => __( 'Contact us', 'cyber' ),
'relation' => array(
'parent' => 'show_button',
'show_when' => 'yes'
)
),
array(
'name' => 'button_link',
'label' => __( 'Link Button', 'cyber' ),
'type' => 'link',
'value' => '#',
'relation' => array(
'parent' => 'show_button',
'show_when' => 'yes'
)
),
/* image option */
array(
'type' => 'toggle',
'label' => esc_html__( 'Set Hero Bg Image', 'cyber' ),
'name' => 'show_img',
'value' => 'no',
'description' => esc_html__( 'you can show/hide image option.', 'cyber' )
),
array(
'type' => 'attach_image',
'name' => 'image',
'label' => esc_html__( 'Hero Bg Image', 'cyber' ),
'description' => esc_html__( 'Select image display For BG', 'cyber' ),
'relation' => array(
'parent' => 'show_img',
'show_when' => 'yes'
)
),
/* single image option */
array(
'type' => 'toggle',
'label' => esc_html__( 'Set App Image', 'cyber' ),
'name' => 'show_app_img',
'value' => 'no',
'description' => esc_html__( 'you can show/hide image option.', 'cyber' )
),
array(
'type' => 'attach_image',
'name' => 'app_image',
'label' => esc_html__( 'App Image', 'cyber' ),
'description' => esc_html__( 'Select image display For BG', 'cyber' ),
'relation' => array(
'parent' => 'show_app_img',
'show_when' => 'yes'
)
),
/* Video Box Option */
array(
'name' => 'icon',
'label' => __( 'Select Icon', 'cyber' ),
'type' => 'icon_picker',
'description' => __( 'Select icon display in box', 'cyber' ),
'value' => 'fa-youtube-play',
),
array(
'type' => 'toggle',
'label' => esc_html__( 'Set Youtube', 'cyber' ),
'name' => 'show_youtube',
'value' => 'no',
'description' => esc_html__( 'you can show icon after your heading.', 'cyber' )
),
array(
'type' => 'text',
'label' => __( 'Youtube Video link', 'cyber' ),
'name' => 'em_youtube',
'description' => __( 'Enter the Youtube URL. For example: https://youtu.be/BS4TUd7FJSg', 'cyber' ),
'admin_label' => true,
'value' => 'https://youtu.be/BS4TUd7FJSg',
'relation' => array(
'parent' => 'show_youtube',
'show_when' => 'yes'
)
),
array(
'type' => 'toggle',
'label' => esc_html__( 'Set Vimeo', 'cyber' ),
'name' => 'show_vimeo',
'value' => 'no',
'description' => esc_html__( 'you can show icon after your heading.', 'cyber' )
),
array(
'type' => 'text',
'label' => __( 'Vimeo Video link', 'cyber' ),
'name' => 'em_vimeo',
'description' => __( 'Enter the Vimeo URL. For example: https://vimeo.com/174008281', 'cyber' ),
'admin_label' => true,
'value' => 'https://vimeo.com/174008281',
'relation' => array(
'parent' => 'show_vimeo',
'show_when' => 'yes'
)
),
array(
'type' => 'text',
'name' => 'video_title',
'label' => __( 'Video Title', 'cyber' ),
'value' => 'See Our Introduction',
'admin_label' => true,
'relation' => array(
'parent' => 'show_youtube',
'show_when' => 'yes'
)
),
array(
'type' => 'text',
'label' => __( 'Custom class', 'cyber' ),
'name' => 'custom_class',
'description' => __( 'Enter extra custom class', 'cyber' )
)
),
'styling' => array(
array(
'name' => 'css_custom',
'type' => 'css',
'options' => array(
array(
"screens" => "any,1024,999,767,479",
'Title one' => array(
array('property' => 'color', 'label' => 'Color', 'selector' => '.hero-content-left h1'),
array('property' => 'font-family', 'label' => 'Font Family', 'selector' => '.hero-content-left h1'),
array('property' => 'font-size', 'label' => 'Font Size', 'selector' => '.hero-content-left h1'),
array('property' => 'line-height', 'label' => 'Line Height', 'selector' => '.hero-content-left h1'),
array('property' => 'font-weight', 'label' => 'Font Weight', 'selector' => '.hero-content-left h1'),
array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.hero-content-left h1'),
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.hero-content-left h1'),
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.hero-content-left h1'),
),
'Subtitle' => array(
array('property' => 'color', 'label' => 'Color', 'selector' => '.redX,.scroll-next i'),
),
'Title Two' => array(
array('property' => 'color', 'label' => 'Color', 'selector' => '.hero-content-left h2'),
array('property' => 'font-family', 'label' => 'Font Family', 'selector' => '.hero-content-left h2'),
array('property' => 'font-size', 'label' => 'Font Size', 'selector' => '.hero-content-left h2'),
array('property' => 'line-height', 'label' => 'Line Height', 'selector' => '.hero-content-left h2'),
array('property' => 'font-weight', 'label' => 'Font Weight', 'selector' => '.hero-content-left h2'),
array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.hero-content-left h2'),
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.hero-content-left h2'),
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.hero-content-left h2'),
),
'Highlight' => array(
array('property' => 'color', 'label' => 'Color', 'selector' => '.redX'),
),
'Desc' => array(
array('property' => 'color', 'label' => 'Color', 'selector' => '.hero-content-left p'),
array('property' => 'font-family', 'label' => 'Font Family', 'selector' => '.hero-content-left p'),
array('property' => 'font-size', 'label' => 'Font Size', 'selector' => '.hero-content-left p'),
array('property' => 'line-height', 'label' => 'Line Height', 'selector' => '.hero-content-left p'),
array('property' => 'font-weight', 'label' => 'Font Weight', 'selector' => '.hero-content-left p'),
array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.hero-content-left p'),
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.hero-content-left p'),
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.hero-content-left p'),
),
'Button' => array(
array('property' => 'color', 'label' => 'Button Color', 'selector' => '.btn'),
array('property' => 'color', 'label' => 'Button Hover Color', 'selector' => '.btn:hover'),
array('property' => 'background-color', 'label' => 'Button BG Color', 'selector' => '.btn'),
array('property' => 'background-color', 'label' => 'Button BG Hover Color', 'selector' => '.btn:hover'),
array('property' => 'font-family', 'label' => 'Font Family', 'selector' => '.btn'),
array('property' => 'font-size', 'label' => 'Font Size', 'selector' => '.btn'),
array('property' => 'line-height', 'label' => 'Line Height', 'selector' => '.btn'),
array('property' => 'font-weight', 'label' => 'Font Weight', 'selector' => '.btn'),
array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.btn'),
array('property' => 'border', 'label' => 'Button Border', 'selector' => '.btn'),
array('property' => 'border-color', 'label' => 'Button Border Color Hover', 'selector' => '.btn:hover'),
array('property' => 'border-radius', 'label' => 'Border Radius', 'selector' => '.btn'),
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.btn'),
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.btn')
),
'Button Two' => array(
array('property' => 'color', 'label' => 'Button Color', 'selector' => '.active .btn'),
array('property' => 'color', 'label' => 'Button Hover Color', 'selector' => '.active .btn:hover'),
array('property' => 'background-color', 'label' => 'Button BG Color', 'selector' => '.active .btn'),
array('property' => 'background-color', 'label' => 'Button BG Hover Color', 'selector' => '.active .btn:hover'),
array('property' => 'font-family', 'label' => 'Font Family', 'selector' => '.active .btn'),
array('property' => 'font-size', 'label' => 'Font Size', 'selector' => '.active .btn'),
array('property' => 'line-height', 'label' => 'Line Height', 'selector' => '.active .btn'),
array('property' => 'font-weight', 'label' => 'Font Weight', 'selector' => '.active .btn'),
array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.active .btn'),
array('property' => 'border', 'label' => 'Button Border', 'selector' => '.active .btn'),
array('property' => 'border-color', 'label' => 'Button Border Color Hover', 'selector' => '.active .btn:hover'),
array('property' => 'border-radius', 'label' => 'Border Radius', 'selector' => '.active .btn'),
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.active .btn'),
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.active .btn')
),
'Image' => array(
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.slider_single_img img'),
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.slider_single_img img'),
)
)
)
)
),
'animate' => array(
array(
'name' => 'animate',
'type' => 'animate'
)
),
)
),
)// first array
); // End add map
endif;
}
endif;
/**
* =======================================================
* Register Shortcode banner_slider section
* =======================================================
*/
// [em_hero_slider title="" desc="" custom_css_class=""]
if(!function_exists('em_hero_slider_function')){
function em_hero_slider_function($atts,$content){
ob_start();
$em_hero_slider = shortcode_atts(array(
'layout' => 1,
'sub_title' => '',
'title1' => '',
'highl' => '',
'title2' => '',
'subtitle' => '',
'desc' => '',
'show_button' => '',
'button_text' => '',
'button_link' => '',
'show_img' => '',
'image' => '',
'show_app_img' => '',
'app_image' => '',
'show_youtube' => '',
'icon' => '',
'em_youtube' => '',
'show_vimeo' => '',
'em_vimeo' => '',
'video_title' => '',
'custom_css' => '',
'custom_class' => '',
),$atts);
extract( $em_hero_slider );
//custom class
$wrap_class = apply_filters( 'kc-el-class', $atts );
if( !empty( $custom_class ) ):
$wrap_class[] = $custom_class;
endif;
$extra_class = implode( ' ', $wrap_class );
$images="";
$images = wp_get_attachment_image_src( $image, 'full');
$images2 = wp_get_attachment_image_src( $app_image, 'full');
$data_button="";
$data_button="";
if ( $show_button == 'yes' ) {
if ( !empty( $button_link ) ) {
$button_link_text = explode( '|', $button_link );
$button_link = $button_link_text[0];
}
if( empty($button_text) )
$button_text = __( 'Readmore', 'cyber' );
$data_button .= '<div class="hero-slider-btn ">';
$data_button .= '<a class="cyber_btn" href="'. $button_link .'">'. $button_text .'</a>';
$data_button .= '</div>';
}
switch($layout){
case'7':
?>
<div class="hero-single-slide hero-section hero-style-five hero-style-seven align-items-center d-flex <?php echo esc_attr( $extra_class ); ?>" style="<?php if( $show_img == 'yes' && !empty( $images ) ){ ?>background-image:url(<?php echo esc_url( $images[0] ); ?>)<?php } ?> ">
<div class="container">
<div class="row align-items-center justify-content-between ">
<div class="col-md-6 col-lg-6">
<div class="hero-content-left text-white">
<h1 class="text-white"><?php if ( !empty( $title1 ) ) {echo $title1;} ?><span class="redX"><?php if ( !empty( $highl ) ) {echo $highl;}?></span></h1>
<p class="lead"><?php if ( !empty( $desc ) ) {echo $desc;} ?></p>
<?php echo $data_button;?>
<?php if( !empty( $icon ) ){ ?>
<div class="slider-video-icon">
<?php if( $show_youtube == 'yes' && !empty( $em_youtube ) ){ ?>
<a class="video-vemo-icon venobox vbox-item" data-vbtype="youtube" data-autoplay="true" href="<?php echo $em_youtube; ?>"><i class="<?php echo esc_attr( $icon ); ?>"></i></a>
<?php if ( !empty( $video_title ) ) {?>
<span>
<?php echo $video_title; ?>
</span>
<?php }?>
<?php } ?>
<?php if( $show_vimeo == 'yes' && !empty( $em_vimeo ) ){ ?>
<a class="video-vemo-icon venobox vbox-item" data-vbtype="youtube" data-autoplay="true" href="<?php echo $em_vimeo; ?>"><i class="<?php echo esc_attr( $icon ); ?>"></i></a>
<?php if ( !empty( $video_title ) ) {?>
<span>
<?php echo $video_title; ?>
</span>
<?php }?>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
<div class="col-md-6 col-lg-6">
</div>
</div>
</div>
</div>
<?php
break;
case'6':
?>
<div class="hero-single-slide hero-section align-items-center d-flex <?php echo esc_attr( $extra_class ); ?>" style="<?php if( $show_img == 'yes' && !empty( $images ) ){ ?>background-image:url(<?php echo esc_url( $images[0] ); ?>)<?php } ?> ">
<div class="container">
<div class="row align-items-center justify-content-between py-5">
<div class="col-md-6 col-lg-6">
<div class="hero-content-left text-white">
<h1 class="text-white"><?php if ( !empty( $title1 ) ) {echo $title1;} ?><span class="redX"><?php if ( !empty( $highl ) ) {echo $highl;}?></span></h1>
<h2 class="text-white"><?php if ( !empty( $title2 ) ) {echo $title2;} ?></h2>
<p class="lead"><?php if ( !empty( $desc ) ) {echo $desc;} ?></p>
<?php echo $data_button;?>
<?php if( !empty( $icon ) ){ ?>
<div class="slider-video-icon">
<?php if( $show_youtube == 'yes' && !empty( $em_youtube ) ){ ?>
<a class="video-vemo-icon venobox vbox-item" data-vbtype="youtube" data-autoplay="true" href="<?php echo $em_youtube; ?>"><i class="<?php echo esc_attr( $icon ); ?>"></i></a>
<?php if ( !empty( $video_title ) ) {?>
<span>
<?php echo $video_title; ?>
</span>
<?php }?>
<?php } ?>
<?php if( $show_vimeo == 'yes' && !empty( $em_vimeo ) ){ ?>
<a class="video-vemo-icon venobox vbox-item" data-vbtype="youtube" data-autoplay="true" href="<?php echo $em_vimeo; ?>"><i class="<?php echo esc_attr( $icon ); ?>"></i></a>
<?php if ( !empty( $video_title ) ) {?>
<span>
<?php echo $video_title; ?>
</span>
<?php }?>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
<div class="col-md-6 col-lg-5">
<?php if( $show_app_img == 'yes' && !empty( $images2 ) ){ ?>
<div class="hero-animation-img">
<img src="<?php echo esc_url( $images2[0] ); ?>" alt="" />
</div>
<?php } ?>
</div>
</div>
</div>
<div class="bottom-img">
<img src="<?php echo get_stylesheet_directory_uri() . '/assets/images/wave-shap.svg'; ?>" alt="wave shape" class="img-fluid">
</div>
</div>
<?php
break;
case'5':
?>
<div class="hero-single-slide slide-two-bg hero-section align-items-center d-flex <?php echo esc_attr( $extra_class ); ?>" style="<?php if( $show_img == 'yes' && !empty( $images ) ){ ?>background-image:url(<?php echo esc_url( $images[0] ); ?>)<?php } ?> ">
<div class="container">
<div class="row align-items-center justify-content-between py-5">
<div class="col-md-6 col-lg-6">
<div class="hero-content-left text-white">
<h1 class="text-white"><?php if ( !empty( $title1 ) ) {echo $title1;} ?><span class="redX"><?php if ( !empty( $highl ) ) {echo $highl;}?></span></h1>
<h2 class="text-white"><?php if ( !empty( $title2 ) ) {echo $title2;} ?></h2>
<p class="lead"><?php if ( !empty( $desc ) ) {echo $desc;} ?></p>
<?php echo $data_button;?>
<?php if( !empty( $icon ) ){ ?>
<div class="slider-video-icon">
<?php if( $show_youtube == 'yes' && !empty( $em_youtube ) ){ ?>
<a class="video-vemo-icon venobox vbox-item" data-vbtype="youtube" data-autoplay="true" href="<?php echo $em_youtube; ?>"><i class="<?php echo esc_attr( $icon ); ?>"></i></a>
<?php if ( !empty( $video_title ) ) {?>
<span>
<?php echo $video_title; ?>
</span>
<?php }?>
<?php } ?>
<?php if( $show_vimeo == 'yes' && !empty( $em_vimeo ) ){ ?>
<a class="video-vemo-icon venobox vbox-item" data-vbtype="youtube" data-autoplay="true" href="<?php echo $em_vimeo; ?>"><i class="<?php echo esc_attr( $icon ); ?>"></i></a>
<?php if ( !empty( $video_title ) ) {?>
<span>
<?php echo $video_title; ?>
</span>
<?php }?>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
<div class="col-md-6 col-lg-5">
<?php if( $show_app_img == 'yes' && !empty( $images2 ) ){ ?>
<div class="hero-animation-img">
<img src="<?php echo esc_url( $images2[0] ); ?>" alt="" />
</div>
<?php } ?>
</div>
</div>
</div>
<div class="bottom-img">
<img src="<?php echo get_stylesheet_directory_uri() . '/assets/images/hero-bg-shape-1.svg'; ?>" alt="wave shape" class="img-fluid">
</div>
</div>
<?php
break;
case'4':
?>
<div class="hero-single-slide hero-section hero-style-four align-items-center d-flex <?php echo esc_attr( $extra_class ); ?>" style="<?php if( $show_img == 'yes' && !empty( $images ) ){ ?>background-image:url(<?php echo esc_url( $images[0] ); ?>)<?php } ?> ">
<div class="container">
<div class="row justify-content-between ">
<div class="col-md-12 col-lg-12">
<div class="hero-content-left pt-5 ">
<h3><?php if ( !empty( $sub_title ) ) {echo $sub_title;} ?></h3>
<h1><?php if ( !empty( $title1 ) ) {echo $title1;} ?><span class="redX"><?php if ( !empty( $highl ) ) {echo $highl;}?></span></h1>
<h2><?php if ( !empty( $title2 ) ) {echo $title2;} ?></h2>
<p><?php if ( !empty( $desc ) ) {echo $desc;} ?></p>
<?php echo $data_button;?>
<?php if( !empty( $icon ) ){ ?>
<div class="hero-video-icon">
<?php if( $show_youtube == 'yes' && !empty( $em_youtube ) ){ ?>
<a class="video-vemo-icon venobox vbox-item" data-vbtype="youtube" data-autoplay="true" href="<?php echo $em_youtube; ?>"><i class="<?php echo esc_attr( $icon ); ?>"></i></a>
<?php if ( !empty( $video_title ) ) {?>
<span>
<?php echo $video_title; ?>
</span>
<?php }?>
<?php } ?>
<?php if( $show_vimeo == 'yes' && !empty( $em_vimeo ) ){ ?>
<a class="video-vemo-icon venobox vbox-item" data-vbtype="youtube" data-autoplay="true" href="<?php echo $em_vimeo; ?>"><i class="<?php echo esc_attr( $icon ); ?>"></i></a>
<?php if ( !empty( $video_title ) ) {?>
<span>
<?php echo $video_title; ?>
</span>
<?php }?>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<?php
break;
case'3':
?>
<div class="hero-single-slide hero-section hero-style-three align-items-center d-flex <?php echo esc_attr( $extra_class ); ?>" style="<?php if( $show_img == 'yes' && !empty( $images ) ){ ?>background-image:url(<?php echo esc_url( $images[0] ); ?>)<?php } ?> ">
<div class="container">
<div class="row justify-content-between text-center">
<div class="col-md-12 col-lg-12">
<div class="hero-content-left">
<h3 class="text-white"><?php if ( !empty( $sub_title ) ) {echo $sub_title;} ?></h3>
<h1 class="text-white"><?php if ( !empty( $title1 ) ) {echo $title1;} ?><span class="redX"><?php if ( !empty( $highl ) ) {echo $highl;}?></span></h1>
<h2 class="text-white"><?php if ( !empty( $title2 ) ) {echo $title2;} ?></h2>
<p class="text-white"><?php if ( !empty( $desc ) ) {echo $desc;} ?></p>
<?php echo $data_button;?>
<?php if( !empty( $icon ) ){ ?>
<div class="hero-video-icon">
<?php if( $show_youtube == 'yes' && !empty( $em_youtube ) ){ ?>
<a class="video-vemo-icon venobox vbox-item" data-vbtype="youtube" data-autoplay="true" href="<?php echo $em_youtube; ?>"><i class="<?php echo esc_attr( $icon ); ?>"></i></a>
<?php if ( !empty( $video_title ) ) {?>
<span class="text-white">
<?php echo $video_title; ?>
</span>
<?php }?>
<?php } ?>
<?php if( $show_vimeo == 'yes' && !empty( $em_vimeo ) ){ ?>
<a class="video-vemo-icon venobox vbox-item" data-vbtype="youtube" data-autoplay="true" href="<?php echo $em_vimeo; ?>"><i class="<?php echo esc_attr( $icon ); ?>"></i></a>
<?php if ( !empty( $video_title ) ) {?>
<span class="text-white">
<?php echo $video_title; ?>
</span>
<?php }?>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
<div class="hero-shape-img">
<img src="<?php echo get_stylesheet_directory_uri() . '/assets/images/banner-shape.svg'; ?>" alt="shape-image">
</div>
</div>
<?php
break;
case'2':
?>
<div class="hero-single-slide hero-section hero-style-two align-items-center d-flex <?php echo esc_attr( $extra_class ); ?>" style="<?php if( $show_img == 'yes' && !empty( $images ) ){ ?>background-image:url(<?php echo esc_url( $images[0] ); ?>)<?php } ?> ">
<div class="hero-shape"></div>
<div class="container">
<div class="row justify-content-between ">
<div class="col-md-6 col-lg-6">
<div class="hero-content-left pt-5 ">
<h3><?php if ( !empty( $sub_title ) ) {echo $sub_title;} ?></h3>
<h1><?php if ( !empty( $title1 ) ) {echo $title1;} ?><span class="redX"><?php if ( !empty( $highl ) ) {echo $highl;}?></span></h1>
<h2><?php if ( !empty( $title2 ) ) {echo $title2;} ?></h2>
<p><?php if ( !empty( $desc ) ) {echo $desc;} ?></p>
<?php echo $data_button;?>
<?php if( !empty( $icon ) ){ ?>
<div class="hero-video-icon">
<?php if( $show_youtube == 'yes' && !empty( $em_youtube ) ){ ?>
<a class="video-vemo-icon venobox vbox-item" data-vbtype="youtube" data-autoplay="true" href="<?php echo $em_youtube; ?>"><i class="<?php echo esc_attr( $icon ); ?>"></i></a>
<?php if ( !empty( $video_title ) ) {?>
<span>
<?php echo $video_title; ?>
</span>
<?php }?>
<?php } ?>
<?php if( $show_vimeo == 'yes' && !empty( $em_vimeo ) ){ ?>
<a class="video-vemo-icon venobox vbox-item" data-vbtype="youtube" data-autoplay="true" href="<?php echo $em_vimeo; ?>"><i class="<?php echo esc_attr( $icon ); ?>"></i></a>
<?php if ( !empty( $video_title ) ) {?>
<span>
<?php echo $video_title; ?>
</span>
<?php }?>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
<div class="col-md-6 col-lg-5">
<div class="hero-animation-img">
<img class="img-fluid d-block animation-one" src="<?php echo get_stylesheet_directory_uri() . '/assets/images/hero-animation-04.svg'; ?>" alt="animation-image">
<img class="img-fluid d-none d-lg-block animation-two" src="<?php echo get_stylesheet_directory_uri() . '/assets/images/hero-animation-05.svg'; ?>" alt="animation-image" width="160">
<img class="img-fluid d-none d-lg-block animation-three" src="<?php echo get_stylesheet_directory_uri() . '/assets/images/hero-animation-02.svg'; ?>" alt="animation-image" width="120">
<img class="img-fluid d-none d-lg-block animation-four" src="<?php echo get_stylesheet_directory_uri() . '/assets/images/hero-animation-03.svg'; ?>" alt="animation-image" width="230">
</div>
</div>
</div>
</div>
</div>
<?php
break;
default:
?>
<div class="hero-single-slide hero-section hero-style-one align-items-center d-flex <?php echo esc_attr( $extra_class ); ?>" style="<?php if( $show_img == 'yes' && !empty( $images ) ){ ?>background-image:url(<?php echo esc_url( $images[0] ); ?>)<?php } ?> ">
<div class="circles">
<div class="point animated-point-1"></div>
<div class="point animated-point-2"></div>
<div class="point animated-point-3"></div>
<div class="point animated-point-4"></div>
<div class="point animated-point-5"></div>
<div class="point animated-point-6"></div>
<div class="point animated-point-7"></div>
<div class="point animated-point-8"></div>
<div class="point animated-point-9"></div>
</div>
<div class="container">
<div class="row justify-content-between ">
<div class="col-md-6 col-lg-6">
<div class="hero-content-left pt-5 ">
<h3><?php if ( !empty( $sub_title ) ) {echo $sub_title;} ?></h3>
<h1><?php if ( !empty( $title1 ) ) {echo $title1;} ?><span class="redX"><?php if ( !empty( $highl ) ) {echo $highl;}?></span></h1>
<h2><?php if ( !empty( $title2 ) ) {echo $title2;} ?></h2>
<p><?php if ( !empty( $desc ) ) {echo $desc;} ?></p>
<?php echo $data_button;?>
<?php if( !empty( $icon ) ){ ?>
<div class="hero-video-icon">
<?php if( $show_youtube == 'yes' && !empty( $em_youtube ) ){ ?>
<a class="video-vemo-icon venobox vbox-item" data-vbtype="youtube" data-autoplay="true" href="<?php echo $em_youtube; ?>"><i class="<?php echo esc_attr( $icon ); ?>"></i></a>
<?php if ( !empty( $video_title ) ) {?>
<span>
<?php echo $video_title; ?>
</span>
<?php }?>
<?php } ?>
<?php if( $show_vimeo == 'yes' && !empty( $em_vimeo ) ){ ?>
<a class="video-vemo-icon venobox vbox-item" data-vbtype="youtube" data-autoplay="true" href="<?php echo $em_vimeo; ?>"><i class="<?php echo esc_attr( $icon ); ?>"></i></a>
<?php if ( !empty( $video_title ) ) {?>
<span>
<?php echo $video_title; ?>
</span>
<?php }?>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
<div class="col-md-6 col-lg-5">
<div class="hero-animation-img">
<img class="img-fluid d-block animation-one" src="<?php echo get_stylesheet_directory_uri() . '/assets/images/hero-animation-04.svg'; ?>" alt="animation-image">
<img class="img-fluid d-none d-lg-block animation-two" src="<?php echo get_stylesheet_directory_uri() . '/assets/images/hero-animation-01.svg'; ?>" alt="animation-image" width="120">
<img class="img-fluid d-none d-lg-block animation-three" src="<?php echo get_stylesheet_directory_uri() . '/assets/images/hero-animation-02.svg'; ?>" alt="animation-image" width="120">
<img class="img-fluid d-none d-lg-block animation-four" src="<?php echo get_stylesheet_directory_uri() . '/assets/images/hero-animation-03.svg'; ?>" alt="animation-image" width="230">
</div>
</div>
</div>
</div>
</div>
<?php
break;
}
return ob_get_clean();
}
add_shortcode('em_hero_slider' ,'em_hero_slider_function');
}