Astra_Woocommerce::store_content_layout( String $layout )
WooCommerce Container
Description
Parameters
- $layout
-
(String) (Required) Layout type.
Return
(String) $layout Layout type.
Source
File: inc/compatibility/woocommerce/class-astra-woocommerce.php
public function store_content_layout( $layout ) { if ( is_woocommerce() || is_checkout() || is_cart() || is_account_page() ) { $woo_layout = astra_get_option( 'woocommerce-content-layout' ); if ( 'default' !== $woo_layout ) { $layout = $woo_layout; } if ( is_shop() ) { $shop_page_id = get_option( 'woocommerce_shop_page_id' ); $shop_layout = get_post_meta( $shop_page_id, 'site-content-layout', true ); } elseif ( is_product_taxonomy() ) { $shop_layout = 'default'; } else { $shop_layout = astra_get_option_meta( 'site-content-layout', '', true ); } if ( 'default' !== $shop_layout && ! empty( $shop_layout ) ) { $layout = $shop_layout; } } return apply_filters( 'astra_get_store_content_layout', $layout ); }
Expand full source code Collapse full source code View on Trac