class-wc-twenty-eleven.php
5 years ago
class-wc-twenty-fifteen.php
5 years ago
class-wc-twenty-fourteen.php
5 years ago
class-wc-twenty-nineteen.php
5 years ago
class-wc-twenty-seventeen.php
5 years ago
class-wc-twenty-sixteen.php
5 years ago
class-wc-twenty-ten.php
5 years ago
class-wc-twenty-thirteen.php
5 years ago
class-wc-twenty-twelve.php
2 years ago
class-wc-twenty-twenty-one.php
5 years ago
class-wc-twenty-twenty-three.php
3 years ago
class-wc-twenty-twenty-two.php
3 years ago
class-wc-twenty-twenty.php
5 years ago
class-wc-twenty-fourteen.php
59 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Twenty Fourteen support. |
| 4 | * |
| 5 | * @class WC_Twenty_Fourteen |
| 6 | * @since 3.3.0 |
| 7 | * @package WooCommerce\Classes |
| 8 | */ |
| 9 | |
| 10 | defined( 'ABSPATH' ) || exit; |
| 11 | |
| 12 | /** |
| 13 | * WC_Twenty_Fourteen class. |
| 14 | */ |
| 15 | class WC_Twenty_Fourteen { |
| 16 | |
| 17 | /** |
| 18 | * Theme init. |
| 19 | */ |
| 20 | public static function init() { |
| 21 | // Remove default wrappers. |
| 22 | remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper' ); |
| 23 | remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end' ); |
| 24 | |
| 25 | // Add custom wrappers. |
| 26 | add_action( 'woocommerce_before_main_content', array( __CLASS__, 'output_content_wrapper' ) ); |
| 27 | add_action( 'woocommerce_after_main_content', array( __CLASS__, 'output_content_wrapper_end' ) ); |
| 28 | |
| 29 | // Declare theme support for features. |
| 30 | add_theme_support( 'wc-product-gallery-zoom' ); |
| 31 | add_theme_support( 'wc-product-gallery-lightbox' ); |
| 32 | add_theme_support( 'wc-product-gallery-slider' ); |
| 33 | add_theme_support( |
| 34 | 'woocommerce', |
| 35 | array( |
| 36 | 'thumbnail_image_width' => 150, |
| 37 | 'single_image_width' => 300, |
| 38 | ) |
| 39 | ); |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Open wrappers. |
| 44 | */ |
| 45 | public static function output_content_wrapper() { |
| 46 | echo '<div id="primary" class="content-area"><div id="content" role="main" class="site-content twentyfourteen"><div class="tfwc">'; |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * Close wrappers. |
| 51 | */ |
| 52 | public static function output_content_wrapper_end() { |
| 53 | echo '</div></div></div>'; |
| 54 | get_sidebar( 'content' ); |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | WC_Twenty_Fourteen::init(); |
| 59 |