'500', // px 'height' => '500', // px 'crop' => 1 // true ); $single = array( 'width' => '500', // px 'height' => '500', // px 'crop' => 1 // true ); $thumbnail = array( 'width' => '200', // px 'height' => '200', // px 'crop' => 1 // true ); // Image sizes update_option( 'shop_catalog_image_size', $catalog ); // Product category thumbs update_option( 'shop_single_image_size', $single ); // Single product image update_option( 'shop_thumbnail_image_size', $thumbnail ); // Image gallery thumbs } } /* --------------------------------------------------------------------------- * WooCommerce - Before Main Content * --------------------------------------------------------------------------- */ if( ! function_exists( 'mfn_woocommerce_output_content_wrapper' ) ) { function mfn_woocommerce_output_content_wrapper() { ?>
'; echo '
'; dynamic_sidebar( 'mfn-search' ); echo '
'; echo '
'; } elseif( is_active_sidebar( 'shop' ) && $layout != 'no-sidebar' ){ if( is_product() && mfn_opts_get('shop-sidebar') ){ // product page without sidebar } else { echo ''; } } ?>
version, '2.3', '<' ) ){ // WooCommerce 2.2 - add_filter( 'add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment' ); } else { // WooCommerce 2.3 + add_filter( 'woocommerce_add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment' ); } if( ! function_exists( 'woocommerce_header_add_to_cart_fragment' ) ) { function woocommerce_header_add_to_cart_fragment( $fragments ) { global $woocommerce; $cart_icon = mfn_opts_get('shop-cart'); if( $cart_icon == 1 ) $cart_icon = 'icon-bag-fine'; // Be < 4.9 compatibility // header ob_start(); echo ''. $woocommerce->cart->cart_contents_count .''; $fragments['a#header_cart'] = ob_get_clean(); // side slide ob_start(); echo ''. $woocommerce->cart->cart_contents_count .''; $fragments['a#slide-cart'] = ob_get_clean(); return $fragments; } }