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-grid.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Template Gallery Grid
[2] Fix | Delete
*
[3] Fix | Delete
* This template can be overridden by copying it to your child_theme_folder/themify-builder/template-gallery-grid.php.
[4] Fix | Delete
*
[5] Fix | Delete
* Access original fields: $args['mod_settings']
[6] Fix | Delete
* @author Themify
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
defined( 'ABSPATH' ) || exit;
[10] Fix | Delete
[11] Fix | Delete
Themify_Builder_Model::load_module_self_style($args['mod_name'],'grid');
[12] Fix | Delete
$settings=$args['settings'];
[13] Fix | Delete
$pagination = $settings['gallery_pagination'] && $settings['gallery_per_page'] > 0;
[14] Fix | Delete
[15] Fix | Delete
if ($pagination===true) {
[16] Fix | Delete
$total = count($settings['gallery_images']);
[17] Fix | Delete
if ($total <= $settings['gallery_per_page']) {
[18] Fix | Delete
$pagination = false;
[19] Fix | Delete
} else {
[20] Fix | Delete
$current = isset($_GET['builder_gallery']) ? $_GET['builder_gallery'] : 1;
[21] Fix | Delete
$offset = $settings['gallery_per_page'] * ( $current - 1 );
[22] Fix | Delete
$settings['gallery_images'] = array_slice($settings['gallery_images'], $offset, $settings['gallery_per_page'], true);
[23] Fix | Delete
}
[24] Fix | Delete
}
[25] Fix | Delete
$image_attr=array('w'=>$settings['thumb_w_gallery'],'h'=>$settings['thumb_h_gallery'],'image_size'=>$settings['image_size_gallery']);
[26] Fix | Delete
$showTitle=$settings['gallery_image_title'] === 'yes';
[27] Fix | Delete
$showCaption=$settings['gallery_exclude_caption'] !== 'yes';
[28] Fix | Delete
$tableCols=!empty($settings['t_columns'])?$settings['t_columns']:$settings['gallery_columns'];
[29] Fix | Delete
$stCols='--gald:'.$settings['gallery_columns'].';--galt:'.$tableCols.';--galm:';
[30] Fix | Delete
$stCols.=!empty($settings['m_columns'])?$settings['m_columns']:$tableCols;
[31] Fix | Delete
[32] Fix | Delete
?>
[33] Fix | Delete
<div class="module-gallery-grid<?php if($settings['layout_masonry'] === 'masonry'):?> gallery-masonry<?php endif;?>" style="<?php echo $stCols?>"<?php if($pagination===true):?> data-id="<?php echo $args['module_ID']?>"<?php endif;?>>
[34] Fix | Delete
<?php foreach ($settings['gallery_images'] as $image) :
[35] Fix | Delete
$caption = !empty($image->post_excerpt) ? $image->post_excerpt : '';
[36] Fix | Delete
$title = $image->post_title;
[37] Fix | Delete
?>
[38] Fix | Delete
<dl class="gallery-item">
[39] Fix | Delete
<dt class="gallery-icon">
[40] Fix | Delete
<?php
[41] Fix | Delete
if ($settings['link_opt'] === 'file') {
[42] Fix | Delete
$link = wp_get_attachment_image_src($image->ID, $settings['link_image_size'])[0];
[43] Fix | Delete
}
[44] Fix | Delete
elseif ('none' === $settings['link_opt']) {
[45] Fix | Delete
$link = '';
[46] Fix | Delete
}
[47] Fix | Delete
else {
[48] Fix | Delete
$link = get_attachment_link($image->ID);
[49] Fix | Delete
}
[50] Fix | Delete
$link_before = '' !== $link ? sprintf(
[51] Fix | Delete
'<a data-title="%s" title="%s" href="%s" data-rel="%s"%s>',
[52] Fix | Delete
esc_attr( $settings['lightbox_title'] ),
[53] Fix | Delete
esc_attr( $caption ),
[54] Fix | Delete
esc_url( $link ),
[55] Fix | Delete
$args['module_ID'],
[56] Fix | Delete
( $settings['lightbox']===true ? ' class="themify_lightbox"' : '' )
[57] Fix | Delete
) : '';
[58] Fix | Delete
$link_before = apply_filters('themify_builder_image_link_before', $link_before, $image, $settings);
[59] Fix | Delete
$link_after = '' !== $link ? '</a>' : '';
[60] Fix | Delete
$image_attr['src']=$image->ID;
[61] Fix | Delete
$img = themify_get_image($image_attr);
[62] Fix | Delete
[63] Fix | Delete
if(!empty($img) ){
[64] Fix | Delete
echo $link_before, $img , $link_after;
[65] Fix | Delete
}
[66] Fix | Delete
?>
[67] Fix | Delete
</dt>
[68] Fix | Delete
<?php if (($showTitle===true && $title!=='' ) || ( $showCaption===true && $caption!=='' )) : ?>
[69] Fix | Delete
<dd class="wp-caption-text gallery-caption">
[70] Fix | Delete
<?php if ($showTitle===true && $title!=='') : ?>
[71] Fix | Delete
<strong class="themify_image_title tf_block"><?php echo $title ?></strong>
[72] Fix | Delete
<?php endif; ?>
[73] Fix | Delete
<?php if ($showCaption===true && $caption!=='') : ?>
[74] Fix | Delete
<span class="themify_image_caption"><?php echo $caption ?></span>
[75] Fix | Delete
<?php endif; ?>
[76] Fix | Delete
</dd>
[77] Fix | Delete
<?php endif; ?>
[78] Fix | Delete
</dl>
[79] Fix | Delete
<?php endforeach; // end loop ?>
[80] Fix | Delete
</div>
[81] Fix | Delete
<?php
[82] Fix | Delete
if ($pagination===true) :
[83] Fix | Delete
echo self::get_pagination('','','builder_gallery',0,ceil($total / $settings['gallery_per_page']),$current);
[84] Fix | Delete
endif;
[85] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function