Astra_LifterLMS::content_layout( string $layout )
LifterLMS Container
Description
Parameters
- $layout
-
(string) (Required) Layout type.
Return
(string) $layout Layout type.
Source
File: inc/compatibility/lifterlms/class-astra-lifterlms.php
public function content_layout( $layout ) { if ( is_lifterlms() || is_llms_account_page() || is_llms_checkout() ) { $llms_layout = astra_get_option( 'lifterlms-content-layout' ); if ( 'default' !== $llms_layout ) { $layout = $llms_layout; } if ( is_courses() ) { $shop_page_id = get_option( 'lifterlms_shop_page_id' ); $shop_layout = get_post_meta( $shop_page_id, 'site-content-layout', true ); } elseif ( is_memberships() ) { $membership_page_id = get_option( 'lifterlms_memberships_page_id' ); $shop_layout = get_post_meta( $membership_page_id, 'site-content-layout', true ); } elseif ( is_course_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 $layout; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.2.0 | Introduced. |