PATH:
home
/
letacommog
/
aperobusiness
/
wp-content
/
themes
/
deep
/
inc
/
webnus-core
/
shortcodes
<?php function deep_pricing_tables( $attributes, $content = null ) { extract( shortcode_atts( array( 'type' => '1', 'title' => '', 'description' => '', 'price_symbol' => '', 'price' => '$10', 'on_sale_price' => '', 'plan_label' => '', 'label_bg_color' => '', 'period' => 'Month', 'features' => '', 'content_text' => '', 'footer_text' => '', 'button_text' => '', 'button_url' => '', 'featured' => '', 'icon' => '', 'heading_bg_color' => '', 'heading_text_color'=> '', 'link_target' => '', 'shortcodeclass' => '', 'shortcodeid' => '', ), $attributes ) ); wp_enqueue_style( 'wn-deep-pricing-table0', DEEP_ASSETS_URL . 'css/frontend/pricing-table/pricing-table0.css' ); wp_enqueue_style( 'wn-deep-pricing-table' . $type, DEEP_ASSETS_URL . 'css/frontend/pricing-table/pricing-table' . $type . '.css' ); $link_target_tag = ''; if ( $link_target == 'true' ){ $link_target_tag = ' target="_blank" '; } // variables $shortcodeclass = $shortcodeclass ? $shortcodeclass : ''; $shortcodeid = $shortcodeid ? ' id="' . $shortcodeid . '"' : ''; static $uniqid = 0; $uniqid++; $featured = $featured ? ' featured' : ''; $footer_text = $footer_text ? '<p>' . $footer_text . '</p>' : ''; if ( $on_sale_price ) : $temp_price = $price; $price = $on_sale_price; $on_sale_price = '<del>' . $temp_price . '</del>'; endif; if ( $type != '6' ) { $period = $period ? '<small>/' . esc_html( $period ) . '</small>' : ''; }else{ $period = $period ? $period : ''; } // features loop include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); $features_data = array(); $features_out = ''; // Fetch Carousle Item Loop Variables if ( is_plugin_active( 'js_composer/js_composer.php' ) ) { $features = (array) vc_param_group_parse_atts( $features ); foreach ( $features as $data ) : $new_line = $data; $new_line['feature_icon'] = isset( $data['feature_icon'] ) ? $data['feature_icon'] : ''; $new_line['feature_item'] = isset( $data['feature_item'] ) ? $data['feature_item'] : ''; $features_data[] = $new_line; endforeach; $features_out .= '<ul class="pt-features">'; foreach ( $features_data as $line ) : $features_out .= '<li class="feature-item"><span class="feature-icon ' . esc_html( $line['feature_icon'] ) . '"></span>' . esc_html( $line['feature_item'] ) . '</li>'; endforeach; $features_out .= '</ul>'; } elseif ( is_plugin_active( 'kingcomposer/kingcomposer.php' ) && (is_array($features) || is_object($features)) ) { foreach ( $attributes['features'] as $key => $data ) : $new_line = $data; $new_line->feature_icon = isset( $data->feature_icon ) ? $data->feature_icon : ''; $new_line->feature_item = isset( $data->feature_item ) ? $data->feature_item : ''; $features_data[] = $new_line; endforeach; $features_out .= '<ul class="pt-features">'; foreach ( $features_data as $line ) : $features_out .= '<li class="feature-item"><span class="feature-icon ' . esc_html( $line->feature_icon ) . '"></span>' . esc_html( $line->feature_item ) . '</li>'; endforeach; $features_out .= '</ul>'; } // footer cache $background_color = ""; if( $type == '8'){ $background_color = "colorb"; } $footer_out = '<div class="pt-footer">' . $footer_text; if ( !empty( $button_text ) ) { $footer_out .= '<a href="' . esc_url( $button_url ) . '" class="magicmore ' .$background_color. '" '.$link_target_tag.'>' . esc_html( $button_text ) . '</a>'; } $footer_out .= '</div>'; // type6 $style = ''; $pt6_color = $heading_text_color ? ' #wrap .pt-type' . esc_html( $type ) .'.w-pricing-table-' . $uniqid . ' small, #wrap .pt-type' . esc_html( $type ) .'.w-pricing-table-' . $uniqid . ' .plan-title, #wrap .pt-type' . esc_html( $type ) .'.w-pricing-table-' . $uniqid . ' .plan-price{ color:' . $heading_text_color . ';}' : ''; $style .= $pt6_color; $pt6_bg_color = $pt6_bg_border = ''; if ( $heading_bg_color ) : $style .= ' #wrap .w-pricing-table-' . $uniqid . '.pt-type' . esc_html( $type ) . ' .pt-header { background-color: ' . $heading_bg_color . '; }'; $style .= ' #wrap .w-pricing-table-' . $uniqid . '.pt-type' . esc_html( $type ) . ' { border-color: ' . $heading_bg_color . '; } '; endif; // render $out = '<div class="w-pricing-table w-pricing-table-' . $uniqid . ' pt-type' . esc_html( $type ) . esc_html( $featured ) . ' ' . $shortcodeclass . '" ' . $shortcodeid . '>'; switch ( $type ) : case '1': case '3': case '7': case '10': $plan_label = ( $type == 3 && $plan_label ) ? '<span class="plan-label">' . $plan_label . '</span>' : ''; $price_symbol = ( ( $type == 7 || $type == 10 ) && $price_symbol ) ? '<span class="price-symbol">' . esc_html( $price_symbol ) . '</span>': ''; $out .= ' <div class="pt-header"> <h3 class="plan-title">' . esc_html( $title ) . '</h3> <h4 class="plan-price"> ' . $on_sale_price . ' ' . $price_symbol . ' <span>' . esc_html( $price ) . '</span> ' . $period . ' </h4> ' . $plan_label . ' </div> ' . $features_out . ' ' . $footer_out . ''; break; case '2': $out .= ' <span class="icon vc_icon_element-icon ' . $icon . '"></span> <h3 class="plan-title">' . esc_html( $title ) . '</h3> ' . $features_out . ' <h4 class="pt-price"> ' . $on_sale_price . ' <span>' . esc_html( $price ) . '</span> ' . $period . '</h4> ' . $footer_out . ''; break; case '4': $out .= ' <div class="pt-header"> <h3 class="plan-title">' . esc_html( $title ) . '</h3> <h6 class="plan-desc">' . esc_html( $description ) . '</h6> </div> ' . $features_out . ' <div class="pt-price"> <h4 class="plan-price"><span>' . $on_sale_price . esc_html( $price ) . '</span>' . $period . '</h4> </div> ' . $footer_out . ''; break; case '5': $style .= $label_bg_color ? ' .w-pricing-table-' . $uniqid . '.pt-type' . esc_html( $type ) . ' .pt-header > span { background: ' . $label_bg_color . '; }' : '' ; $plan_label = $plan_label ? '<span>' . $plan_label . '</span>' : ''; $out .= ' <div class="pt-header"> ' . $plan_label . ' <h3 class="plan-title">' . esc_html( $title ) . '</h3> <h4 class="plan-price"><span>' . $on_sale_price . esc_html( $price ) . '</span>' . $period . '</h4> </div> ' . $features_out . ' ' . $footer_out . ''; break; case '6': $out .= ' <div class="pt-header"> <h3 class="plan-title">' . esc_html( $title ) . '</h3> <h4 class="plan-price"><span>' . esc_html( $price ) . '</span><small>/' . esc_html( $period ) . '</small></h4> ' . $on_sale_price . ' </div> ' . $features_out . ' ' . $footer_out . ''; break; case '8': $out .= ' <div class="pt-header"> <h3 class="plan-title">' . esc_html( $title ) . '<span class="plan-title-line"></span></h3> <h4 class="plan-price"><span>' . esc_html( $price ) . '</span>' . $period . '</h4> ' . $on_sale_price . ' </div> <div class="pt-content">' . $content_text . '</div> ' . $footer_out . ''; break; case '9': $out .= ' <h3 class="plan-title">' . esc_html( $title ) . '</h3> <h4 class="pt-price"><span>' . esc_html( $price ) . '</span>' . $period . '</h4> ' . $on_sale_price . ' ' . $footer_out . ''; break; endswitch; $out .= '</div>'; deep_save_dyn_styles( $style ); // live editor if ( ! in_array( 'admin-bar', get_body_class() ) ) { if ( ! empty( $style ) ) { $out .= '<style>'; $out .= $style; $out .= '</style>'; } } return $out; } add_shortcode('pricing-tables', 'deep_pricing_tables');
[+]
..
[-] 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]