PATH:
home
/
thebhoeo
/
.trash
/
woodmart
/
inc
/
shortcodes
<?php if ( ! defined( 'WOODMART_THEME_DIR' ) ) exit( 'No direct script access allowed' ); /** * ------------------------------------------------------------------------------------------------ * 3D view - images in 360 slider * ------------------------------------------------------------------------------------------------ */ if( ! function_exists( 'woodmart_shortcode_3d_view' ) ) { function woodmart_shortcode_3d_view( $atts, $content ) { $click = $output = $class = ''; extract( shortcode_atts( array( 'images' => '', 'img_size' => 'full', 'title' => '', 'style' => '', 'el_class' => '', ), $atts ) ); $id = rand( 100, 999 ); $images = explode( ',', $images ); $class .= ' ' . $el_class; $frames_count = count( $images ); if ( $frames_count < 2 ) return; ob_start(); woodmart_enqueue_js_library( 'threesixty' ); woodmart_enqueue_js_script( 'view3d-element' ); woodmart_enqueue_inline_style( '360degree' ); $args = array( 'frames_count' => count( $images ), 'images' => array(), 'width' => '', 'height' => '', ); foreach ( $images as $img_id ) { $img = wp_get_attachment_image_src( $img_id, $img_size ); $args['width'] = isset( $img[1] ) ? $img[1] : ''; $args['height'] = isset( $img[2] ) ? $img[2] : ''; $args['images'][] = isset( $img[0] ) ? $img[0] : ''; } ?> <div class="wd-threed-view<?php echo esc_attr( $class ); ?> threed-id-<?php echo esc_attr( $id ); ?>" data-args='<?php echo wp_json_encode( $args ); ?>'> <?php if ( ! empty( $title ) ): ?> <h3 class="threed-title"><span><?php echo wp_kses( $title, woodmart_get_allowed_html() ); ?></span></h3> <?php endif ?> <ul class="threed-view-images"></ul> <div class="spinner"> <span>0%</span> </div> </div> <?php $output = ob_get_contents(); ob_end_clean(); return $output; } }
[-] categories.php
[edit]
[-] brands.php
[edit]
[-] user-panel.php
[edit]
[-] page-heading.php
[edit]
[-] testimonials.php
[edit]
[-] image-hotspot.php
[edit]
[-] posts-slider.php
[edit]
[-] breadcrumbs.php
[edit]
[-] video.php
[edit]
[-] table.php
[edit]
[-] timeline.php
[edit]
[-] contact-form-7.php
[edit]
[-] product-filters.php
[edit]
[-] marquee.php
[edit]
[-] info-box.php
[edit]
[-] social.php
[edit]
[-] toggle.php
[edit]
[-] row-divider.php
[edit]
[-] title.php
[edit]
[-] images-gallery.php
[edit]
[-] responsive-text-block.php
[edit]
[-] image.php
[edit]
[-] team-member.php
[edit]
[-] accordion.php
[edit]
[-] size-guide.php
[edit]
[-] list.php
[edit]
[-] mailchimp.php
[edit]
[-] text-block.php
[edit]
[-] products-tabs.php
[edit]
[-] ajax-search.php
[edit]
[-] slider.php
[edit]
[-] menu-price.php
[edit]
[-] page-title.php
[edit]
[-] blog.php
[edit]
[-] popup.php
[edit]
[-] twitter.php
[edit]
[-] mega-menu.php
[edit]
[-] sidebar.php
[edit]
[-] instagram.php
[edit]
[+]
..
[-] pricing-tables.php
[edit]
[-] nested-carousel.php
[edit]
[-] compare-images.php
[edit]
[-] tabs.php
[edit]
[-] off-canvas-column-btn.php
[edit]
[-] 3d-view.php
[edit]
[-] google-map.php
[edit]
[-] html-block.php
[edit]
[-] countdown-timer.php
[edit]
[-] gallery.php
[edit]
[-] promo-banner.php
[edit]
[-] button.php
[edit]
[-] portfolio.php
[edit]
[-] products.php
[edit]
[-] extra-menu.php
[edit]
[-] open-street-map.php
[edit]
[-] counter.php
[edit]
[-] author-area.php
[edit]