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.../public_h.../wp-conte.../plugins/themify-.../includes/componen...
File: subrow.php
<?php
[0] Fix | Delete
defined('ABSPATH') || exit;
[1] Fix | Delete
[2] Fix | Delete
class Themify_Builder_Component_Subrow{
[3] Fix | Delete
[4] Fix | Delete
/**
[5] Fix | Delete
* Get template Sub-Row.
[6] Fix | Delete
*
[7] Fix | Delete
* @param array $mod
[8] Fix | Delete
* @param string $builder_id
[9] Fix | Delete
* @param boolean $echo
[10] Fix | Delete
*/
[11] Fix | Delete
public static function template(array &$mod, $builder_id,bool $echo = true) {
[12] Fix | Delete
$mod = apply_filters('tf_builder_subrow', $mod, $builder_id);
[13] Fix | Delete
$print_sub_row_classes = array('module_subrow themify_builder_sub_row tf_w');
[14] Fix | Delete
$subrow_tag_attrs = array();
[15] Fix | Delete
$count = 0;
[16] Fix | Delete
$video_data = '';
[17] Fix | Delete
$is_styling = !empty($mod['styling']);
[18] Fix | Delete
if ($is_styling === true) {
[19] Fix | Delete
if (!empty($mod['styling']['custom_css_subrow'])) {
[20] Fix | Delete
$print_sub_row_classes[] = $mod['styling']['custom_css_subrow'];
[21] Fix | Delete
}
[22] Fix | Delete
if (isset($mod['styling']['background_type'], $mod['styling']['background_zoom']) && $mod['styling']['background_type'] === 'image' && $mod['styling']['background_zoom'] === 'zoom' && $mod['styling']['background_repeat'] === 'repeat-none') {
[23] Fix | Delete
$print_sub_row_classes[] = 'themify-bg-zoom';
[24] Fix | Delete
}
[25] Fix | Delete
// background video
[26] Fix | Delete
$video_data = Themify_Builder_Component_Row::get_video_background($mod['styling']);
[27] Fix | Delete
if ($video_data) {
[28] Fix | Delete
$video_data = ' ' . $video_data;
[29] Fix | Delete
} else {
[30] Fix | Delete
Themify_Builder_Component_Row::set_bg_mode($subrow_tag_attrs, $mod['styling']);
[31] Fix | Delete
}
[32] Fix | Delete
if (!empty($mod['styling']['global_styles'])) {
[33] Fix | Delete
Themify_Global_Styles::add_class_to_components($print_sub_row_classes, $mod['styling'], $builder_id);
[34] Fix | Delete
}
[35] Fix | Delete
} else {
[36] Fix | Delete
$mod['styling'] = array();
[37] Fix | Delete
}
[38] Fix | Delete
if (Themify_Builder::$frontedit_active === false) {
[39] Fix | Delete
$count = !empty($mod['cols']) ? count($mod['cols']) : 0;
[40] Fix | Delete
if($count > 0 ){
[41] Fix | Delete
$print_sub_row_classes=array_merge($print_sub_row_classes,Themify_Builder_Component_Row::get_responsive_cols($mod));
[42] Fix | Delete
}
[43] Fix | Delete
$print_sub_row_classes[] = 'tb_' . $mod['element_id'];
[44] Fix | Delete
if ($is_styling === true) {
[45] Fix | Delete
Themify_Builder_Component_Module::sticky_element_props($subrow_tag_attrs, $mod['styling']);
[46] Fix | Delete
}
[47] Fix | Delete
$subrow_tag_attrs['data-lazy'] = 1;
[48] Fix | Delete
}
[49] Fix | Delete
$print_sub_row_classes = apply_filters('themify_builder_subrow_classes', $print_sub_row_classes, $mod, $builder_id);
[50] Fix | Delete
$subrow_tag_attrs['class'] = implode(' ', $print_sub_row_classes);
[51] Fix | Delete
$print_sub_row_classes = null;
[52] Fix | Delete
if ($is_styling === true) {
[53] Fix | Delete
Themify_Builder_Component_Row::clickable_component($subrow_tag_attrs,$mod['styling']);
[54] Fix | Delete
}
[55] Fix | Delete
$subrow_tag_attrs = apply_filters('themify_builder_subrow_attributes', Themify_Builder_Component_Module::parse_animation_effect($mod['styling'], $subrow_tag_attrs), $mod['styling'], $builder_id);
[56] Fix | Delete
[57] Fix | Delete
if ($echo === false) {
[58] Fix | Delete
$output = PHP_EOL; // add line break
[59] Fix | Delete
ob_start();
[60] Fix | Delete
}
[61] Fix | Delete
// Start Sub-Row Render ######
[62] Fix | Delete
?>
[63] Fix | Delete
<div <?php echo themify_get_element_attributes($subrow_tag_attrs), $video_data; ?>>
[64] Fix | Delete
<?php
[65] Fix | Delete
$subrow_tag_attrs = $video_data = null;
[66] Fix | Delete
if ($is_styling === true) {
[67] Fix | Delete
Themify_Builder_Component_Row::background_styling($mod, 'subrow', $builder_id);
[68] Fix | Delete
}
[69] Fix | Delete
if ($count > 0) {
[70] Fix | Delete
if (isset($mod['desktop_dir']) && $mod['desktop_dir'] === 'rtl') {//backward compatibility
[71] Fix | Delete
$mod['cols'] = array_reverse($mod['cols']);
[72] Fix | Delete
}
[73] Fix | Delete
foreach ($mod['cols'] as $i => &$sub_col) {
[74] Fix | Delete
$cl = $i === 0 ? 'first' : ($i === ($count - 1) ? 'last' : null); //backward compatibility
[75] Fix | Delete
Themify_Builder_Component_Column::template($sub_col, $builder_id, true, true, $cl);
[76] Fix | Delete
}
[77] Fix | Delete
unset($sub_col);
[78] Fix | Delete
}
[79] Fix | Delete
if ($is_styling === true) {//always should be output after cols,otherwise grid can be broken
[80] Fix | Delete
do_action('themify_builder_background_styling', $builder_id, $mod, 'subrow', '');
[81] Fix | Delete
}
[82] Fix | Delete
?>
[83] Fix | Delete
</div>
[84] Fix | Delete
<?php
[85] Fix | Delete
// End Sub-Row Render ######
[86] Fix | Delete
if ($echo === false) {
[87] Fix | Delete
return PHP_EOL . ob_get_clean() . PHP_EOL;
[88] Fix | Delete
}
[89] Fix | Delete
}
[90] Fix | Delete
}
[91] Fix | Delete
[92] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function