/** * Get template row * * @param array $rows * @param array $row * @param string $builder_id * @param bool $echo * * @return string */ public function get_template_row($rows, $row, $builder_id, $echo = false, $frontedit_active = null) { /* allow addons to control the display of the rows */ $display = apply_filters('themify_builder_row_display', true, $row, $builder_id); if (false === $display) { return false; } if (null === $frontedit_active) { $frontedit_active = $this->frontedit_active; } $row['row_order'] = isset($row['row_order']) ? $row['row_order'] : uniqid(); $row_classes = array('themify_builder_row', 'module_row', 'module_row_' . $row['row_order'], 'clearfix'); $class_fields = array('custom_css_row', 'background_repeat', 'animation_effect', 'row_width', 'row_height'); $row_gutter_class = isset($row['gutter']) && !empty($row['gutter']) ? $row['gutter'] : 'gutter-default'; // Set Gutter Class if ('' != $row_gutter_class) { $row_classes[] = $row_gutter_class; } // Class for Scroll Highlight if (isset($row['styling']) && isset($row['styling']['row_anchor']) && '' != $row['styling']['row_anchor']) { // Load styles and scripts registered in Themify_Builder::register_frontend_js_css() $GLOBALS['ThemifyBuilder']->load_templates_js_css(array('scroll' => true)); $row_classes[] = 'tb_section-' . $row['styling']['row_anchor']; } // @backward-compatibility if (!isset($row['styling']['background_type']) && isset($row['styling']['background_video']) && '' != $row['styling']['background_video']) { $row['styling']['background_type'] = 'video'; } // Fullwidth video $is_type_video = isset($row['styling']['background_type']) && 'video' == $row['styling']['background_type']; $has_video = isset($row['styling']['background_video']) && !empty($row['styling']['background_video']); foreach ($class_fields as $field) { if (isset($row['styling'][$field]) && !empty($row['styling'][$field])) { if ('animation_effect' == $field) { $row_classes[] = 'wow'; } $row_classes[] = $row['styling'][$field]; } } $row_classes = apply_filters('themify_builder_row_classes', $row_classes, $row, $builder_id); if ($is_type_video && $has_video) { // Load styles and scripts registered in Themify_Builder::register_frontend_js_css() $GLOBALS['ThemifyBuilder']->load_templates_js_css(array('fullvideo' => true)); $video_data = 'data-fullwidthvideo="' . esc_url($row['styling']['background_video']) . '"'; // Will only be written if they exist, for backwards compatibility with global JS variable tbLocalScript.backgroundVideoLoop if (isset($row['styling']['background_video_options'])) { if (is_array($row['styling']['background_video_options'])) { $video_data .= in_array('mute', $row['styling']['background_video_options']) ? ' data-mutevideo="mute"' : ' data-mutevideo="unmute"'; $video_data .= in_array('unloop', $row['styling']['background_video_options']) ? ' data-unloopvideo="unloop"' : ' data-unloopvideo="loop"'; } else { $video_data .= false !== stripos('mute', $row['styling']['background_video_options']) ? ' data-mutevideo="mute"' : ' data-mutevideo="unmute"'; $video_data .= false !== stripos('unloop', $row['styling']['background_video_options']) ? ' data-unloopvideo="unloop"' : ' data-unloopvideo="loop"'; } } } else { $video_data = ''; } $output = PHP_EOL; // add line break ob_start(); ?> <!-- module_row --> <div data-gutter="<?php echo esc_attr($row_gutter_class); ?> " class="<?php echo esc_attr(implode(' ', $row_classes)); ?> " <?php echo $video_data; ?> > <?php if ($frontedit_active) { ?> <div class="themify_builder_row_top"> <div class="row_menu"> <div class="menu_icon"> </div> <ul class="themify_builder_dropdown"> <li><a href="#" class="themify_builder_option_row"><?php _e('Options', 'themify'); ?> </a></li> <li><a href="#" class="themify_builder_duplicate_row"><?php _e('Duplicate', 'themify'); ?> </a></li> <li><a href="#" class="themify_builder_delete_row"><?php _e('Delete', 'themify'); ?> </a></li> </ul> </div> <!-- /row_menu --> <?php themify_builder_grid_lists('row', $row_gutter_class); ?> <div class="toggle_row"></div><!-- /toggle_row --> </div> <!-- /row_top --> <?php } // builder edit active ?> <?php if (isset($row['styling']['cover_color']) || isset($row['styling']['cover_color_hover'])) { $cover_color = $row['styling']['cover_color'] != '' ? 'style="background-color: ' . esc_attr($this->get_rgba_color($row['styling']['cover_color'])) . '" data-color="' . esc_attr($this->get_rgba_color($row['styling']['cover_color'])) . '"' : ''; $cover_hover_color = $row['styling']['cover_color_hover'] != '' ? 'data-hover-color="' . esc_attr($this->get_rgba_color($row['styling']['cover_color_hover'])) . '"' : ''; ?> <div class="builder_row_cover" <?php echo "{$cover_color} {$cover_hover_color}"; ?> ></div> <?php } ?> <?php // Background Slider if (isset($row['styling']['background_slider']) && !empty($row['styling']['background_slider']) && 'slider' == $row['styling']['background_type']) { if ($images = $this->get_images_from_gallery_shortcode($row['styling']['background_slider'])) { $bgmode = isset($row['styling']['background_slider_mode']) && !empty($row['styling']['background_slider_mode']) ? $row['styling']['background_slider_mode'] : 'fullcover'; // Load styles and scripts registered in Themify_Builder::register_frontend_js_css() $GLOBALS['ThemifyBuilder']->load_templates_js_css(array('icons-fa' => true)); ?> <div id="row-slider-<?php echo esc_attr($row['row_order']); ?> " class="row-slider" data-bgmode="<?php echo esc_attr($bgmode); ?> "> <ul class="row-slider-slides clearfix"> <?php $dot_i = 0; foreach ($images as $image) { $img_data = wp_get_attachment_image_src($image->ID, 'large'); ?> <li data-bg="<?php echo esc_url($img_data[0]); ?> "> <a class="row-slider-dot" data-index="<?php echo esc_attr($dot_i); ?> "></a> </li> <?php $dot_i++; } ?> </ul> <div class="row-slider-nav"> <a class="row-slider-arrow row-slider-prev">‹</a> <a class="row-slider-arrow row-slider-next">›</a> </div> </div> <!-- /.row-bgs --> <?php } // images } // background slider ?> <div class="row_inner_wrapper"> <div class="row_inner"> <?php do_action('themify_builder_row_start', $builder_id, $row); ?> <?php if ($frontedit_active) { ?> <div class="themify_builder_row_content"> <?php } // builder edit active ?> <?php if (isset($row['cols']) && count($row['cols']) > 0) { $count = count($row['cols']); switch ($count) { case 6: $order_classes = array('first', 'second', 'third', 'fourth', 'fifth', 'last'); break; case 5: $order_classes = array('first', 'second', 'third', 'fourth', 'last'); break; case 4: $order_classes = array('first', 'second', 'third', 'last'); break; case 3: $order_classes = array('first', 'middle', 'last'); break; case 2: $order_classes = array('first', 'last'); break; default: $order_classes = array('first'); break; } foreach ($row['cols'] as $cols => $col) { $columns_class = array(); $grid_class = explode(' ', $col['grid_class']); $dynamic_class = array('', ''); $dynamic_class[0] = $frontedit_active ? 'themify_builder_col' : $order_classes[$cols]; $dynamic_class[1] = $frontedit_active ? '' : 'tb-column'; $dynamic_class[2] = isset($col['modules']) && count($col['modules']) > 0 ? '' : 'empty-column'; $columns_class = array_merge($columns_class, $grid_class); foreach ($dynamic_class as $class) { array_push($columns_class, $class); } $columns_class = array_unique($columns_class); // remove class "last" if the column is fullwidth if (1 == $count) { if (($key = array_search('last', $columns_class)) !== false) { unset($columns_class[$key]); } } $print_column_classes = implode(' ', $columns_class); ?> <div class="<?php echo esc_attr($print_column_classes); ?> "> <?php if ($frontedit_active) { ?> <div class="themify_module_holder"> <div class="empty_holder_text"><?php _e('drop module here', 'themify'); ?> </div><!-- /empty module text --> <?php } ?> <?php if (isset($col['modules']) && count($col['modules']) > 0) { foreach ($col['modules'] as $modules => $mod) { if (isset($mod['mod_name'])) { $w_wrap = $frontedit_active ? true : false; $w_class = $frontedit_active ? 'r' . $rows . 'c' . $cols . 'm' . $modules : ''; $identifier = array($rows, $cols, $modules); // define module id $this->get_template_module($mod, $builder_id, true, $w_wrap, $w_class, $identifier); } // Check for Sub-rows if (isset($mod['cols']) && count($mod['cols']) > 0) { $sub_row_gutter = isset($mod['gutter']) && !empty($mod['gutter']) ? $mod['gutter'] : 'gutter-default'; $sub_row_class = 'sub_row_' . $rows . '-' . $cols . '-' . $modules; $sub_row_attr = $frontedit_active ? ' data-gutter="' . esc_attr($sub_row_gutter) . '"' : ''; echo sprintf('<div class="themify_builder_sub_row clearfix %s %s"%s>', esc_attr($sub_row_gutter), esc_attr($sub_row_class), $sub_row_attr); ?> <?php if ($frontedit_active) { ?> <div class="themify_builder_sub_row_top"> <?php themify_builder_grid_lists('sub_row', $sub_row_gutter); ?> <ul class="sub_row_action"> <li><a href="#" class="sub_row_duplicate"><span class="ti-layers"></span></a></li> <li><a href="#" class="sub_row_delete"><span class="ti-close"></span></a></li> </ul> </div> <div class="themify_builder_sub_row_content"> <?php } ?> <?php foreach ($mod['cols'] as $col_key => $sub_col) { $sub_col_class = $frontedit_active ? 'themify_builder_col ' . $sub_col['grid_class'] : $sub_col['grid_class']; echo sprintf('<div class="%s">', esc_attr($sub_col_class)); ?> <?php if ($frontedit_active) { ?> <div class="themify_module_holder"> <div class="empty_holder_text"><?php _e('drop module here', 'themify'); ?> </div><!-- /empty module text --> <?php } ?> <?php if (isset($sub_col['modules']) && count($sub_col['modules']) > 0) { foreach ($sub_col['modules'] as $sub_module_k => $sub_module) { $sw_wrap = $frontedit_active ? true : false; $sw_class = $frontedit_active ? 'r' . $sub_row_class . 'c' . $col_key . 'm' . $sub_module_k : ''; $sub_identifier = array($sub_row_class, $col_key, $sub_module_k); // define module id $this->get_template_module($sub_module, $builder_id, true, $sw_wrap, $sw_class, $sub_identifier); } } ?> <?php if ($frontedit_active) { ?> </div> <!-- /module_holder --> <?php } ?> <?php echo '</div>'; } if ($frontedit_active) { echo '</div>'; } echo '</div>'; } } } elseif (!$frontedit_active) { echo ' '; // output empty space } ?> <?php if ($frontedit_active) { ?> </div> <!-- /module_holder --> <?php } ?> </div> <!-- /col --> <?php } ?> <?php } else { ?> <div class="themify_builder_col col-full first last"> <?php if ($frontedit_active) { ?> <div class="themify_module_holder"> <div class="empty_holder_text"><?php _e('drop module here', 'themify'); ?> </div><!-- /empty module text --> <?php } ?> <?php if (!$frontedit_active) { echo ' '; // output empty space } ?> <?php if ($frontedit_active) { ?> </div> <!-- /module_holder --> <?php } ?> </div> <!-- /col --> <?php } // end col loop ?> <?php if ($frontedit_active) { ?> </div> <!-- /themify_builder_row_content --> <?php $row_data_styling = isset($row['styling']) ? json_encode($row['styling']) : json_encode(array()); ?> <div class="row-data-styling" data-styling="<?php echo esc_attr($row_data_styling); ?> "></div> <?php } ?> <?php do_action('themify_builder_row_end', $builder_id, $row); ?> </div> <!-- /row_inner --> </div> <!-- /row_inner_wrapper --> </div> <!-- /module_row --> <?php $output .= ob_get_clean(); // add line break $output .= PHP_EOL; if ($echo) { echo $output; } else { return $output; } }
_e('Options', 'themify'); ?> </a></li> <li><a href="#" class="themify_builder_duplicate_row"><?php _e('Duplicate', 'themify'); ?> </a></li> <li><a href="#" class="themify_builder_delete_row"><?php _e('Delete', 'themify'); ?> </a></li> </ul> </div> <!-- /row_menu --> <?php themify_builder_grid_lists('row'); ?> <div class="toggle_row"></div><!-- /toggle_row --> </div> <!-- /row_top --> <div class="themify_builder_row_content"> <div class="themify_builder_col col4-1 first"> <div class="themify_module_holder"> <div class="empty_holder_text"><?php _e('drop module here', 'themify'); ?> </div><!-- /empty module text --> </div> <!-- /module_holder --> </div>
/** * Get template row * * @param array $rows * @param array $row * @param string $builder_id * @param bool $echo * * @return string */ public function get_template_row($rows, $row, $builder_id, $echo = false, $frontedit_active = null) { /* allow addons to control the display of the rows */ $display = apply_filters('themify_builder_row_display', true, $row, $builder_id); if (false === $display) { return false; } if (null === $frontedit_active) { $frontedit_active = self::$frontedit_active; } // prevent empty rows from being rendered if (!$frontedit_active) { if (!isset($row['cols']) && !isset($row['styling']) || isset($row['cols']) && empty($row['cols']) && !isset($row['styling']) || isset($row['cols']) && count($row['cols']) == 1 && empty($row['cols'][0]['modules']) && !isset($row['styling'])) { return ''; } } $row['row_order'] = isset($row['row_order']) ? $row['row_order'] : uniqid(); $row_classes = array('themify_builder_row', 'themify_builder_' . $builder_id . '_row', 'module_row', 'module_row_' . $row['row_order'], 'clearfix'); $class_fields = array('custom_css_row', 'background_repeat', 'animation_effect', 'row_width', 'row_height'); $row_gutter_class = isset($row['gutter']) && !empty($row['gutter']) ? $row['gutter'] : 'gutter-default'; $row_column_equal_height = isset($row['equal_column_height']) && !empty($row['equal_column_height']) ? $row['equal_column_height'] : ''; // Set Gutter Class if ('' != $row_gutter_class) { $row_classes[] = $row_gutter_class; } // Set column equal height if ('' != $row_column_equal_height) { $row_classes[] = $row_column_equal_height; } // Class for Scroll Highlight if (isset($row['styling']) && isset($row['styling']['row_anchor']) && '' != $row['styling']['row_anchor']) { $row_classes[] = 'tb_section-' . $row['styling']['row_anchor']; } // @backward-compatibility if (!isset($row['styling']['background_type']) && isset($row['styling']['background_video']) && '' != $row['styling']['background_video']) { $row['styling']['background_type'] = 'video'; } foreach ($class_fields as $field) { if (isset($row['styling'][$field]) && !empty($row['styling'][$field])) { if ('animation_effect' == $field) { $row_classes[] = 'wow'; } $row_classes[] = $row['styling'][$field]; } } if (isset($row['styling']['animation_effect_delay']) && !empty($row['styling']['animation_effect_delay'])) { $row_classes[] = 'animation_effect_delay_' . $row['styling']['animation_effect_delay']; } if (isset($row['styling']['animation_effect_repeat']) && !empty($row['styling']['animation_effect_repeat'])) { $row_classes[] = 'animation_effect_repeat_' . $row['styling']['animation_effect_repeat']; } $row_classes = apply_filters('themify_builder_row_classes', $row_classes, $row, $builder_id); // background video $video_data = ''; if (isset($row['styling'])) { $video_data = $this->get_video_background($row['styling']); } $output = PHP_EOL; // add line break ob_start(); ?> <!-- module_row --> <div data-gutter="<?php echo esc_attr($row_gutter_class); ?> " class="<?php echo esc_attr(implode(' ', $row_classes)); ?> " <?php echo $video_data; ?> data-equal-column-height="<?php echo esc_attr($row_column_equal_height); ?> "> <?php if ($frontedit_active) { ?> <div class="themify_builder_row_top"> <?php themify_builder_grid_lists('row', $row_gutter_class, $row_column_equal_height); ?> <ul class="row_action"> <li><a href="#" data-title="<?php _e('Export', 'themify'); ?> " class="themify_builder_export_component" data-component="row" rel="themify-tooltip-bottom"> <span class="ti-export"></span> </a></li> <li><a href="#" data-title="<?php _e('Import', 'themify'); ?> " class="themify_builder_import_component" data-component="row" rel="themify-tooltip-bottom"> <span class="ti-import"></span> </a></li> <li class="separator"></li> <li><a href="#" data-title="<?php _e('Copy', 'themify'); ?> " class="themify_builder_copy_component" data-component="row" rel="themify-tooltip-bottom"> <span class="ti-files"></span> </a></li> <li><a href="#" data-title="<?php _e('Paste', 'themify'); ?> " class="themify_builder_paste_component" data-component="row" rel="themify-tooltip-bottom"> <span class="ti-clipboard"></span> </a></li> <li class="separator"></li> <li><a href="#" data-title="<?php _e('Options', 'themify'); ?> " class="themify_builder_option_row" rel="themify-tooltip-bottom"> <span class="ti-pencil"></span> </a></li> <li><a href="#" data-title="<?php _e('Duplicate', 'themify'); ?> " class="themify_builder_duplicate_row" rel="themify-tooltip-bottom"> <span class="ti-layers"></span> </a></li> <li><a href="#" data-title="<?php _e('Delete', 'themify'); ?> " class="themify_builder_delete_row" rel="themify-tooltip-bottom"> <span class="ti-close"></span> </a></li> <li class="separator"></li> <li><a href="#" data-title="<?php _e('Toggle Row', 'themify'); ?> " class="themify_builder_toggle_row"> <span class="ti-angle-up"></span> </a></li> </ul> </div> <!-- /row_top --> <?php } // builder edit active ?> <?php if (isset($row['styling'])) { // Background cover color $this->do_color_overlay($row['styling']); // Background Slider $this->do_slider_background($row, $row['row_order'], 'row'); } ?> <div class="row_inner_wrapper"> <div class="row_inner"> <?php do_action('themify_builder_row_start', $builder_id, $row); ?> <?php if ($frontedit_active) { ?> <div class="themify_builder_row_content"> <?php } // builder edit active ?> <?php if (isset($row['cols']) && count($row['cols']) > 0) { $count = count($row['cols']); switch ($count) { case 6: $order_classes = array('first', 'second', 'third', 'fourth', 'fifth', 'last'); break; case 5: $order_classes = array('first', 'second', 'third', 'fourth', 'last'); break; case 4: $order_classes = array('first', 'second', 'third', 'last'); break; case 3: $order_classes = array('first', 'middle', 'last'); break; case 2: $order_classes = array('first', 'last'); break; default: $order_classes = array('first'); break; } foreach ($row['cols'] as $cols => $col) { $columns_class = array(); $grid_class = explode(' ', $col['grid_class']); $dynamic_class = array('', ''); $dynamic_class[0] = $frontedit_active ? 'themify_builder_col' : $order_classes[$cols]; $dynamic_class[1] = $frontedit_active ? '' : 'tb-column'; $dynamic_class[2] = isset($col['modules']) && count($col['modules']) > 0 ? '' : 'empty-column'; $dynamic_class[3] = 'tb_' . $builder_id . '_column'; // who's your daddy? if (isset($col['column_order'])) { array_push($dynamic_class, 'module_column_' . $col['column_order']); } array_push($dynamic_class, 'module_column'); if (isset($col['styling']['background_repeat']) && !empty($col['styling']['background_repeat'])) { $dynamic_class[] = $col['styling']['background_repeat']; } $columns_class = array_merge($columns_class, $grid_class); foreach ($dynamic_class as $class) { array_push($columns_class, $class); } $columns_class = array_unique($columns_class); // remove class "last" if the column is fullwidth if (1 == $count) { if (($key = array_search('last', $columns_class)) !== false) { unset($columns_class[$key]); } } $print_column_classes = implode(' ', $columns_class); // background video $video_data = ''; if (isset($col['styling'])) { $video_data = $this->get_video_background($col['styling']); } ?> <div class="<?php echo esc_attr($print_column_classes); ?> " <?php echo $video_data; ?> > <?php if (isset($col['styling'])) { // Background cover color $this->do_color_overlay($col['styling']); // Background Slider $column_order = $row['row_order'] . '-' . $col['column_order']; $this->do_slider_background($col, $column_order, 'col'); } ?> <?php if ($frontedit_active) { ?> <div class="themify_builder_column_styling_icon ti-brush themify_builder_option_column" title="<?php esc_attr_e('Column Styling', 'themify'); ?> "></div> <?php } ?> <div class="tb-column-inner"> <?php do_action('themify_builder_column_start', $builder_id, $row, $col); ?> <?php if ($frontedit_active) { ?> <div class="themify_module_holder"> <div class="empty_holder_text"><?php _e('drop module here', 'themify'); ?> </div><!-- /empty module text --> <?php } ?> <?php if (isset($col['modules']) && count($col['modules']) > 0) { foreach ($col['modules'] as $modules => $mod) { if (isset($mod['mod_name'])) { $w_wrap = $frontedit_active ? true : false; $w_class = $frontedit_active ? 'r' . $rows . 'c' . $cols . 'm' . $modules : ''; $identifier = array($rows, $cols, $modules); // define module id $this->get_template_module($mod, $builder_id, true, $w_wrap, $w_class, $identifier); } // Check for Sub-rows if (isset($mod['cols']) && count($mod['cols']) > 0) { $dynamic_class = array(); $dynamic_class[] = $sub_row_gutter = isset($mod['gutter']) && !empty($mod['gutter']) ? $mod['gutter'] : 'gutter-default'; $dynamic_class[] = $sub_row_column_equal_height = isset($mod['equal_column_height']) && !empty($mod['equal_column_height']) ? $mod['equal_column_height'] : ''; $dynamic_class[] = $sub_row_class = 'sub_row_' . $rows . '-' . $cols . '-' . $modules; $sub_row_attr = $frontedit_active ? ' data-gutter="' . esc_attr($sub_row_gutter) . '"' : ''; $sub_row_column_equal_height_data = $frontedit_active ? 'data-equal-column-height="' . esc_attr($sub_row_column_equal_height) . '"' : ''; $print_sub_row_classes = implode(' ', $dynamic_class); echo sprintf('<div class="themify_builder_sub_row clearfix %s"%s %s>', esc_attr($print_sub_row_classes), $sub_row_attr, $sub_row_column_equal_height_data); ?> <?php if ($frontedit_active) { ?> <div class="themify_builder_sub_row_top"> <?php themify_builder_grid_lists('sub_row', $sub_row_gutter, $sub_row_column_equal_height); ?> <ul class="sub_row_action"> <li><a href="#" data-title="<?php _e('Export', 'themify'); ?> " rel="themify-tooltip-bottom" class="themify_builder_export_component" data-component="sub-row"> <span class="ti-export"></span> </a></li> <li><a href="#" data-title="<?php _e('Import', 'themify'); ?> " rel="themify-tooltip-bottom" class="themify_builder_import_component" data-component="sub-row"> <span class="ti-import"></span> </a></li> <li class="separator"></li> <li><a href="#" data-title="<?php _e('Copy', 'themify'); ?> " rel="themify-tooltip-bottom" class="themify_builder_copy_component" data-component="sub-row"> <span class="ti-files"></span> </a></li> <li><a href="#" data-title="<?php _e('Paste', 'themify'); ?> " rel="themify-tooltip-bottom" class="themify_builder_paste_component" data-component="sub-row"> <span class="ti-clipboard"></span> </a></li> <li class="separator"></li> <li><a href="#" data-title="<?php _e('Duplicate', 'themify'); ?> " rel="themify-tooltip-bottom" class="sub_row_duplicate"> <span class="ti-layers"></span> </a></li> <li><a href="#" data-title="<?php _e('Delete', 'themify'); ?> " rel="themify-tooltip-bottom" class="sub_row_delete"> <span class="ti-close"></span> </a></li> </ul> </div> <div class="themify_builder_sub_row_content"> <?php } ?> <?php foreach ($mod['cols'] as $col_key => $sub_col) { $dynamic_class = array(); $dynamic_class[] = $frontedit_active ? 'themify_builder_col ' . $sub_col['grid_class'] : $sub_col['grid_class']; $dynamic_class[] = 'sub_column sub_column_' . $rows . '-' . $cols . '-' . $modules . '-' . $col_key; $dynamic_class[] = "sub_column_post_{$builder_id}"; if (isset($sub_col['styling']['background_repeat']) && !empty($sub_col['styling']['background_repeat'])) { $dynamic_class[] = $sub_col['styling']['background_repeat']; } $print_sub_col_classes = implode(' ', $dynamic_class); // background video $video_data = ''; if (isset($sub_col['styling'])) { $video_data = $this->get_video_background($sub_col['styling']); } echo sprintf('<div class="%s" %s>', esc_attr($print_sub_col_classes), $video_data); ?> <?php if (isset($sub_col['styling'])) { // Background cover color $this->do_color_overlay($sub_col['styling']); // Background Slider $sub_column_order = $rows . '-' . $cols . '-' . $modules . '-' . $col_key; $this->do_slider_background($sub_col, $sub_column_order, 'sub-col'); } ?> <?php do_action('themify_builder_sub_column_start', $builder_id, $rows, $cols, $modules, $sub_col); ?> <?php if ($frontedit_active) { ?> <div class="themify_builder_column_styling_icon ti-brush themify_builder_option_column" title="<?php esc_attr_e('Column Styling', 'themify'); ?> "></div> <div class="themify_module_holder"> <div class="empty_holder_text"><?php _e('drop module here', 'themify'); ?> </div><!-- /empty module text --> <?php } ?> <?php if (isset($sub_col['modules']) && count($sub_col['modules']) > 0) { foreach ($sub_col['modules'] as $sub_module_k => $sub_module) { $sw_wrap = $frontedit_active ? true : false; $sw_class = $frontedit_active ? 'r' . $sub_row_class . 'c' . $col_key . 'm' . $sub_module_k : ''; $sub_identifier = array($sub_row_class, $col_key, $sub_module_k); // define module id $this->get_template_module($sub_module, $builder_id, true, $sw_wrap, $sw_class, $sub_identifier); } } ?> <?php if ($frontedit_active) { ?> </div> <?php $sub_column_data_styling = isset($sub_col['styling']) ? json_encode($sub_col['styling']) : json_encode(array()); ?> <div class="column-data-styling" data-styling="<?php echo esc_attr($sub_column_data_styling); ?> "></div> <!-- /module_holder --> <?php } ?> <?php echo '</div>'; } if ($frontedit_active) { echo '</div>'; } echo '</div>'; } } } elseif (!$frontedit_active) { echo ' '; // output empty space } ?> </div> <!-- /.tb-column-inner --> <?php if ($frontedit_active) { ?> </div> <?php $column_data_styling = isset($col['styling']) ? json_encode($col['styling']) : json_encode(array()); ?> <div class="column-data-styling" data-styling="<?php echo esc_attr($column_data_styling); ?> "></div> <!-- /module_holder --> <?php } ?> </div> <!-- /.tb-column --> <?php } ?> <?php } else { ?> <div class="themify_builder_col col-full first last"> <?php if ($frontedit_active) { ?> <div class="themify_module_holder"> <div class="empty_holder_text"><?php _e('drop module here', 'themify'); ?> </div><!-- /empty module text --> <?php } ?> <?php if (!$frontedit_active) { echo ' '; // output empty space } ?> <?php if ($frontedit_active) { ?> </div> <!-- /module_holder --> <?php } ?> </div> <!-- /col --> <?php } // end col loop ?> <?php if ($frontedit_active) { ?> </div> <!-- /themify_builder_row_content --> <?php $row_data_styling = isset($row['styling']) ? json_encode($row['styling']) : json_encode(array()); ?> <div class="row-data-styling" data-styling="<?php echo esc_attr($row_data_styling); ?> "></div> <?php } ?> <?php do_action('themify_builder_row_end', $builder_id, $row); ?> </div> <!-- /row_inner --> </div> <!-- /row_inner_wrapper --> </div> <!-- /module_row --> <?php $output .= ob_get_clean(); // add line break $output .= PHP_EOL; if ($echo) { echo $output; } else { return $output; } }
<li><a href="#" class="themify_builder_option_row"><?php _e('Options', 'themify'); ?> </a></li> <li><a href="#" class="themify_builder_duplicate_row"><?php _e('Duplicate', 'themify'); ?> </a></li> <li><a href="#" class="themify_builder_delete_row"><?php _e('Delete', 'themify'); ?> </a></li> </ul> </div> <?php themify_builder_grid_lists(); ?> <div class="toggle_row"></div> </div> <div class="themify_builder_row_content"> <div class="themify_builder_col col-full first last"> <div class="themify_builder_column_styling_icon ti-brush themify_builder_option_column" title="<?php esc_attr_e('Column Styling', 'themify'); ?> "></div> <div class="themify_module_holder"> <div class="empty_holder_text"><?php _e('drop module here', 'themify'); ?>
<script type="text/html" id="tmpl-builder_column"> <div class="themify_builder_col {{ data.newclass }}"> <div class="themify_builder_column_styling_icon ti-brush themify_builder_option_column" title="<?php esc_attr_e('Column Styling', 'themify'); ?> "></div> <div class="themify_module_holder"> <div class="empty_holder_text">{{ data.placeholder }}</div> </div> <div class="column-data-styling" data-styling=""></div> </div> </script> <script type="text/html" id="tmpl-builder_grid_menu"> <?php themify_builder_grid_lists('module'); ?> </script> <script type="text/html" id="tmpl-builder_lightbox"> <div id="themify_builder_lightbox_parent" class="themify_builder themify_builder_admin builder-lightbox clearfix {{ data.is_themify_theme }}"> <div class="themify_builder_lightbox_top_bar clearfix"> <ul class="themify_builder_options_tab clearfix"> </ul> <div class="themify_builder_lightbox_actions"> <a class="builder_cancel_lightbox"><?php _e('Cancel', 'themify'); ?> <i class="ti ti-close"></i></a> </div>