Astra_Ext_Blog_Pro_Markup::astra_primary_class_blog_grid( array $classes )

Add Blog Grid Class


Description


Parameters

$classes

(array) (Required) Body Class Array.


Return

(array)


Source

File: addons/blog-pro/classes/class-astra-ext-blog-pro-markup.php

		public function astra_primary_class_blog_grid( $classes ) {

			// Apply grid class to archive page.
			if ( ( is_home() ) || is_archive() || is_search() ) {

				$blog_grid        = astra_get_option( 'blog-grid' );
				$blog_grid_layout = astra_get_option( 'blog-grid-layout' );
				$blog_layout      = astra_get_option( 'blog-layout' );
				if ( 'blog-layout-1' == $blog_layout ) {
					$classes[] = 'ast-grid-' . esc_attr( $blog_grid );
				} else {
					$classes[] = 'ast-grid-' . esc_attr( $blog_grid_layout );
				}
				$classes = apply_filters( 'astra_primary_class_blog_grid', $classes );
			}

			return $classes;
		}


User Contributed Notes

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