PATH:
home
/
letacommog
/
aperobusiness
/
wp-content
/
themes
/
deep
/
inc
/
webnus-core
/
shortcodes
<?php function deep_image_carousel( $atts, $content = null ) { extract( shortcode_atts( array( 'image_item_t3' => '', 'image_item' => '', 'item_carousle' => '', 'type' => 'type1', 'shortcodeclass' => '', 'shortcodeid' => '', ), $atts ) ); switch ( $type ) { case 'type1': $style_type = 'type1'; break; case 'type2': $style_type = 'type2'; break; case 'type3': $style_type = 'type3'; break; case 'type4': $style_type = 'type4'; break; } wp_enqueue_style( 'wn-deep-image-carousel0', DEEP_ASSETS_URL . 'css/frontend/image-carousel/image-carousel0.css' ); wp_enqueue_style( 'wn-deep-image-carousel' . $style_type, DEEP_ASSETS_URL . 'css/frontend/image-carousel/image-carousel' . $style_type . '.css' ); $shortcodeclass = $shortcodeclass ? $shortcodeclass : ''; $shortcodeid = $shortcodeid ? ' id="' . $shortcodeid . '"' : ''; include_once ABSPATH . 'wp-admin/includes/plugin.php'; $image_item_data = array(); // Fetch Carousle Item Loop Variables if ( is_plugin_active( 'js_composer/js_composer.php' ) ) { $image_item = (array) vc_param_group_parse_atts( $image_item ); foreach ( $image_item as $data ) { $new_line = $data; $new_line['image'] = isset( $new_line['image'] ) ? $new_line['image'] : ''; $image_item_data[] = $new_line; } } elseif ( is_plugin_active( 'kingcomposer/kingcomposer.php' ) && ( is_array( $image_item ) || is_object( $image_item ) ) ) { foreach ( $atts['image_item'] as $key => $item ) { $new_line = $item; $new_line->image = isset( $new_line->image ) ? $new_line->image : ''; $image_item_data[] = $new_line; } } if ( is_plugin_active( 'js_composer/js_composer.php' ) ) { // Fetch Carousle Item Loop Variables Type3 $image_item_t3 = (array) vc_param_group_parse_atts( $image_item_t3 ); $image_item_t3_data = array(); foreach ( $image_item_t3 as $data ) { $new_line = $data; $new_line['image_t3'] = isset( $new_line['image_t3'] ) ? $new_line['image_t3'] : ''; $new_line['title_t3'] = isset( $new_line['title_t3'] ) ? $new_line['title_t3'] : ''; $image_item_t3_data[] = $new_line; } } elseif ( is_plugin_active( 'kingcomposer/kingcomposer.php' ) && ( is_array( $image_item_t3 ) || is_object( $image_item_t3 ) ) ) { $image_item_t3_data = array(); foreach ( $atts['image_item_t3'] as $key => $data ) { $new_line = $data; $new_line->image_t3 = isset( $new_line->image_t3 ) ? $new_line->image_t3 : ''; $new_line->title_t3 = isset( $new_line->title_t3 ) ? $new_line->title_t3 : ''; $image_item_t3_data[] = $new_line; } } $item_carousle = $item_carousle ? $item_carousle : '3'; // Render if ( $type == 'type1' ) { $out = ' <div class="clearfix ' . $shortcodeclass . '" ' . $shortcodeid . ' > <div class="container"> <div class="w-image-carousel owl-carousel owl-theme" data-items="' . $item_carousle . '" >'; foreach ( $image_item_data as $line ) { if ( is_plugin_active( 'js_composer/js_composer.php' ) ) { $image_info = is_numeric( $line['image'] ) ? wp_get_attachment_metadata( $line['image'] ) : ''; $line['image'] = is_numeric( $line['image'] ) ? wp_get_attachment_url( $line['image'] ) : $line['image']; $line['image'] = $line['image'] ? '<img src="' . $line['image'] . '" alt="' . $image_info['file'] . '">' : ''; $out .= ' <div class="services-carousel"> ' . $line['image'] . ' </div>'; } elseif ( is_plugin_active( 'kingcomposer/kingcomposer.php' ) ) { $image_info = is_numeric( $line->image ) ? wp_get_attachment_metadata( $line->image ) : ''; $line->image = is_numeric( $line->image ) ? wp_get_attachment_url( $line->image ) : $line->image; $line->image = $line->image ? '<img src="' . $line->image . '" alt="' . $image_info['file'] . '">' : ''; $out .= ' <div class="services-carousel"> ' . $line->image . ' </div>'; } } $out .= ' </div> </div> </div>'; } elseif ( $type == 'type2' ) { $out = ' <div class="clearfix ' . $shortcodeclass . '" ' . $shortcodeid . ' > <div class="container"> <div class="wn-vertical-carousel w-image-carousel-type2 owl-carousel owl-theme">'; foreach ( $image_item_data as $line ) { if ( is_plugin_active( 'js_composer/js_composer.php' ) ) { $image_info = is_numeric( $line['image'] ) ? wp_get_attachment_metadata( $line['image'] ) : ''; $line['image'] = is_numeric( $line['image'] ) ? wp_get_attachment_url( $line['image'] ) : $line['image']; $line['image'] = $line['image'] ? '<img src="' . $line['image'] . '" alt="' . $image_info['file'] . '">' : ''; $out .= ' <div class="services-carousel"> ' . $line['image'] . ' </div>'; } elseif ( is_plugin_active( 'kingcomposer/kingcomposer.php' ) ) { $image_info = is_numeric( $line->image ) ? wp_get_attachment_metadata( $line->image ) : ''; $line->image = is_numeric( $line->image ) ? wp_get_attachment_url( $line->image ) : $line->image; $line->image = $line->image ? '<img src="' . $line->image . '" alt="' . $image_info['file'] . '">' : ''; $out .= ' <div class="services-carousel"> ' . $line->image . ' </div>'; } } $out .= ' </div> </div> </div>'; } elseif ( $type == 'type3' ) { $out = ' <div class="clearfix ' . $shortcodeclass . '" ' . $shortcodeid . ' > <div class="container"> <div class="colorb"> <div class="wn-vertical-carousel w-image-carousel-type3 owl-carousel owl-theme">'; foreach ( $image_item_t3_data as $line ) { if ( is_plugin_active( 'js_composer/js_composer.php' ) ) { $image_info = is_numeric( $line['image_t3'] ) ? wp_get_attachment_metadata( $line['image_t3'] ) : ''; $line['image_t3'] = is_numeric( $line['image_t3'] ) ? wp_get_attachment_url( $line['image_t3'] ) : $line['image_t3']; $line['image_t3'] = $line['image_t3'] ? '<img src="' . $line['image_t3'] . '" alt="' . $image_info['file'] . '">' : ''; $out .= ' <div class="services-carousel"> ' . $line['image_t3'] . ' <span class="image-title">' . $line['title_t3'] . '</span> </div>'; } elseif ( is_plugin_active( 'kingcomposer/kingcomposer.php' ) ) { $image_info = is_numeric( $line->image_t3 ) ? wp_get_attachment_metadata( $line->image_t3 ) : ''; $line->image_t3 = is_numeric( $line->image_t3 ) ? wp_get_attachment_url( $line->image_t3 ) : $line->image_t3; $line->image_t3 = $line->image_t3 ? '<img src="' . $line->image_t3 . '" alt="' . $image_info['file'] . '">' : ''; $out .= ' <div class="services-carousel"> ' . $line->image_t3 . ' <span class="image-title">' . $line->title_t3 . '</span> </div>'; } } $out .= ' </div> </div> </div> </div>'; } elseif ( $type == 'type4' ) { $out = ' <div class="clearfix ' . $shortcodeclass . '" ' . $shortcodeid . ' > <div class="container"> <div class="wn-vertical-carousel w-image-carousel-type4 owl-carousel owl-theme">'; foreach ( $image_item_data as $line ) { if ( is_plugin_active( 'js_composer/js_composer.php' ) ) { $image_info = is_numeric( $line['image'] ) ? wp_get_attachment_metadata( $line['image'] ) : ''; $line['image'] = is_numeric( $line['image'] ) ? wp_get_attachment_url( $line['image'] ) : $line['image']; $line['image'] = $line['image'] ? '<img src="' . $line['image'] . '" alt="' . $image_info['file'] . '">' : ''; $out .= ' <div class="services-carousel"> ' . $line['image'] . ' </div>'; } elseif ( is_plugin_active( 'kingcomposer/kingcomposer.php' ) ) { $image_info = is_numeric( $line->image ) ? wp_get_attachment_metadata( $line->image ) : ''; $line->image = is_numeric( $line->image ) ? wp_get_attachment_url( $line->image ) : $line->image; $line->image = $line->image ? '<img src="' . $line->image . '" alt="' . $image_info . '">' : ''; $out .= ' <div class="services-carousel"> ' . $line->image . ' </div>'; } } $out .= ' </div> </div> </div>'; } return $out; } add_shortcode( 'imagecarousel', 'deep_image_carousel' );
[+]
..
[-] video-teaser.php
[edit]
[-] vcw.php
[edit]
[-] sermon-category.php
[edit]
[-] iconbox.php
[edit]
[-] speakers.php
[edit]
[-] iconfonts-param.php
[edit]
[-] checklist-param.php
[edit]
[-] infobox.php
[edit]
[-] webtags.php
[edit]
[-] teaser-box.php
[edit]
[-] latest-from-blog.php
[edit]
[-] reservation.php
[edit]
[-] subscribe.php
[edit]
[-] progressbar.php
[edit]
[-] review-items.php
[edit]
[-] icon-divider.php
[edit]
[-] toggle-box.php
[edit]
[+]
assets
[-] pie.php
[edit]
[-] asermon.php
[edit]
[-] buttons.php
[edit]
[-] accordion.php
[edit]
[-] testimonial-carousel.php
[edit]
[-] deep-gallery.php
[edit]
[-] custom-menu.php
[edit]
[-] postslider.php
[edit]
[-] magazine.php
[edit]
[-] callout.php
[edit]
[-] maxcounter.php
[edit]
[-] testimonialslider.php
[edit]
[-] testimonials.php
[edit]
[-] wp-hotel-booking.php
[edit]
[-] services.php
[edit]
[-] image-carousel.php
[edit]
[-] category-tab.php
[edit]
[-] slide-up-note.php
[edit]
[-] ourteam.php
[edit]
[-] prayerwall-items.php
[edit]
[-] heading.php
[edit]
[-] tablepress.php
[edit]
[-] instagram.php
[edit]
[-] video-play.php
[edit]
[-] columns.php
[edit]
[-] special-offer.php
[edit]
[-] like-view-share.php
[edit]
[-] image-hotspot.php
[edit]
[-] postfromblog.php
[edit]
[-] roadmap.php
[edit]
[-] search.php
[edit]
[-] recipes.php
[edit]
[-] ourclients.php
[edit]
[-] tab.php
[edit]
[-] blog.php
[edit]
[-] icon.php
[edit]
[-] latest-tweets.php
[edit]
[-] before-after-image.php
[edit]
[-] food-menu.php
[edit]
[-] alerts.php
[edit]
[-] login.php
[edit]
[-] pricing-plan.php
[edit]
[-] dropcap.php
[edit]
[-] rooms.php
[edit]
[-] prayerwall-form.php
[edit]
[-] countdown.php
[edit]
[-] lefttab.php
[edit]
[-] schedule.php
[edit]
[-] block-quote.php
[edit]
[-] highlight.php
[edit]
[-] our-process.php
[edit]
[-] w-title.php
[edit]
[-] shop-products.php
[edit]
[-] buy-process.php
[edit]
[-] portfolio-carousel.php
[edit]
[-] causes.php
[edit]
[-] review-form.php
[edit]
[-] pricingtables.php
[edit]
[-] sermons.php
[edit]
[-] distance.php
[edit]
[-] collection.php
[edit]
[-] donate.php
[edit]
[-] googlemap.php
[edit]
[-] list.php
[edit]
[-] acause.php
[edit]
[-] service-carousel.php
[edit]
[-] quote.php
[edit]
[-] w-svg.php
[edit]
[-] tooltip.php
[edit]
[-] socials.php
[edit]
[-] process-carousel.php
[edit]