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/clone/wp-conte.../plugins/themify-.../template...
File: template-featured-image.php
<?php
[0] Fix | Delete
if (!defined('ABSPATH'))
[1] Fix | Delete
exit; // Exit if accessed directly
[2] Fix | Delete
/**
[3] Fix | Delete
* Template Featured Image
[4] Fix | Delete
*
[5] Fix | Delete
* Access original fields: $args['mod_settings']
[6] Fix | Delete
* @author Themify
[7] Fix | Delete
*/
[8] Fix | Delete
$fields_default = array(
[9] Fix | Delete
'image_w' => '',
[10] Fix | Delete
'image_h' => '',
[11] Fix | Delete
'auto_fullwidth' => false,
[12] Fix | Delete
'appearance_image' => '',
[13] Fix | Delete
'link' => 'permalink',
[14] Fix | Delete
'custom_link' => '',
[15] Fix | Delete
'open_link' => 'regular',
[16] Fix | Delete
'lightbox' => '',
[17] Fix | Delete
'lightbox_w' => '',
[18] Fix | Delete
'lightbox_h' => '',
[19] Fix | Delete
'lightbox_w_unit' => '%',
[20] Fix | Delete
'lightbox_h_unit' => '%',
[21] Fix | Delete
'fallback_s' => 'no',
[22] Fix | Delete
'fallback_i' => '',
[23] Fix | Delete
'caption' => '',
[24] Fix | Delete
'caption_layout' => 'image_top',
[25] Fix | Delete
'caption_on_overlay' => '',
[26] Fix | Delete
'css' => '',
[27] Fix | Delete
'animation_effect' => ''
[28] Fix | Delete
);
[29] Fix | Delete
if (isset($args['mod_settings']['appearance_image'])) {
[30] Fix | Delete
$args['mod_settings']['appearance_image'] = self::get_checkbox_data($args['mod_settings']['appearance_image']);
[31] Fix | Delete
}
[32] Fix | Delete
$fields_args = wp_parse_args($args['mod_settings'], $fields_default);
[33] Fix | Delete
$fields_default=null;
[34] Fix | Delete
unset($args['mod_settings']);
[35] Fix | Delete
$mod_name=$args['mod_name'];
[36] Fix | Delete
$element_id =$args['module_ID'];
[37] Fix | Delete
$builder_id=$args['builder_id'];
[38] Fix | Delete
$container_class = apply_filters('themify_builder_module_classes', array(
[39] Fix | Delete
'module',
[40] Fix | Delete
'module-image',
[41] Fix | Delete
'module-' .$mod_name,
[42] Fix | Delete
$element_id,
[43] Fix | Delete
$fields_args['css'],
[44] Fix | Delete
$fields_args['appearance_image']
[45] Fix | Delete
), $mod_name, $element_id, $fields_args );
[46] Fix | Delete
if($fields_args['caption']==='yes'){
[47] Fix | Delete
Themify_Builder_Model::load_module_self_style('image',str_replace('image-','',$fields_args['caption_layout']));
[48] Fix | Delete
$container_class[]= 'module-image';
[49] Fix | Delete
$container_class[]= $fields_args['caption_layout'];
[50] Fix | Delete
}
[51] Fix | Delete
if ( 'yes' === $fields_args['caption_on_overlay']){
[52] Fix | Delete
$container_class[]= 'active-caption-hover';
[53] Fix | Delete
}
[54] Fix | Delete
if ($fields_args['auto_fullwidth']=='1') {
[55] Fix | Delete
$container_class[]=' auto_fullwidth';
[56] Fix | Delete
}
[57] Fix | Delete
if(!empty($fields_args['global_styles']) && Themify_Builder::$frontedit_active===false){
[58] Fix | Delete
$container_class[] = $fields_args['global_styles'];
[59] Fix | Delete
}
[60] Fix | Delete
$container_props = apply_filters('themify_builder_module_container_props', self::parse_animation_effect($fields_args,array(
[61] Fix | Delete
'class' => implode(' ', $container_class),
[62] Fix | Delete
)), $fields_args, $mod_name, $element_id);
[63] Fix | Delete
$args=null;
[64] Fix | Delete
if(Themify_Builder::$frontedit_active===false){
[65] Fix | Delete
$container_props['data-lazy']=1;
[66] Fix | Delete
}
[67] Fix | Delete
?>
[68] Fix | Delete
<!-- Featured Image module -->
[69] Fix | Delete
<div <?php echo self::get_element_attributes(self::sticky_element_props($container_props,$fields_args)); ?>>
[70] Fix | Delete
<div class="image-wrap tf_rel" itemprop="image">
[71] Fix | Delete
<?php
[72] Fix | Delete
$container_props=$container_class=null;
[73] Fix | Delete
do_action('themify_builder_background_styling',$builder_id,array('styling'=>$fields_args,'mod_name'=>$mod_name),$element_id,'module');
[74] Fix | Delete
$the_query = Tbp_Utils::get_actual_query();
[75] Fix | Delete
$hasFallback='yes' === $fields_args['fallback_s'] && '' !== $fields_args['fallback_i'];
[76] Fix | Delete
if ($the_query===null || $the_query->have_posts() || $hasFallback===true) {
[77] Fix | Delete
if($the_query!==null){
[78] Fix | Delete
$the_query->the_post();
[79] Fix | Delete
}
[80] Fix | Delete
$hasImage = has_post_thumbnail();
[81] Fix | Delete
if($hasImage===true || $hasFallback===true){
[82] Fix | Delete
$hasLink=$fields_args['link']!=='none';
[83] Fix | Delete
$post_title = esc_attr(get_the_title());
[84] Fix | Delete
$img='';
[85] Fix | Delete
$att_id=get_post_thumbnail_id();
[86] Fix | Delete
$param_image=array(
[87] Fix | Delete
'w'=>$fields_args['image_w'],
[88] Fix | Delete
'h'=>$fields_args['image_h'],
[89] Fix | Delete
'src'=>$att_id,
[90] Fix | Delete
'alt'=>$post_title
[91] Fix | Delete
);
[92] Fix | Delete
if($hasLink===true){
[93] Fix | Delete
$link_attr=Tbp_Utils::getLinkParams($fields_args,($hasImage===false && $hasFallback===true && 'media' === $fields_args['link']?esc_url($fields_args['fallback_i']):''));
[94] Fix | Delete
$hasLink=isset($link_attr['href']);
[95] Fix | Delete
}
[96] Fix | Delete
?>
[97] Fix | Delete
<?php if ($hasLink===true):?>
[98] Fix | Delete
<a <?php echo self::get_element_attributes($link_attr); ?>>
[99] Fix | Delete
<?php endif;?>
[100] Fix | Delete
[101] Fix | Delete
<?php
[102] Fix | Delete
if($hasImage===true) {
[103] Fix | Delete
if('yes' === $fields_args['caption']){
[104] Fix | Delete
$image_caption = wp_get_attachment_caption($att_id);
[105] Fix | Delete
}
[106] Fix | Delete
if(Themify_Builder_Model::is_img_php_disabled()) {
[107] Fix | Delete
$attachment_id=$param_image['src'];
[108] Fix | Delete
$img=!empty($attachment_id) ? wp_get_attachment_image($attachment_id, array(
[109] Fix | Delete
$fields_args['image_w'],
[110] Fix | Delete
$fields_args['image_h']
[111] Fix | Delete
), false, array('alt'=>$post_title)) : apply_filters('themify_image_make_responsive_image', '<img itemprop="imageObject" src="' . esc_url(get_the_post_thumbnail_url()) . '" alt="' . $post_title . '" width="' . $fields_args['image_w'] . '" height="' . $fields_args['image_h'] . '" />');
[112] Fix | Delete
} else {
[113] Fix | Delete
$img=themify_get_image($param_image);
[114] Fix | Delete
}
[115] Fix | Delete
}elseif($hasFallback===true){
[116] Fix | Delete
if('yes' === $fields_args['caption']){
[117] Fix | Delete
$image_caption = wp_get_attachment_caption(attachment_url_to_postid($fields_args['fallback_i']));
[118] Fix | Delete
}
[119] Fix | Delete
$param_image['src']=$fields_args['fallback_i'];
[120] Fix | Delete
$img=themify_get_image($param_image);
[121] Fix | Delete
}
[122] Fix | Delete
?>
[123] Fix | Delete
<?php if($img!==''):?>
[124] Fix | Delete
<?php echo $img?>
[125] Fix | Delete
<?php elseif(Themify_Builder::$frontedit_active===true):?>
[126] Fix | Delete
<img itemprop="imageObject" alt="<?php echo $post_title?>" src="<?php echo THEMIFY_BUILDER_URI?>/img/image-placeholder.jpg">
[127] Fix | Delete
<?php endif;?>
[128] Fix | Delete
[129] Fix | Delete
<?php if ($hasLink===true):?>
[130] Fix | Delete
</a>
[131] Fix | Delete
<?php endif;?>
[132] Fix | Delete
[133] Fix | Delete
<?php
[134] Fix | Delete
}
[135] Fix | Delete
if($the_query!==null){
[136] Fix | Delete
wp_reset_postdata();
[137] Fix | Delete
}
[138] Fix | Delete
}
[139] Fix | Delete
?>
[140] Fix | Delete
<?php if (empty($image_caption) || (!empty($image_caption) && 'image-overlay' !== $fields_args['caption_layout'])): ?>
[141] Fix | Delete
</div>
[142] Fix | Delete
<!-- /image-wrap -->
[143] Fix | Delete
<?php endif; ?>
[144] Fix | Delete
<?php if (!empty($image_caption)): ?>
[145] Fix | Delete
<div class="image-content<?php echo $fields_args['caption_layout']==='image-full-overlay'?' tf_overflow':'';?>">
[146] Fix | Delete
<div class="image-caption tb_text_wrap"<?php if(Themify_Builder::$frontedit_active===true):?> contenteditable="false" data-name="caption_image"<?php endif; ?>>
[147] Fix | Delete
<?php echo apply_filters('themify_builder_module_content', $image_caption); ?>
[148] Fix | Delete
</div>
[149] Fix | Delete
<!-- /image-caption -->
[150] Fix | Delete
</div>
[151] Fix | Delete
<!-- /image-content -->
[152] Fix | Delete
<?php endif; ?>
[153] Fix | Delete
<?php if (!empty($image_caption) && 'image-overlay' === $fields_args['caption_layout']): ?>
[154] Fix | Delete
</div>
[155] Fix | Delete
<!-- /image-wrap -->
[156] Fix | Delete
<?php endif; ?>
[157] Fix | Delete
</div>
[158] Fix | Delete
<!-- /Featured Image module -->
[159] Fix | Delete
[160] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function