PATH:
home
/
letacommog
/
lavenue
/
wp-content
/
themes
/
deep
/
inc
/
webnus-core
/
shortcodes
<?php function deep_video_play ($atts, $content = null) { extract(shortcode_atts(array( 'img' => '', 'img_alt' => '', 'bottom_text' => '', 'img_width' => '', 'img_height' => '', 'link' => '#', 'img_align' => 'center', 'link_class' => '', 'size' => '', 'color' => '', 'shortcodeclass' => '', 'shortcodeid' => '', ), $atts)); wp_enqueue_style( 'wn-deep-video-play-button', DEEP_ASSETS_URL . 'css/frontend/video-play-button/video-play-button.css' ); $shortcodeclass = $shortcodeclass ? $shortcodeclass : ''; $shortcodeid = $shortcodeid ? ' id="' . $shortcodeid . '"' : ''; // if image is numeric, return image url if( is_numeric( $img ) ) { $image_id = $img; $img = wp_get_attachment_url( $img ); } $style = $live_page_builders_css = ''; static $uniqid = 0; $uniqid++; $fontsize = $size ? ' font-size:' . $size. ';' : ''; $color = $color ? ' color:' . $color. ';' : ''; $img_alt = $img_alt ? $img_alt : ''; $bottom_text = $bottom_text ? $bottom_text : ''; $style .= '.video-play-btn' . $uniqid . ' i { ' . $fontsize . $color . '}'; $link_class = $link_class ? $link_class : '' ; $img_width = $img_width ? $img_width : '' ; $img_height = $img_height ? $img_height : '' ; $bottom_text = $bottom_text ? '<p class="bottom-btn-p">' . $img_alt . '</p>' : '' ; if ( strpos( $link, 'youtu.be' ) == true) { $link = 'https://www.youtube.com/watch?v=' . substr($link, 17 ); } $link = $link ? '<a href="'. esc_url($link) .'" class="wn-popup-video video-play-btn video-play-btn' . $uniqid . ' '. $link_class .'"> <i class="sl-control-play"></i>' . $bottom_text . '</a>' : '' ; if( !empty( $img ) && !empty( $img_width ) && !empty( $img_height ) ) { // if main class not exist get it if ( !class_exists( 'Wn_Img_Maniuplate' ) ) { require_once DEEP_CORE_DIR . 'helper-classes/class_webnus_manuplate.php'; } $image = new Wn_Img_Maniuplate; // instance from settor class $img = $image->m_image( $image_id, $img, $img_width, $img_height ); // set required and get result } $img = $img ? '<img src="' . esc_url( $img ) . '" alt="' . $img_alt . ' ">' : '' ; $out = '<div class="video-play-btn-wrap '. $img_align .' ' . $shortcodeclass . '" ' . $shortcodeid . ' > ' . $img . $link . ' </div>'; deep_save_dyn_styles( $style ); // live editor $live_page_builders_css .= $style; if ( ! in_array( 'admin-bar', get_body_class() ) ) { if ( ! empty( $live_page_builders_css ) ) { $out .= '<style>'; $out .= $live_page_builders_css; $out .= '</style>'; } } return $out; } add_shortcode('videoplay','deep_video_play');
[+]
..
[-] deep-gallery.php
[edit]
[-] process-carousel.php
[edit]
[-] sermons.php
[edit]
[-] progressbar.php
[edit]
[-] distance.php
[edit]
[-] slide-up-note.php
[edit]
[-] schedule.php
[edit]
[-] w-title.php
[edit]
[-] pie.php
[edit]
[-] tablepress.php
[edit]
[-] video-play.php
[edit]
[-] service-carousel.php
[edit]
[-] lefttab.php
[edit]
[-] special-offer.php
[edit]
[-] instagram.php
[edit]
[-] vcw.php
[edit]
[-] testimonials.php
[edit]
[-] socials.php
[edit]
[-] category-tab.php
[edit]
[-] tooltip.php
[edit]
[-] reservation.php
[edit]
[-] postslider.php
[edit]
[-] maxcounter.php
[edit]
[-] video-teaser.php
[edit]
[-] subscribe.php
[edit]
[-] prayerwall-form.php
[edit]
[-] toggle-box.php
[edit]
[-] recipes.php
[edit]
[-] roadmap.php
[edit]
[-] review-items.php
[edit]
[-] dropcap.php
[edit]
[-] accordion.php
[edit]
[-] icon-divider.php
[edit]
[-] like-view-share.php
[edit]
[-] teaser-box.php
[edit]
[-] custom-menu.php
[edit]
[-] portfolio-carousel.php
[edit]
[-] callout.php
[edit]
[-] testimonialslider.php
[edit]
[-] magazine.php
[edit]
[-] prayerwall-items.php
[edit]
[-] donate.php
[edit]
[-] acause.php
[edit]
[-] testimonial-carousel.php
[edit]
[-] highlight.php
[edit]
[-] wp-hotel-booking.php
[edit]
[-] causes.php
[edit]
[-] columns.php
[edit]
[-] w-svg.php
[edit]
[-] shop-products.php
[edit]
[-] icon.php
[edit]
[-] blog.php
[edit]
[-] heading.php
[edit]
[-] ourteam.php
[edit]
[-] quote.php
[edit]
[-] googlemap.php
[edit]
[-] tab.php
[edit]
[-] services.php
[edit]
[-] pricingtables.php
[edit]
[-] collection.php
[edit]
[-] postfromblog.php
[edit]
[-] webtags.php
[edit]
[-] infobox.php
[edit]
[-] image-carousel.php
[edit]
[-] before-after-image.php
[edit]
[-] list.php
[edit]
[-] iconbox.php
[edit]
[-] alerts.php
[edit]
[-] speakers.php
[edit]
[-] latest-from-blog.php
[edit]
[-] block-quote.php
[edit]
[-] rooms.php
[edit]
[-] asermon.php
[edit]
[-] buttons.php
[edit]
[-] checklist-param.php
[edit]
[-] our-process.php
[edit]
[-] image-hotspot.php
[edit]
[-] countdown.php
[edit]
[-] sermon-category.php
[edit]
[-] ourclients.php
[edit]
[-] login.php
[edit]
[-] food-menu.php
[edit]
[-] pricing-plan.php
[edit]
[-] search.php
[edit]
[-] review-form.php
[edit]
[-] iconfonts-param.php
[edit]
[-] buy-process.php
[edit]
[+]
assets
[-] latest-tweets.php
[edit]