Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/themify-.../template...
File: template-gallery-slider.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Template Gallery Slider
[2] Fix | Delete
*
[3] Fix | Delete
* This template can be overridden by copying it to your child_theme_folder/themify-builder/template-gallery-slider.php.
[4] Fix | Delete
*
[5] Fix | Delete
* Access original fields: $args['settings']
[6] Fix | Delete
* @author Themify
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
defined('ABSPATH') || exit;
[10] Fix | Delete
[11] Fix | Delete
$settings = $args['settings'];
[12] Fix | Delete
$margins = '';
[13] Fix | Delete
$element_id = $args['module_ID'] . '_thumbs';
[14] Fix | Delete
if ($settings['left_margin_slider'] !== '') {
[15] Fix | Delete
$margins .= 'margin-left:' . $settings['left_margin_slider'] . 'px;';
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
if ($settings['right_margin_slider'] !== '') {
[19] Fix | Delete
$margins .= 'margin-right:' . $settings['right_margin_slider'] . 'px';
[20] Fix | Delete
}
[21] Fix | Delete
$image_attr = array(
[22] Fix | Delete
'is_slider'=>true,
[23] Fix | Delete
'image_size' => $settings['s_image_size_gallery']
[24] Fix | Delete
);
[25] Fix | Delete
$arr=['slider'];
[26] Fix | Delete
$thumbLimit=$slideLimit=$settings['visible_opt_slider'];
[27] Fix | Delete
$showThumbs=$settings['slider_thumbs']!=='yes';
[28] Fix | Delete
$showTitle=$settings['gallery_image_title'] === 'yes';
[29] Fix | Delete
$showCaption=$settings['gallery_exclude_caption'] !== 'yes';
[30] Fix | Delete
if($showThumbs===true){
[31] Fix | Delete
$arr[]='thumbs';
[32] Fix | Delete
$slideLimit=1;
[33] Fix | Delete
}
[34] Fix | Delete
foreach ($arr as $mode) :
[35] Fix | Delete
$is_slider = $mode === 'slider';
[36] Fix | Delete
//$image_attr['is_slider'] = true;
[37] Fix | Delete
$image_attr['w'] = $is_slider === false ? $settings['thumb_w_gallery'] : $settings['s_image_w_gallery'];
[38] Fix | Delete
$image_attr['h'] = $is_slider === false ? $settings['thumb_h_gallery'] : $settings['s_image_h_gallery'];
[39] Fix | Delete
$hasNav = $mode === ( ($is_slider === true && $showThumbs===false) || $settings['show_arrow_buttons_vertical'] ? 'slider' : 'thumbs' ) ? ($settings['show_arrow_slider'] === 'yes' ? 1 : 0) : 0;
[40] Fix | Delete
?>
[41] Fix | Delete
<?php if ($hasNav === 1): ?>
[42] Fix | Delete
<div class="themify_builder_slider_vertical tf_rel">
[43] Fix | Delete
<?php endif; ?>
[44] Fix | Delete
<div class="tf_swiper-container tf_carousel themify_builder_slider<?php if ($is_slider === false): ?> <?php echo $element_id ?> tf_swiper-thumbs<?php endif; ?> tf_rel tf_overflow"
[45] Fix | Delete
<?php if (Themify_Builder::$frontedit_active === false): ?> data-lazy="1"<?php endif; ?>
[46] Fix | Delete
data-pager="<?php echo ($is_slider === false ||$showThumbs===false) && $settings['show_nav_slider'] === 'yes' ? 1 : 0 ?>"
[47] Fix | Delete
data-speed="<?php echo $settings['speed_opt_slider']; ?>"
[48] Fix | Delete
data-slider_nav="<?php echo $hasNav ?>"
[49] Fix | Delete
data-wrapvar="<?php echo $settings['wrap_slider'] === 'yes' ? 1 : 0 ?>"
[50] Fix | Delete
data-height="<?php echo isset($settings['horizontal']) && $settings['horizontal'] === 'yes' ? 'variable' : $settings['height_slider'] ?>"
[51] Fix | Delete
<?php if($is_slider===true ):?>
[52] Fix | Delete
data-effect="<?php echo $settings['effect_slider'] ?>"
[53] Fix | Delete
data-css_url="<?php echo THEMIFY_BUILDER_CSS_MODULES ?>sliders/carousel,<?php echo THEMIFY_BUILDER_CSS_MODULES ?>sliders/<?php echo $args['mod_name'] ?>"
[54] Fix | Delete
<?php if ($settings['auto_scroll_opt_slider'] !== 'off'): ?>
[55] Fix | Delete
data-auto="<?php echo $settings['auto_scroll_opt_slider'] ?>"
[56] Fix | Delete
data-pause_hover="<?php echo $settings['pause_on_hover_slider'] === 'resume' ? 1 : 0 ?>"
[57] Fix | Delete
<?php if($settings['play_pause_control'] === 'yes'):?>
[58] Fix | Delete
data-controller="1"
[59] Fix | Delete
<?php endif;?>
[60] Fix | Delete
<?php endif; ?>
[61] Fix | Delete
<?php endif;?>
[62] Fix | Delete
<?php if($showThumbs===true):?>
[63] Fix | Delete
<?php if($is_slider===true): ?>
[64] Fix | Delete
data-thumbs="<?php echo $element_id ?>"
[65] Fix | Delete
<?php else:?>
[66] Fix | Delete
data-thumbs-id="<?php echo $element_id ?>"
[67] Fix | Delete
<?php endif ?>
[68] Fix | Delete
<?php endif;?>
[69] Fix | Delete
<?php if($is_slider === false ||$showThumbs===false):?>
[70] Fix | Delete
data-visible="<?php echo $thumbLimit ?>"
[71] Fix | Delete
data-tab-visible="<?php echo $settings['tab_visible_opt_slider'] ?>"
[72] Fix | Delete
data-mob-visible="<?php echo $settings['mob_visible_opt_slider'] ?>"
[73] Fix | Delete
data-scroll="<?php echo $settings['scroll_opt_slider']; ?>"
[74] Fix | Delete
<?php if (!empty($settings['touch_swipe'])) : ?>data-touch_swipe="<?php echo $settings['touch_swipe']; ?>" <?php endif; ?>
[75] Fix | Delete
<?php endif;?>
[76] Fix | Delete
>
[77] Fix | Delete
<div class="tf_swiper-wrapper tf_lazy tf_rel tf_w tf_h tf_textc">
[78] Fix | Delete
<?php $limit=$is_slider===true?$slideLimit:$thumbLimit?>
[79] Fix | Delete
<?php foreach ($settings['gallery_images'] as $i=>$image) : ?>
[80] Fix | Delete
<div class="tf_swiper-slide" style="<?php if($i>=$limit):?>display:none<?php endif;?>">
[81] Fix | Delete
<div class="slide-inner-wrap"<?php $margins !== '' && printf(' style="%s"', $margins) ?>>
[82] Fix | Delete
<div class="tf_lazy slide-image gallery-icon">
[83] Fix | Delete
<?php
[84] Fix | Delete
$image_attr['alt'] = get_post_meta($image->ID, '_wp_attachment_image_alt', true);
[85] Fix | Delete
$image_attr['src'] = wp_get_attachment_image_url($image->ID, 'full');
[86] Fix | Delete
$image_html = themify_get_image($image_attr);
[87] Fix | Delete
[88] Fix | Delete
$lightbox = '';
[89] Fix | Delete
$link = null;
[90] Fix | Delete
if ($is_slider === true) {
[91] Fix | Delete
if ($settings['link_opt'] === 'file') {
[92] Fix | Delete
$link = wp_get_attachment_image_src($image->ID, $settings['link_image_size']);
[93] Fix | Delete
if(!empty($link)){
[94] Fix | Delete
$link = $link[0];
[95] Fix | Delete
}
[96] Fix | Delete
if ($settings['lightbox'] === true) {
[97] Fix | Delete
$lightbox = ' class="themify_lightbox"';
[98] Fix | Delete
}
[99] Fix | Delete
}
[100] Fix | Delete
elseif ('none' !== $settings['link_opt']) {
[101] Fix | Delete
$link = get_attachment_link($image->ID);
[102] Fix | Delete
}
[103] Fix | Delete
}
[104] Fix | Delete
if ($is_slider === true && !empty($link)) {
[105] Fix | Delete
printf('<a href="%s"%s>%s</a>', esc_url($link), $lightbox, $image_html);
[106] Fix | Delete
} else {
[107] Fix | Delete
echo $image_html;
[108] Fix | Delete
}
[109] Fix | Delete
?>
[110] Fix | Delete
</div>
[111] Fix | Delete
<?php if ($is_slider === true && (( $showTitle===true && $image->post_title) || ($showCaption===true && $image->post_excerpt ))) : ?>
[112] Fix | Delete
<div class="slide-content tf_opacity tf_texl tf_abs">
[113] Fix | Delete
<?php if ($showTitle===true && !empty($image->post_title)): ?>
[114] Fix | Delete
<h3 class="slide-title"><?php echo wp_kses_post($image->post_title) ?></h3>
[115] Fix | Delete
<?php endif; ?>
[116] Fix | Delete
[117] Fix | Delete
<?php if ($showCaption===true && !empty($image->post_excerpt)) : ?>
[118] Fix | Delete
<p><?php echo apply_filters('themify_builder_module_content', $image->post_excerpt) ?></p>
[119] Fix | Delete
<?php endif; ?>
[120] Fix | Delete
</div>
[121] Fix | Delete
<?php endif; ?>
[122] Fix | Delete
</div></div>
[123] Fix | Delete
<?php endforeach; ?>
[124] Fix | Delete
</div>
[125] Fix | Delete
</div>
[126] Fix | Delete
<?php if ($hasNav === 1): ?>
[127] Fix | Delete
</div>
[128] Fix | Delete
<?php endif; ?>
[129] Fix | Delete
<?php endforeach; ?>
[130] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function