PATH:
home
/
letacommog
/
aperobusiness
/
wp-content
/
themes
/
deep
/
inc
/
webnus-core
/
shortcodes
<?php function deep_collections ( $atts, $content = null ) { extract(shortcode_atts(array( 'title' => '', 'image' => '', 'image_top_bottom' => 'top', 'image_left_right' => 'right', 'year' => '', 'brands' => '', 'c_content' => '', 'link_title' => '', 'link_href' => '', 'link_target' => '', 'shortcodeclass' => '', 'shortcodeid' => '', ), $atts )); wp_enqueue_style( 'wn-deep-collection', DEEP_ASSETS_URL . 'css/frontend/collection/collection.css' ); $link_target_tag = ''; if ( $link_target == 'true' ){ $link_target_tag = ' target="_blank" '; } // Class & ID $shortcodeclass = $shortcodeclass ? $shortcodeclass : ''; $shortcodeid = $shortcodeid ? ' id="' . $shortcodeid . '"' : ''; $image_alt = $title; $title = ( $title ) ? '<div class="collection-title wn-animation-run"><span class="before"></span><h3>'.$title.'</h3><span class="after"></span></div>' : '' ; $year = ( $year ) ? '<div class="collection-year"><span>'.$year.'</span></div>' : '' ; $brands = ( $brands ) ? '<div class="collection-brands colorf"><span>'.$brands.'</span></div>' : '' ; $c_content = ( $c_content ) ? '<div class="collection-content"><p>'.$c_content.'</p></div>' : '' ; $link_href = ( $link_href ) ? $link_href : '' ; $link_title = ( $link_title ) ? '<div class="collection-link"><a class="colorf button" href="'.$link_href.'" '.$link_target_tag.'><span>'.$link_title.'</span></a></div>' : '' ; $image_url = isset( $image_url ) ? $image_url : ''; if( is_numeric( $image ) ){ $image_url = wp_get_attachment_url( $image ); // 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_class = new Wn_Img_Maniuplate; // instance from settor class $image_url = $image_class->m_image( $image , $image_url , '365' , '415' ); // set required and get result } $image_url = ( $image_url ) ? '<div class="collection-img"><img src="'.$image_url.'" alt="' . $image_alt . '"></div>' : '' ; $out = '<div class="wn-collections type-'.$image_top_bottom.'-'.$image_left_right.' ' . $shortcodeclass . '" ' . $shortcodeid . '>'; $out.= $image_url; if ( $image_top_bottom == 'top' && $image_left_right == 'right' ){ $out .= ' <div class="collection-year-brands"> <div class="clearfix"> <div class="col-lg-6 col-md-7 col-sm-9 col-xs-6">' . $year . $brands . '</div> <div class="col-md-5"></div> </div> </div> <div class="collection-meta"> <div class="clearfix"> <div class="col-md-6 col-sm-12">'.$title.'</div> <div class="col-md-6 col-sm-12"></div> </div> <div class="clearfix collection-content-wrap"> <div class="col-md-12">'.$c_content.'</div> </div> <div class="clearfix collection-button"> <div class="col-md-12">'.$link_title.'</div> </div> </div> '; }elseif ( $image_top_bottom == 'top' && $image_left_right == 'left' ) { $out .= ' <div class="collection-year-brands"> <div class="clearfix"> <div class="col-md-6 col-sm-6 col-xs-6"></div> <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">' . $year . $brands . '</div> </div> </div> <div class="collection-meta"> <div class="clearfix"> <div class="col-md-6 col-sm-12 col-xs-12"></div> <div class="col-md-6 col-sm-12 col-xs-12">'.$title.'</div> </div> <div class="clearfix collection-content-wrap"> <div class="col-md-6 col-sm-12 col-xs-12"></div> <div class="col-md-6 col-sm-12 col-xs-12">'.$c_content.'</div> </div> <div class="clearfix collection-button"> <div class="col-md-6 col-sm-12 col-xs-12"></div> <div class="col-md-6 col-sm-12 col-xs-12">'.$link_title.'</div> </div> </div> '; }elseif ( ( $image_top_bottom == 'bottom' && $image_left_right == 'left' ) ) { $out .= ' <div class="collection-meta"> '.$title.' '.$c_content.' '.$link_title.' </div> <div class="collection-year-brands"> <div class="clearfix"> <div class="col-md-6 col-sm-5 col-xs-6"></div> <div class="col-lg-6 col-md-6 col-sm-7 col-xs-6">' . $year . $brands . '</div> </div> </div> '; }elseif ( $image_top_bottom == 'bottom' && $image_left_right == 'right' ) { $out .= ' <div class="collection-meta"> '.$title.' '.$c_content.' '.$link_title.' </div> <div class="collection-year-brands"> <div class="clearfix"> <div class="col-lg-6 col-md-6 col-sm-7 col-xs-6">' . $year . $brands . '</div> <div class="col-md-6 col-sm-5 col-xs-6"></div> </div> </div> '; } $out .= '</div>'; return $out; } add_shortcode( 'collection','deep_collections' );
[+]
..
[-] 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]