PATH:
home
/
letacommog
/
aperobusiness
/
wp-content
/
themes
/
deep
/
inc
/
webnus-core
/
shortcodes
<?php function deep_countdown( $attributes, $content = null ) { extract(shortcode_atts(array( "type" => 'modern', 'datetime' => '', 'done' => '', 'content_color' => '', 'shortcodeclass' => '', 'shortcodeid' => '', ), $attributes)); wp_enqueue_style( 'wn-deep-count-down', DEEP_ASSETS_URL . 'css/frontend/count-down/count-down.css' ); // Class & ID $shortcodeclass = $shortcodeclass ? $shortcodeclass : ''; $shortcodeid = $shortcodeid ? ' id="' . $shortcodeid . '"' : ''; static $uniqid = 0; $uniqid++; if ( is_plugin_active('the-events-calendar/the-events-calendar.php') && $type=='events' ) { $events = tribe_get_events(array('posts_per_page'=>1, 'eventDisplay'=>'list' ) ); foreach($events as $event){ //date_default_timezone_set(get_option('timezone_string')); $data_until = strtotime(tribe_get_start_date($event,false,'d.m.Y H:i')); $data_future = tribe_get_start_date($event,false,'Y/m/d H:i'); } }else{ $data_until = esc_attr(strtotime($datetime)); $data_future = esc_attr($datetime); } $data_done = esc_attr( $done ); if ($type == 'type-4'){ wp_enqueue_script( 'jquery-flipclock', DEEP_ASSETS_URL . 'js/libraries/jquery.flipclock.js', array( 'jquery' ), false, true ); $out = '<div class="countdown-clock" data-future="'.$data_future.'" data-done="'. $data_done .'"></div>'; }else{ if($type=="type-3"){ $label = array( 'day' => esc_html__('DAYS', 'deep'), 'hours' => esc_html__('HRS', 'deep'), 'minutes' => esc_html__('MIN', 'deep'), 'seconds' => esc_html__('SEC', 'deep') ); } else{ $label = array( 'day' => esc_html__('Days', 'deep'), 'hours' => esc_html__('Hours', 'deep'), 'minutes' => esc_html__('Minutes', 'deep'), 'seconds' => esc_html__('Seconds', 'deep') ); } $out = '<div class="countdown-w countdown-w' . $uniqid . ' ctd-' . $type . ' ' . $shortcodeclass . '" ' . $shortcodeid . ' data-until="'. $data_until .'" data-done="'. $data_done .'" data-respond>'; $out .= '<div class="days-w block-w"><i class="icon-w li_calendar"></i><div class="count-w"></div><div class="label-w">'. $label['day'] .'</div></div>'; $out .= '<div class="hours-w block-w"><i class="icon-w wn-far wn-fa-clock"></i><div class="count-w"></div><div class="label-w">'. $label['hours'] .'</div></div>'; $out .= '<div class="minutes-w block-w"><i class="icon-w li_clock"></i><div class="count-w"></div><div class="label-w">'. $label['minutes'] .'</div></div>'; $out .= '<div class="seconds-w block-w"><i class="icon-w wn-far wn-fa-hourglass"></i><div class="count-w"></div><div class="label-w">'. $label['seconds'] .'</div></div>'; $out .= '</div>'; } $style = ''; $style .= ( $content_color ) ? '.countdown-w' . $uniqid . ' { color: ' . $content_color . ' } ': ''; deep_save_dyn_styles( $style ); // live editor $live_page_builders_css = $style; // live editor 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('countdown', 'deep_countdown');
[+]
..
[-] 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]