File "class-wc-twenty-twenty-one.php"
Full path: /home/kosmetik/public_html/wp-content/plugins/woocommerce/includes/theme-support/class-wc-twenty-twenty-one.php
File
size: 1.6 B
MIME-type: text/x-php
Charset: utf-8
Download Open Edit Advanced Editor Back
<?php
use Automattic\Jetpack\Constants;
defined('ABSPATH') || exit;
class WC_Twenty_Twenty_One
{
public static function init()
{
remove_action('woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action('woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
remove_action('woocommerce_sidebar', 'woocommerce_get_sidebar', 10);
add_filter('woocommerce_enqueue_styles', array(__CLASS__, 'enqueue_styles'));
add_action('admin_enqueue_scripts', array(__CLASS__, 'enqueue_admin_styles'));
add_theme_support('wc-product-gallery-zoom');
add_theme_support('wc-product-gallery-lightbox');
add_theme_support('wc-product-gallery-slider');
add_theme_support('woocommerce', array('thumbnail_image_width' => 450, 'single_image_width' => 600));
}
public static function enqueue_styles($styles)
{
unset($styles['woocommerce-general']);
$styles['woocommerce-general'] = array('src' => str_replace(array('http:', 'https:'), '', WC()->plugin_url()) . '/assets/css/twenty-twenty-one.css', 'deps' => '', 'version' => Constants::get_constant('WC_VERSION'), 'media' => 'all', 'has_rtl' => true);
return apply_filters('woocommerce_twenty_twenty_one_styles', $styles);
}
public static function enqueue_admin_styles()
{
wp_enqueue_style('woocommerce-twenty-twenty-one-admin', str_replace(array('http:', 'https:'), '', WC()->plugin_url()) . '/assets/css/twenty-twenty-one-admin.css', '', Constants::get_constant('WC_VERSION'), 'all');
}
}
WC_Twenty_Twenty_One::init();