PATH:
home
/
niazsaze
/
public_html
/
wp-content
/
themes
/
flatsome
/
inc
/
shortcodes
<?php // Flatsome Products function ux_product_flip($atts, $content = null, $tag = '' ) { $sliderrandomid = rand(); extract(shortcode_atts(array( '_id' => 'product-flip-'.rand(), 'title' => '', 'ids' => '', 'width' => '', 'slider_nav_style' => 'normal', 'slider_nav_position' => 'outside', 'slider_bullets' => 'true', 'slider_arrows' => 'true', 'auto_slide' => 'false', 'infinitive' => 'true', // posts 'cat' => '', 'excerpt' => 'visible', 'offset' => '', 'filter' => '', // Posts Woo 'products' => '8', 'orderby' => '', // normal, sales, rand, date 'order' => '', 'tags' => '', 'show' => '', //featured, onsale 'depth' => '2', 'depth_hover' => '', ), $atts)); $slide_classes = array('slide'); $slider_classes = array('slide'); if($depth) $slider_classes[] = 'box-shadow-'.$depth; ob_start(); ?> <?php if(empty($ids)){ if ( ! is_array( $atts ) ) { $atts = array(); } // Get products $atts['products'] = $products; $atts['offset'] = $offset; $atts['cat'] = $cat; $products = ux_list_products($atts); } else { // Get custom ids $ids = explode( ',', $ids ); $ids = array_map( 'trim', $ids ); $args = array( 'post__in' => $ids, 'post_type' => 'product', 'numberposts' => -1, 'posts_per_page' => -1, 'orderby' => 'post__in', 'ignore_sticky_posts' => true, ); $products = new WP_Query( $args ); } if ( $products->have_posts() ) : ?> <div class="row"><div class="large-12 col"> <div style="background-color:#FFF;" class="slider flipContainer slider-nav-circle <?php echo esc_attr( implode( ' ', $slider_classes ) );?>" data-flickity-options='{ "cellAlign": "center", "wrapAround": true, "percentPosition": true, "imagesLoaded": true, "pageDots": true, "contain": true }'> <?php while ( $products->have_posts() ) : $products->the_post(); ?> <div class="<?php echo esc_attr( implode( ' ', $slide_classes ) );?>" style="background-color:#FFF;"><?php wc_get_template_part( 'content', 'product-flipbook' ); ?></div> <?php endwhile; // end of the loop. ?> </div> </div></div> <?php endif; wp_reset_query(); $content = ob_get_contents(); ob_end_clean(); return $content; } add_shortcode("ux_product_flip", "ux_product_flip");
[-] 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]