Ejemplo n.º 1
0
 public function exampleImageUrls()
 {
     $layout = new ThemeLayout(1);
     $template = new ThemeTemplate(1);
     $theme = new Theme(1);
     print_d($layout->getThemeConfig());
     var_dump($theme->getPath());
     var_dump($template->getImageUrl());
     echo '<br>';
     var_dump($layout->getImageUrl());
     echo '<br>';
     var_dump($theme->getImageUrl());
 }
    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 setWidgetAreaLayout($postId)
 {
     $Layout = new ThemeLayout();
     $option = ThemeOption::getPostMeta($postId);
     ThemeHelper::removeUIndex($option, 'widget_area_footer_layout');
     $this->widgetAreaLayout = $option['widget_area_footer_layout'];
     return $Layout->getLayoutCSSClass($this->widgetAreaLayout);
 }
Ejemplo n.º 4
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;
 }
Ejemplo n.º 5
0
}
// 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();
?>
">