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;
		}

Changelog

Changelog
Version Description
1.2.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.