WC_Twenty_Twenty_One::init
Theme init.
Метод класса: WC_Twenty_Twenty_One{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$result = WC_Twenty_Twenty_One::init();
Код WC_Twenty_Twenty_One::init() WC Twenty Twenty One::init WC 10.8.1
public static function init() {
// Change WooCommerce wrappers.
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );
// This theme doesn't have a traditional sidebar.
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
// Enqueue theme compatibility styles.
add_filter( 'woocommerce_enqueue_styles', array( __CLASS__, 'enqueue_styles' ) );
// Enqueue wp-admin compatibility styles.
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_admin_styles' ) );
// Register theme features.
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,
)
);
}