'banner-grid-'.rand(), 'class' => '', 'visibility' => '', 'width' => '', 'height' => '600px', 'height__sm' => '', 'height__md' => '', 'spacing' => 'small', 'depth' => '', 'depth_hover' => '', // Depricated 'padding' => '', 'grid' => '', ), $atts ) ); $classes = array('row','row-grid'); if ( $class ) $classes[] = $class; if ( $visibility ) $classes[] = $visibility; // Fix old if($padding == '0px'){ $spacing = 'collapse'; } if($padding == '15px'){ $spacing = 'small'; } if($spacing !== 'normal') $classes[] = 'row-'.$spacing; if($depth) $classes[] = 'row-box-shadow-'.$depth; if($depth_hover) $classes[] = 'row-box-shadow-'.$depth_hover.'-hover'; if($width == 'full-width') $classes[] = 'row-full-width'; // Run masonry script wp_enqueue_script( 'flatsome-masonry-js'); ob_start(); ?> '12', 'span__md' => '', 'span__sm' => '', 'animate' => '', 'height' => '', 'class' => '', 'visibility' => '', 'depth' => '', 'depth_hover' => '', ), $atts ) ); $classes[] = 'col grid-col'; $classes_inner[] = 'col-inner'; if($span__md) $classes[] = 'medium-'.$span__md; if($span__sm) $classes[] = 'small-'.$span__sm; if($span) $classes[] = 'large-'.$span; $classes[] = $height ? 'grid-col-'.$height : 'grid-col-1'; // Add Animation Class if($animate) { $animate = 'data-animate="'.$animate.'"'; } if ( $class ) $classes[] = $class; if ( $visibility ) $classes[] = $visibility; // Add Depth Class if($depth) $classes_inner[] = 'box-shadow-'.$depth; if($depth_hover) $classes_inner[] = 'box-shadow-'.$depth_hover.'-hover'; $classes = implode(" ", $classes); $classes_inner = implode(" ", $classes_inner); $column = '
'.$content.'
'; return do_shortcode( $column ); } add_shortcode('col_grid', 'ux_grid_col');