PATH:
home
/
letacommog
/
aperobusiness
/
wp-content
/
themes
/
deep
/
inc
/
webnus-core
/
shortcodes
<?php function deep_icon_svg ($atts, $content = null) { extract(shortcode_atts(array( 'type' => 'svg', 'svg_img' => '', 'svg_color' => '', 'svg_size' => '', 'svg_align' => 'left', 'svg_link_url' => '', 'link_target' => '', 'shortcodeclass' => '', 'shortcodeid' => '', ), $atts)); include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); $shortcodeclass = $shortcodeclass ? $shortcodeclass : ''; $shortcodeid = $shortcodeid ? ' id="' . $shortcodeid . '"' : ''; $type = $type ? $type : ''; if( is_numeric( $svg_img ) ) $svg_img = wp_get_attachment_url( $svg_img ); static $uniqid = 0; $uniqid++; if ( $link_target == 'true' ){ $link_target_tag = ' target="_blank" '; } else { $link_target_tag = ' target="_self"'; } if ( $type == 'img' ) { $out = '<div class="wn-svg-wrap ' . $shortcodeclass . '" ' . $shortcodeid . ' data-svg="wn-' . $uniqid . '">'; $out .= '<img src="' . $svg_img . '">'; $out .= '</div>'; $style = ''; $style .= $svg_align ? '.wn-svg-wrap[data-svg="wn-' . $uniqid . '"] { text-align: ' . $svg_align . '; }' : ''; $style .= $svg_size ? '.wn-svg-wrap[data-svg="wn-' . $uniqid . '"] img { height: auto; width: ' . $svg_size . '; }' : ''; deep_save_dyn_styles( $style ); } else { $svg = deep_get_file_content( $svg_img ); $svg = find_string( $svg, '<svg', '</svg>' ); $svg = str_replace( 'Layer_1', 'wn-'.$uniqid , $svg ); $out = '<div class="wn-svg-wrap ' . $shortcodeclass . '" ' . $shortcodeid . ' data-svg="wn-' . $uniqid . '">'; if ( !empty( $svg_link_url ) ) { $out .= '<a href="' . $svg_link_url . '" ' . $link_target_tag . '>'; } $out .= '<svg' . $svg . '</svg>'; if ( !empty($svg_link_url) ) { $out .= '</a>'; } $out .= '</div>'; $style = ''; $style .= $svg_align ? '.wn-svg-wrap[data-svg="wn-' . $uniqid . '"] { text-align: ' . $svg_align . '; }' : ''; $style .= $svg_color ? '#wrap .wn-svg-wrap[data-svg="wn-' . $uniqid . '"] svg * { stroke: ' . $svg_color . '; }' : ''; $style .= $svg_size ? '.wn-svg-wrap[data-svg="wn-' . $uniqid . '"] svg { height: auto; width: ' . $svg_size . '; }' : ''; deep_save_dyn_styles( $style ); } return $out; } add_shortcode('icon_svg','deep_icon_svg');
[+]
..
[-] 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]