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-feature.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Template Feature
[2] Fix | Delete
*
[3] Fix | Delete
* This template can be overridden by copying it to your child_theme_folder/themify-builder/template-feature.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
$mod_name = $args['mod_name'];
[12] Fix | Delete
$element_id = $args['module_ID'];
[13] Fix | Delete
$fields_args=$args['mod_settings']+array(
[14] Fix | Delete
'mod_title_feature' => '',
[15] Fix | Delete
'title_tag' => 'h3',
[16] Fix | Delete
'title_feature' => '',
[17] Fix | Delete
'overlap_image_feature' => '',
[18] Fix | Delete
'overlap_image_width' => '',
[19] Fix | Delete
'overlap_image_height' => '',
[20] Fix | Delete
'layout_feature' => 'icon-top',
[21] Fix | Delete
'layout_mobile' => 'icon-top',
[22] Fix | Delete
'content_feature' => '',
[23] Fix | Delete
'circle_percentage_feature' => '',
[24] Fix | Delete
'circle_color_feature' => '',
[25] Fix | Delete
'circle_stroke_feature' => 0,
[26] Fix | Delete
'icon_type_feature' => 'icon',
[27] Fix | Delete
'image_feature' => '',
[28] Fix | Delete
'icon_feature' => '',
[29] Fix | Delete
'icon_color_feature' => '',
[30] Fix | Delete
'icon_bg_feature' => '',
[31] Fix | Delete
'circle_size_feature' => 'medium',
[32] Fix | Delete
'custom_circle_size_feature' => 120,
[33] Fix | Delete
'link_feature' => '',
[34] Fix | Delete
'feature_download_link' => '',
[35] Fix | Delete
'link_options' => false,
[36] Fix | Delete
'lightbox_width' => '',
[37] Fix | Delete
'lightbox_height' => '',
[38] Fix | Delete
'lightbox_width_unit' => 'px',
[39] Fix | Delete
'lightbox_height_unit' => 'px',
[40] Fix | Delete
'icon_position' => '',
[41] Fix | Delete
'stype'=>'i',
[42] Fix | Delete
'css_feature' => '',
[43] Fix | Delete
'animation_effect' => ''
[44] Fix | Delete
);
[45] Fix | Delete
if ($fields_args['layout_feature'] !== 'icon-top') {
[46] Fix | Delete
Themify_Builder_Model::load_module_self_style($mod_name, str_replace('icon-', '', $fields_args['layout_feature']));
[47] Fix | Delete
}
[48] Fix | Delete
[49] Fix | Delete
$fields_args['circle_percentage_feature'] = str_replace('%', '', $fields_args['circle_percentage_feature']); // remove % if added by user
[50] Fix | Delete
$w = (int) $fields_args['circle_stroke_feature'];
[51] Fix | Delete
$isEmpty = empty($fields_args['circle_percentage_feature']) || $w <= 0;
[52] Fix | Delete
if ($isEmpty === true) {
[53] Fix | Delete
$chart_class = 'no-chart';
[54] Fix | Delete
} else {
[55] Fix | Delete
if ($w === 1) {
[56] Fix | Delete
$w = 2;
[57] Fix | Delete
}
[58] Fix | Delete
$chart_class = 'with-chart';
[59] Fix | Delete
if ('' !== $fields_args['overlap_image_feature']) {
[60] Fix | Delete
Themify_Builder_Model::load_module_self_style($mod_name, 'overlay');
[61] Fix | Delete
$chart_class .= ' with-overlay-image';
[62] Fix | Delete
}
[63] Fix | Delete
}
[64] Fix | Delete
$link_attr = '';
[65] Fix | Delete
if (!empty($fields_args['link_options']) && '' !== $fields_args['link_feature']) {
[66] Fix | Delete
if ($fields_args['link_options'] === 'lightbox') {
[67] Fix | Delete
$link_attr = ' class="themify_lightbox"';
[68] Fix | Delete
if ($fields_args['lightbox_width'] !== '' || $fields_args['lightbox_height'] !== '') {
[69] Fix | Delete
$lightbox_settings = array();
[70] Fix | Delete
$lightbox_settings[] = $fields_args['lightbox_width'] !== '' ? $fields_args['lightbox_width'] . $fields_args['lightbox_width_unit'] : '';
[71] Fix | Delete
$lightbox_settings[] = $fields_args['lightbox_height'] !== '' ? $fields_args['lightbox_height'] . $fields_args['lightbox_height_unit'] : '';
[72] Fix | Delete
$link_attr .= sprintf(' data-zoom-config="%s"', implode('|', $lightbox_settings));
[73] Fix | Delete
$lightbox_settings = null;
[74] Fix | Delete
}
[75] Fix | Delete
} elseif ($fields_args['link_options'] === 'newtab') {
[76] Fix | Delete
$link_attr = ' target="_blank" rel="noopener"';
[77] Fix | Delete
}
[78] Fix | Delete
if ($fields_args['feature_download_link'] === 'yes') {
[79] Fix | Delete
$link_attr .= ' download';
[80] Fix | Delete
}
[81] Fix | Delete
$link_label = $fields_args['title_feature'] !== '' ? $fields_args['title_feature'] : $fields_args['mod_title_feature'];
[82] Fix | Delete
if ($link_label !== '') {
[83] Fix | Delete
$link_attr .= sprintf(' aria-label="%s"', esc_attr($link_label));
[84] Fix | Delete
}
[85] Fix | Delete
}
[86] Fix | Delete
[87] Fix | Delete
$container_class = apply_filters('themify_builder_module_classes', array(
[88] Fix | Delete
'module',
[89] Fix | Delete
'module-' . $mod_name,
[90] Fix | Delete
$element_id,
[91] Fix | Delete
$chart_class,
[92] Fix | Delete
'layout-' . $fields_args['layout_feature'],
[93] Fix | Delete
'size-' . $fields_args['circle_size_feature'],
[94] Fix | Delete
$fields_args['css_feature'],
[95] Fix | Delete
), $mod_name, $element_id, $fields_args);
[96] Fix | Delete
[97] Fix | Delete
if (!empty($fields_args['global_styles']) && Themify_Builder::$frontedit_active === false) {
[98] Fix | Delete
$container_class[] = $fields_args['global_styles'];
[99] Fix | Delete
}
[100] Fix | Delete
$container_props = apply_filters('themify_builder_module_container_props', self::parse_animation_effect($fields_args, array(
[101] Fix | Delete
'class' => implode(' ', $container_class),
[102] Fix | Delete
)), $fields_args, $mod_name, $element_id);
[103] Fix | Delete
[104] Fix | Delete
if ($fields_args['layout_mobile'] !== '') {
[105] Fix | Delete
$container_props['data-layout-mobile'] = $fields_args['layout_mobile'];
[106] Fix | Delete
$container_props['data-layout-desktop'] = $fields_args['layout_feature'];
[107] Fix | Delete
if (!in_array($fields_args['layout_mobile'], [$fields_args['layout_feature'], 'icon-top'], true)) {
[108] Fix | Delete
Themify_Builder_Model::load_module_self_style($mod_name, str_replace('icon-', '', $fields_args['layout_mobile']));
[109] Fix | Delete
}
[110] Fix | Delete
}
[111] Fix | Delete
[112] Fix | Delete
[113] Fix | Delete
if (Themify_Builder::$frontedit_active === false) {
[114] Fix | Delete
$container_props['data-lazy'] = 1;
[115] Fix | Delete
}
[116] Fix | Delete
$iconType=$fields_args['icon_type_feature'];
[117] Fix | Delete
$circleColor = !empty($fields_args['circle_color_feature']) ? esc_attr(Themify_Builder_Stylesheet::get_rgba_color($fields_args['circle_color_feature'])) : '';
[118] Fix | Delete
$icon=$iconType!=='image_icon'?($fields_args['stype']!=='l'?($fields_args['icon_feature']!==''? themify_get_icon($fields_args['icon_feature']):'') : themify_get_lottie($fields_args, 'parent')):'';
[119] Fix | Delete
[120] Fix | Delete
$insetColor =$iconType!=='image_icon' && $fields_args['icon_bg_feature'] !== ''?esc_attr(Themify_Builder_Stylesheet::get_rgba_color($fields_args['icon_bg_feature'])):'';
[121] Fix | Delete
if ($iconType!=='icon' && $fields_args['image_feature'] !== '') {
[122] Fix | Delete
$alt = Themify_Builder_Model::get_alt_by_url($fields_args['image_feature']);
[123] Fix | Delete
if (!$alt) {
[124] Fix | Delete
$alt = $fields_args['title_feature'];
[125] Fix | Delete
}
[126] Fix | Delete
}
[127] Fix | Delete
$st = '';
[128] Fix | Delete
if ($fields_args['circle_size_feature'] === 'custom' && !empty($fields_args['custom_circle_size_feature'])) {
[129] Fix | Delete
$st = 'width:' . $fields_args['custom_circle_size_feature'] . 'px;height:' . $fields_args['custom_circle_size_feature'] . 'px;';
[130] Fix | Delete
}
[131] Fix | Delete
if ($isEmpty === true && $insetColor !== '') {
[132] Fix | Delete
$st .= 'background-color:' . $insetColor;
[133] Fix | Delete
}
[134] Fix | Delete
self::sticky_element_props($container_props, $fields_args);
[135] Fix | Delete
?>
[136] Fix | Delete
<!-- module feature -->
[137] Fix | Delete
<div <?php echo themify_get_element_attributes($container_props); ?>>
[138] Fix | Delete
<?php
[139] Fix | Delete
$container_props = $container_class = $args = null;
[140] Fix | Delete
echo Themify_Builder_Component_Module::get_module_title($fields_args, 'mod_title_feature');
[141] Fix | Delete
?>
[142] Fix | Delete
<div class="module-feature-image tf_textc tf_rel">
[143] Fix | Delete
<?php
[144] Fix | Delete
if ('' !== $fields_args['overlap_image_feature']) {
[145] Fix | Delete
$param_image = array('src' => $fields_args['overlap_image_feature'], 'w' => $fields_args['overlap_image_width'], 'h=' => $fields_args['overlap_image_height']);
[146] Fix | Delete
if (Themify_Builder::$frontedit_active === true) {
[147] Fix | Delete
$param_image['attr'] = array('data-w' => 'overlap_image_width', 'data-h' => 'overlap_image_height', 'data-name' => 'overlap_image_feature');
[148] Fix | Delete
}
[149] Fix | Delete
echo themify_get_image($param_image);
[150] Fix | Delete
unset($param_image);
[151] Fix | Delete
}
[152] Fix | Delete
?>
[153] Fix | Delete
<?php if ('' !== $fields_args['link_feature']) : ?>
[154] Fix | Delete
<a href="<?php echo esc_url($fields_args['link_feature']); ?>"<?php echo $link_attr; ?>>
[155] Fix | Delete
<?php endif; ?>
[156] Fix | Delete
<span class="module-feature-chart-html5 tf_box tf_rel tf_inline_b"<?php if ($st !== ''): ?> style="<?php echo $st ?>"<?php endif; ?>>
[157] Fix | Delete
<?php if ($isEmpty === false): ?>
[158] Fix | Delete
<svg class="tf_abs tf_w tf_h">
[159] Fix | Delete
<circle class="tb_feature_fill" r="calc(50% - <?php echo number_format($w / 2, 2); ?>px)" cx="50%" cy="50%" stroke-width="<?php echo $w ?>"/>
[160] Fix | Delete
<circle class="tb_feature_stroke" r="calc(50% - <?php echo number_format($w / 2, 2); ?>px)" cx="50%" cy="50%" stroke="<?php echo $circleColor ?>" stroke-width="<?php echo $w ?>" data-progress="<?php echo (int) $fields_args['circle_percentage_feature'] ?>" stroke-dasharray="0,10000"/>
[161] Fix | Delete
<?php if ($insetColor !== '' && $iconType!=='image_icon'): ?>
[162] Fix | Delete
<circle class="tb_feature_bg" r="calc(50% - <?php echo ($w > 1 ? ($w - 1) : 0) ?>px)" cx="50%" cy="50%" stroke-width="<?php echo $w ?>" fill="<?php echo $insetColor ?>" />
[163] Fix | Delete
<?php endif; ?>
[164] Fix | Delete
</svg>
[165] Fix | Delete
<?php endif; ?>
[166] Fix | Delete
<span class="chart-html5-circle tf_w tf_h">
[167] Fix | Delete
<?php if ('' !== $icon && $iconType==='icon') : ?>
[168] Fix | Delete
<em class="module-feature-icon tf_rel"<?php echo $fields_args['icon_color_feature'] !== '' ? ' style="color:' . esc_attr(Themify_Builder_Stylesheet::get_rgba_color($fields_args['icon_color_feature'])) . '"' : ''; ?>><?php echo $icon; ?></em>
[169] Fix | Delete
<?php elseif ($fields_args['image_feature'] !== '') :
[170] Fix | Delete
$size = $fields_args['circle_size_feature'] === 'small' ? 100 : ( $fields_args['circle_size_feature'] === 'medium' ? 150 : ( $fields_args['circle_size_feature'] === 'large' ? 200 : ( $fields_args['circle_size_feature'] === 'custom' && !empty($fields_args['custom_circle_size_feature']) ? $fields_args['custom_circle_size_feature'] : 100) ) );
[171] Fix | Delete
echo themify_get_image([
[172] Fix | Delete
'attr' => ['style' => 'width:calc(100% - ' . $w * 2 . 'px);height:calc(100% - ' . $w * 2 . 'px)'],
[173] Fix | Delete
'src' => $fields_args['image_feature'],
[174] Fix | Delete
'alt' => $alt,
[175] Fix | Delete
'w' => $size,
[176] Fix | Delete
'h' => $size
[177] Fix | Delete
]);
[178] Fix | Delete
?>
[179] Fix | Delete
<?php endif; ?>
[180] Fix | Delete
</span>
[181] Fix | Delete
[182] Fix | Delete
<?php if ( $iconType==='both') : ?>
[183] Fix | Delete
<span class="module-feature-icon-wrap tf_abs"<?php if ($fields_args['icon_position'] !== '') : ?> style="transform:rotate(<?php echo $fields_args['icon_position'] ?>deg)"<?php endif; ?>>
[184] Fix | Delete
<span class="module-feature-icon tf_inline_b" style="<?php if ($fields_args['icon_position'] !== '') : ?>transform:translateY(-50%) rotate(-<?php echo $fields_args['icon_position'] ?>deg); <?php endif; ?>
[185] Fix | Delete
<?php if ($fields_args['icon_color_feature'] !== '' && $fields_args['stype']!=='l') : ?>color:<?php echo Themify_Builder_Stylesheet::get_rgba_color($fields_args['icon_color_feature']); ?>;<?php endif; ?>
[186] Fix | Delete
<?php if ($insetColor !== '') : ?>background-color:<?php echo $insetColor; ?><?php endif; ?>
[187] Fix | Delete
"><?php echo $icon; ?></span>
[188] Fix | Delete
</span>
[189] Fix | Delete
<?php endif; ?>
[190] Fix | Delete
[191] Fix | Delete
</span>
[192] Fix | Delete
<?php if ('' !== $fields_args['link_feature']) : ?>
[193] Fix | Delete
</a>
[194] Fix | Delete
<?php endif; ?>
[195] Fix | Delete
</div>
[196] Fix | Delete
<div class="module-feature-content tf_textc">
[197] Fix | Delete
<?php
[198] Fix | Delete
if ('' !== $fields_args['title_feature']) {
[199] Fix | Delete
$fields_args['title_tag'] = esc_attr( $fields_args['title_tag'] );
[200] Fix | Delete
?>
[201] Fix | Delete
<<?php echo $fields_args['title_tag']; ?> class="module-feature-title">
[202] Fix | Delete
<?php if ('' !== $fields_args['link_feature']): ?>
[203] Fix | Delete
<a href="<?php echo esc_url($fields_args['link_feature']) ?>"<?php echo $link_attr ?>><?php echo $fields_args['title_feature'] ?></a>
[204] Fix | Delete
<?php else: ?>
[205] Fix | Delete
<?php echo $fields_args['title_feature'] ?>
[206] Fix | Delete
<?php endif; ?>
[207] Fix | Delete
</<?php echo $fields_args['title_tag']; ?>>
[208] Fix | Delete
<?php
[209] Fix | Delete
}
[210] Fix | Delete
?>
[211] Fix | Delete
<div class="tb_text_wrap">
[212] Fix | Delete
<?php echo $fields_args['content_feature'] !== '' ? apply_filters('themify_builder_module_content', $fields_args['content_feature']) : ''; ?>
[213] Fix | Delete
</div>
[214] Fix | Delete
</div>
[215] Fix | Delete
</div>
[216] Fix | Delete
<!-- /module feature -->
[217] Fix | Delete
[218] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function