Skip to content

Commit ff604b0

Browse files
committed
Update slider-pro.php
1 parent 73128f6 commit ff604b0

File tree

1 file changed

+60
-8
lines changed

1 file changed

+60
-8
lines changed

includes/widgets/slider-pro/slider-pro.php

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,63 @@ protected function register_style_controls() {
403403

404404
$current_theme = get_template();
405405

406+
/* Option for Inspiro Premium*/
407+
if( 'inspiro' === $current_theme ) {
408+
409+
$this->add_control(
410+
'slideshow_align',
411+
[
412+
'label' => esc_html__( 'Content Alignment', 'wpzoom-elementor-addons' ),
413+
'type' => Controls_Manager::CHOOSE,
414+
'label_block' => false,
415+
'options' => [
416+
'left' => [
417+
'title' => esc_html__( 'Left', 'wpzoom-elementor-addons' ),
418+
'icon' => 'eicon-text-align-left',
419+
],
420+
'center' => [
421+
'title' => esc_html__( 'Center', 'wpzoom-elementor-addons' ),
422+
'icon' => 'eicon-text-align-center',
423+
],
424+
'right' => [
425+
'title' => esc_html__( 'Right', 'wpzoom-elementor-addons' ),
426+
'icon' => 'eicon-text-align-right',
427+
],
428+
],
429+
'toggle' => true,
430+
'default' => 'center'
431+
]
432+
);
433+
434+
$this->add_control(
435+
'slideshow_align_vertical',
436+
[
437+
'label' => esc_html__( 'Content Position (Vertical)', 'wpzoom-elementor-addons' ),
438+
'type' => Controls_Manager::CHOOSE,
439+
'label_block' => false,
440+
'options' => [
441+
'bottom' => [
442+
'title' => esc_html__( 'Bottom', 'wpzoom-elementor-addons' ),
443+
'icon' => 'eicon-v-align-bottom',
444+
],
445+
'middle' => [
446+
'title' => esc_html__( 'Middle', 'wpzoom-elementor-addons' ),
447+
'icon' => 'eicon-v-align-middle',
448+
],
449+
],
450+
451+
'condition' => array(
452+
'slideshow_align!' => 'center',
453+
),
454+
'toggle' => true,
455+
'default' => 'middle'
456+
]
457+
);
458+
459+
460+
}
461+
462+
406463
/* Option for Inspiro PRO*/
407464
if( 'wpzoom-inspiro-pro' === $current_theme ) {
408465

@@ -897,12 +954,7 @@ protected function render() {
897954
$align = isset( $settings['slideshow_align'] ) ? $settings['slideshow_align'] : '';
898955
$align_vertical = isset( $settings['slideshow_align_vertical'] ) ? $settings['slideshow_align_vertical'] : '';
899956

900-
/* Option for Inspiro PRO*/
901-
if( 'wpzoom-inspiro-pro' === $current_theme ) {
902-
$this->add_render_attribute( '_li-wrap', 'class', 'li-wrap wpz-' . $align . '-slider-wrap wpz-' . $align_vertical . '-slider-wrap' );
903-
} else {
904-
$this->add_render_attribute( '_li-wrap', 'class', 'li-wrap' );
905-
}
957+
$this->add_render_attribute( '_li-wrap', 'class', 'li-wrap wpz-' . $align . '-slider-wrap wpz-' . $align_vertical . '-slider-wrap' );
906958

907959
$this->add_render_attribute( '_slide_title', 'class', [ $settings['hide_title_desktop'], $settings['hide_title_tablet'], $settings['hide_title_mobile'] ] );
908960

@@ -1041,7 +1093,7 @@ protected function render() {
10411093

10421094
<?php
10431095
/* Markup for Inspiro PRO*/
1044-
if( 'wpzoom-inspiro-pro' === $current_theme && 'center' != $align ) { ?>
1096+
if( ('wpzoom-inspiro-pro' === $current_theme && 'center' != $align ) || ('inspiro' === $current_theme && 'bottom' === $align_vertical ) ) { ?>
10451097

10461098
<?php if($popup_video_type === 'self_hosted' && $is_video_popup): ?>
10471099
<div id="zoom-popup-<?php echo get_the_ID(); ?>" class="animated slow mfp-hide" data-src ="<?php echo esc_url( $popup_final_external_src ); ?>">
@@ -1103,7 +1155,7 @@ protected function render() {
11031155
?>
11041156
<?php
11051157
/* Markup for Inspiro Premium*/
1106-
if( ( 'inspiro' === $current_theme && class_exists( 'WPZOOM' ) ) || ( 'wpzoom-inspiro-pro' === $current_theme && $align == 'center' ) ) {
1158+
if( ( 'inspiro' === $current_theme && class_exists( 'WPZOOM' ) && $align_vertical != 'bottom' ) || ( 'wpzoom-inspiro-pro' === $current_theme && $align == 'center' ) ) {
11071159
?>
11081160
<?php if($popup_video_type === 'self_hosted' && $is_video_popup): ?>
11091161
<div id="zoom-popup-<?php echo get_the_ID(); ?>" class="animated slow mfp-hide" data-src ="<?php echo $popup_final_external_src ?>">

0 commit comments

Comments
 (0)