function start_el(&$output, $object, $depth = 0, $args = array(), $current_object_id = 0)
    {
        $this->iconClass = null;
        if ($depth == 0) {
            $this->icon = $object->icon;
            $this->mega_menu_layout_column_index = 0;
            $this->mega_menu_enable = $object->mega_menu_enable;
            $this->mega_menu_layout = $object->mega_menu_layout;
            if ($object->icon != '-1') {
                $this->iconClass = 'pb-menu-icon pb-menu-icon-' . ThemeHelper::createHash($object->icon);
            }
        }
        if ($this->mega_menu_enable == 1) {
            if ($depth == 0 || $depth == 2) {
                $output .= '<li class="' . join(' ', (array) $object->classes) . ($depth == 0 ? ' sf-mega-enable-1' : null) . ' ' . $this->iconClass . ' ' . '">';
            }
            if ($depth == 1) {
                $Layout = new ThemeLayout();
                $class = array('sf-mega-section', $Layout->getLayoutColumnCSSClass($this->mega_menu_layout, $this->mega_menu_layout_column_index, 'theme-layout-column-'));
                $output .= '
					<div' . ThemeHelper::createClassAttribute($class) . '>
				';
                $this->mega_menu_layout_column_index++;
            }
            if ($depth == 1) {
                $output .= '
					<span class="sf-mega-header">' . esc_html($object->title) . '</span>
				';
            } else {
                $output .= '
					<a href="' . esc_attr($object->url) . '"><span></span>' . $object->title . '</a>
				';
            }
        } else {
            $output .= '
				<li class="' . join(' ', (array) $object->classes) . ($depth == 0 ? ' sf-mega-enable-0' : null) . ' ' . $this->iconClass . ' ' . '">
					<a href="' . esc_attr($object->url) . '"><span></span>' . $object->title . '</a>
			';
        }
    }
 function create($widgetArea, $filter = false)
 {
     if (!function_exists('dynamic_sidebar')) {
         return;
     }
     if ($filter) {
         ob_start();
         dynamic_sidebar($this->getWidgetAreaId($widgetArea['id']));
         $value = ob_get_clean();
         $Layout = new ThemeLayout();
         $widgetNumber = 0;
         while (1) {
             $count = 0;
             $value = preg_replace('/theme-layout-column-class/', $Layout->getLayoutColumnCSSClass($this->widgetAreaLayout, $widgetNumber++), $value, 1, $count);
             if ($count == 0) {
                 break;
             }
         }
         echo $value;
         return;
     }
     dynamic_sidebar($this->getWidgetAreaId($widgetArea['id']));
 }
Example #3
0
 function setWidgetLayout($parameter)
 {
     $Layout = new ThemeLayout();
     $parameter[0]['before_widget'] = preg_replace('/theme-widget/', 'theme-widget ' . $Layout->getLayoutColumnCSSClass($this->widgetAreaLayout, $this->widgetNumber), $parameter[0]['before_widget']);
     $this->widgetNumber++;
     return $parameter;
 }
// Ensure visibility
if (!$product || !$product->is_visible()) {
    return;
}
// Increase loop count
$woocommerce_loop['loop']++;
// Extra post classes
$classes = array();
if (0 == ($woocommerce_loop['loop'] - 1) % $woocommerce_loop['columns'] || 1 == $woocommerce_loop['columns']) {
    $classes[] = 'first';
}
if (0 == $woocommerce_loop['loop'] % $woocommerce_loop['columns']) {
    $classes[] = 'last';
}
$Layout = new ThemeLayout();
$classes[] = $Layout->getLayoutColumnCSSClass('33x33x33', $woocommerce_loop['loop'] - 1);
?>
<li <?php 
post_class($classes);
?>
>

	<?php 
do_action('woocommerce_before_shop_loop_item');
?>

	<a href="<?php 
the_permalink();
?>
">