function fruitful_remove_woo_sidebar() { if (fruitful_get_woo_sidebar() == 1) { remove_action('woocommerce_sidebar', 'woocommerce_get_sidebar'); } }
function fruitful_init_woo_styles() { function go_woo_tabs_left() { $style_ = $back_style = $woo_style_ = ''; $theme_options = fruitful_ret_options("fruitful_theme_options"); $style_ .= '@media only screen and (min-width: 1024px) {body.woocommerce div.product div.summary, body.woocommerce-page div.product div.summary, body.woocommerce #content div.product div.summary, body.woocommerce-page #content div.product div.summary {max-width : 100%; }}' . "\n"; $style_ .= '@media only screen and (min-width: 1024px) {body.woocommerce div.product .woocommerce-tabs, body.woocommerce-page div.product .woocommerce-tabs, body.woocommerce #content div.product .woocommerce-tabs, body.woocommerce-page #content div.product .woocommerce-tabs {float: left; }}' . "\n"; $style_ .= '@media only screen and (max-width: 1024px) {body.woocommerce div.product .woocommerce-tabs, body.woocommerce-page div.product .woocommerce-tabs, body.woocommerce #content div.product .woocommerce-tabs, body.woocommerce-page #content div.product .woocommerce-tabs {margin: 0 0 15px 0;}}' . "\n"; $style_ .= '@media only screen and (min-width: 1024px) {body.woocommerce div.product div.images, body.woocommerce-page div.product div.images, body.woocommerce #content div.product div.images, body.woocommerce-page #content div.product div.images {margin: 0 0 0 25px; float: right}}' . "\n"; $style_ .= '.single.woocommerce span.onsale, .single.woocommerce-page span.onsale { top: 6px; right:15px; left: auto; position: absolute; display: block;}' . "\n"; $style_ .= '@media only screen and (max-width: 1024px) {body.woocommerce div.product div.images, body.woocommerce-page div.product div.images, body.woocommerce #content div.product div.images, body.woocommerce-page #content div.product div.images{ clear: both; position: relative; margin: 20px auto; }}' . "\n"; $style_ .= '@media only screen and (min-width: 1024px) {.entry-title, .woocommerce-product-rating, div[itemprop="offers"], div[itemprop="offers"].price{ display:inline-block; width: 565px;}}' . "\n"; wp_add_inline_style('main-style', fruitful_compress_code($style_)); if ($woo_style_ != '') { wp_add_inline_style('woo-style', fruitful_compress_code($woo_style_)); } } function go_woo_tabs_center() { $style_ = $back_style = $woo_style_ = ''; $theme_options = fruitful_ret_options("fruitful_theme_options"); $style_ .= '@media only screen and (min-width: 1024px) {body.woocommerce div.product .woocommerce-tabs, body.woocommerce-page div.product .woocommerce-tabs, body.woocommerce #content div.product .woocommerce-tabs, body.woocommerce-page #content div.product .woocommerce-tabs {max-width : 100%; margin-top: 20px;}}' . "\n"; wp_add_inline_style('main-style', fruitful_compress_code($style_)); if ($woo_style_ != '') { wp_add_inline_style('woo-style', fruitful_compress_code($woo_style_)); } } $woo_tabs_pos = fruitful_get_woo_sidebar(); if ($woo_tabs_pos == 4) { go_woo_tabs_left(); } if ($woo_tabs_pos == 5) { go_woo_tabs_center(); } }
<?php /** * Content wrappers * * @author Fruitful * @package WooCommerce/Templates * @version 1.6.4 */ $template = strtolower(get_option('template')); $woo_sidebar = fruitful_get_woo_sidebar(); switch ($template) { case 'twentyeleven': echo '</div></div>'; break; case 'twentytwelve': echo '</div></div>'; break; case 'twentythirteen': echo '</div></div>'; break; case 'twentyfourteen': echo '</div></div></div>'; get_sidebar('content'); break; case 'fruitful': if ($woo_sidebar == 1) { echo '</div></div></div>'; } elseif ($woo_sidebar == 2) { echo '</div></div></div>'; echo '<div class="five columns alpha woo-loop-sidebar">';