ASTRA_Ext_WooCommerce_Markup::body_class( array $classes )
Body Class
Description
Parameters
- $classes
-
(array) (Required) Default argument array.
Return
(array;)
Source
File: addons/woocommerce/classes/class-astra-ext-woocommerce-markup.php
public function body_class( $classes ) { if ( is_shop() || is_product_taxonomy() ) { $shop_style = astra_get_option( 'shop-style' ); if ( 'shop-page-list-style' == $shop_style ) { $classes[] = 'ast-woocommerce-' . $shop_style; } $pagination_type = astra_get_option( 'shop-pagination' ); if ( 'infinite' === $pagination_type ) { $classes[] = 'ast-woocommerce-pagination-type-infinite'; } if ( 'number' === $pagination_type ) { $classes[] = 'ast-woocommerce-pagination-' . astra_get_option( 'shop-pagination-style' ); } } elseif ( is_product() ) { $related_upsell_style = astra_get_option( 'shop-style' ); if ( 'shop-page-list-style' == $related_upsell_style ) { $classes[] = 'ast-woocommerce-related-upsell-list-style'; } $rel_up_columns = astra_get_option( 'single-product-related-upsell-grid' ); $classes[] = 'rel-up-columns-' . $rel_up_columns['desktop']; $classes[] = 'tablet-rel-up-columns-' . $rel_up_columns['tablet']; $classes[] = 'mobile-rel-up-columns-' . $rel_up_columns['mobile']; } elseif ( is_checkout() ) { if ( astra_get_option( 'two-step-checkout' ) ) { $classes[] = 'ast-woo-two-step-checkout'; } if ( astra_get_option( 'checkout-labels-as-placeholders' ) ) { $classes[] = 'ast-checkout-labels-as-placeholders'; } if ( astra_get_option( 'checkout-distraction-free' ) ) { $classes[] = 'distraction-free'; } } return $classes; }
Expand full source code Collapse full source code View on Trac