PATH:
home
/
niazsaze
/
public_html
/
wp-content
/
themes
/
flatsome
/
inc
/
shortcodes
<?php // [ux_banner_grid] function flatsome_banner_grid($atts, $content = null) { extract( shortcode_atts( array( '_id' => '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(); ?> <div class="banner-grid-wrapper"> <div id="<?php echo esc_attr( $_id ); ?>" class="banner-grid <?php echo esc_attr( implode( ' ', $classes ) ); ?>" data-packery-options=""> <?php if(has_shortcode( $content, 'col_grid' ) || has_shortcode( $content, 'col' )) { ?> <?php echo do_shortcode( $content ) ?> <?php } else { // Fix old content $pattern = get_shortcode_regex(); $columns = 0; $current_grid = 0; $grid = flatsome_get_grid($grid); $grid_total = count($grid); flatsome_get_grid_height($height, $_id); if (preg_match_all( '/'. $pattern .'/s', $content, $matches ) && array_key_exists( 2, $matches ) && in_array( 'ux_banner', $matches[2] ) ){ foreach ($matches[0] as $shortcode) { if($grid_total > $current_grid) $current_grid++; $current = $current_grid-1; echo do_shortcode('[col_grid span="'.$grid[$current]['span'].'" span__md="'.$grid[$current]['md'].'" height="'.$grid[$current]['height'].'"]'.$shortcode.'[/col_grid]'); } } } ?> </div> <?php flatsome_get_grid_height(array($height, $height__md, $height__sm), $_id); ?> </div> <?php // Get banner grid styles $content = ob_get_contents(); ob_end_clean(); return $content; } add_shortcode('ux_banner_grid', 'flatsome_banner_grid'); // [col_grid] function ux_grid_col($atts, $content = null) { extract( shortcode_atts( array( 'span' => '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="' . esc_attr( $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 = '<div class="' . esc_attr( $classes ) . '" ' . $animate . '><div class="' . esc_attr( $classes_inner ) . '">' . $content . '</div></div>'; return do_shortcode( $column ); } add_shortcode('col_grid', 'ux_grid_col');
[-] ux_video.php
[edit]
[-] ux_stack.php
[edit]
[-] gap.php
[edit]
[-] ux_payment_icons.php
[edit]
[-] row.php
[edit]
[-] page_header.php
[edit]
[-] ux_slider.php
[edit]
[-] buttons.php
[edit]
[-] scroll_to.php
[edit]
[-] product_flip.php
[edit]
[-] messages.php
[edit]
[-] ux_banner_grid.php
[edit]
[-] tabs.php
[edit]
[-] ux_translation.php
[edit]
[-] ux_banner.php
[edit]
[-] price_table.php
[edit]
[-] ux_products.php
[edit]
[-] ux_html.php
[edit]
[-] ux_pages.php
[edit]
[-] ux_menu_title.php
[edit]
[-] search.php
[edit]
[-] custom-product.php
[edit]
[-] ux_products_list.php
[edit]
[-] ux_lottie.php
[edit]
[-] accordion.php
[edit]
[+]
ux_countdown
[-] featured_box.php
[edit]
[-] titles_dividers.php
[edit]
[-] ux_instagram_feed.php
[edit]
[-] ux_image.php
[edit]
[-] ux_menu_link.php
[edit]
[-] ux_gallery.php
[edit]
[-] google_maps.php
[edit]
[-] ux_sidebar.php
[edit]
[-] portfolio.php
[edit]
[-] product_categories.php
[edit]
[-] follow.php
[edit]
[-] lightbox.php
[edit]
[-] team_members.php
[edit]
[-] testimonials.php
[edit]
[-] blog_posts.php
[edit]
[-] ux_image_box.php
[edit]
[-] ux_logo.php
[edit]
[-] ux_text.php
[edit]
[-] sections.php
[edit]
[-] share.php
[edit]
[-] ux_hotspot.php
[edit]
[+]
..
[-] ux_menu.php
[edit]
[-] ux_nav.php
[edit]
[+]
commons
[-] text_box.php
[edit]