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