Astra_LifterLMS::course_responsive_grid( array $classes )
LLMS Resposive grid class.
Description
Parameters
- $classes
-
(array) (Required) Classes.
Return
(array)
Source
File: inc/compatibility/lifterlms/class-astra-lifterlms.php
public function course_responsive_grid( $classes ) { $llms_grid = astra_get_option( 'llms-course-grid' ); if ( in_array( 'llms-membership-list', $classes ) ) { $llms_grid = astra_get_option( 'llms-membership-grid' ); if ( ! empty( $llms_grid['desktop'] ) ) { $default_class = array( 'cols-1', 'cols-2', 'cols-3', 'cols-4', 'cols-5', 'cols-6' ); foreach ( $default_class as $class ) { $index = array_search( $class, $classes ); if ( $index >= 0 ) { unset( $classes[ $index ] ); } } $classes[] = 'cols-' . $llms_grid['desktop']; } } if ( ! empty( $llms_grid['tablet'] ) ) { $classes[] = 'llms-tablet-cols-' . $llms_grid['tablet']; } if ( ! empty( $llms_grid['mobile'] ) ) { $classes[] = 'llms-mobile-cols-' . $llms_grid['mobile']; } return $classes; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.2.0 | Introduced. |