email working - remove clients - preview polish
This commit is contained in:
1 parent
2b1424d127
commit
da83beaec3
19 files changed
+1342
-1060
No files matched your search
@@ -51,9 +51,25 @@ class HSSM_Slider {
|
||||
}
|
||||
|
||||
$hide_text = isset( $slide['hide_all_text'] ) && $slide['hide_all_text'];
|
||||
$valid_buttons = array();
|
||||
if ( ! empty( $slide['buttons'] ) && is_array( $slide['buttons'] ) ) {
|
||||
$valid_buttons = array_filter(
|
||||
$slide['buttons'],
|
||||
function( $button ) {
|
||||
return ! empty( $button['text'] ) && ! empty( $button['url'] );
|
||||
}
|
||||
);
|
||||
}
|
||||
$has_text = ! $hide_text && (
|
||||
! empty( $slide['title'] ) ||
|
||||
! empty( $slide['subtitle'] ) ||
|
||||
! empty( $slide['content'] ) ||
|
||||
! empty( $valid_buttons )
|
||||
);
|
||||
?>
|
||||
<div class="hssm-slide" data-index="<?php echo esc_attr( $index ); ?>">
|
||||
<div class="hssm-slide-inner <?php echo $hide_text ? 'hssm-hide-text' : ''; ?>" style="background-image: url('<?php echo esc_url( $bg_image ); ?>');">
|
||||
<?php if ( $has_text ) : ?>
|
||||
<div class="hssm-slide-content-wrapper">
|
||||
<div class="hssm-slide-content">
|
||||
<?php if ( ! empty( $slide['title'] ) ) : ?>
|
||||
@@ -70,25 +86,18 @@ class HSSM_Slider {
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( ! empty( $slide['buttons'] ) && is_array( $slide['buttons'] ) ) : ?>
|
||||
<?php
|
||||
// Filter out empty buttons
|
||||
$valid_buttons = array_filter($slide['buttons'], function($b) {
|
||||
return !empty($b['text']) && !empty($b['url']);
|
||||
});
|
||||
?>
|
||||
<?php if ( ! empty( $valid_buttons ) ) : ?>
|
||||
<div class="hssm-button-container">
|
||||
<?php foreach ( $valid_buttons as $button ) : ?>
|
||||
<a href="<?php echo esc_url( $button['url'] ); ?>" class="hssm-button">
|
||||
<?php echo esc_html( $button['text'] ); ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( ! empty( $valid_buttons ) ) : ?>
|
||||
<div class="hssm-button-container">
|
||||
<?php foreach ( $valid_buttons as $button ) : ?>
|
||||
<a href="<?php echo esc_url( $button['url'] ); ?>" class="hssm-button">
|
||||
<?php echo esc_html( $button['text'] ); ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
Reference in new issue
Block a user