PATH:
home
/
letacommog
/
aperobusiness
/
wp-content
/
themes
/
deep
/
inc
/
webnus-core
/
shortcodes
<?php function deep_our_process_shortcode( $attributes, $content ) { extract( shortcode_atts( array( 'type' => '1', 'process_item' => '', 'process_item_t2' => '', 'process_item_t3' => '', 'shortcodeclass' => '', 'shortcodeid' => '', ), $attributes ) ); wp_enqueue_style( 'wn-deep-our-process' . $type, DEEP_ASSETS_URL . 'css/frontend/our-process/our-process' . $type . '.css' ); // Class & ID $shortcodeclass = $shortcodeclass ? $shortcodeclass : ''; $shortcodeid = $shortcodeid ? ' id="' . $shortcodeid . '"' : ''; include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); $process_item_data = array(); $process_item_data_t2 = array(); $process_item_data_t3 = array(); $style = ''; // Fetch Carousle Item Loop Variables if ( is_plugin_active( 'js_composer/js_composer.php' ) ) { $process_item = (array) vc_param_group_parse_atts( $process_item ); foreach ( $process_item as $data ) : $new_line = $data; $new_line['line_flag'] = isset( $data['line_flag'] ) ? $data['line_flag'] : ''; $new_line['process_title'] = isset( $data['process_title'] ) ? $data['process_title'] : ''; $new_line['process_content'] = isset( $data['process_content'] ) ? $data['process_content'] : ''; $new_line['icon_fontawesome'] = isset( $data['icon_fontawesome'] ) ? $data['icon_fontawesome'] : 'wn-fa wn-fa-adjust'; $process_item_data[] = $new_line; endforeach; // process_item loop type2 $process_item_t2 = (array) vc_param_group_parse_atts( $process_item_t2 ); foreach ( $process_item_t2 as $data ) : $new_line = $data; $new_line['line_flag_t2'] = isset( $data['line_flag_t2'] ) ? $data['line_flag_t2'] : ''; $new_line['process_title_t2'] = isset( $data['process_title_t2'] ) ? $data['process_title_t2'] : ''; $new_line['process_content_t2'] = isset( $data['process_content_t2'] ) ? $data['process_content_t2'] : ''; $process_item_data_t2[] = $new_line; endforeach; // process_item loop type3 $process_item_t3 = (array) vc_param_group_parse_atts( $process_item_t3 ); foreach ( $process_item_t3 as $data ) : $new_line = $data; $new_line['process_title_t3'] = isset( $data['process_title_t3'] ) ? $data['process_title_t3'] : ''; $new_line['process_content_t3'] = isset( $data['process_content_t3'] ) ? $data['process_content_t3'] : ''; $new_line['process_title_top_t3'] = isset( $data['process_title_top_t3'] ) ? $data['process_title_top_t3'] : ''; $new_line['teaser_btn'] = isset( $data['teaser_btn'] ) ? $data['teaser_btn'] : ''; $new_line['link_url'] = isset( $data['link_url'] ) ? $data['link_url'] : ''; $new_line['title_color'] = isset( $data['title_color'] ) ? $data['title_color'] : ''; $new_line['content_color'] = isset( $data['content_color'] ) ? $data['content_color'] : ''; $process_item_data_t3[] = $new_line; endforeach; } elseif ( is_plugin_active( 'kingcomposer/kingcomposer.php' ) ) { if ( is_array($process_item) || is_object($process_item) ){ foreach( $attributes['process_item'] as $key => $data ){ $new_line = $data; $new_line->line_flag = isset( $data->line_flag ) ? $data->line_flag : ''; $new_line->process_title = isset( $data->process_title ) ? $data->process_title : ''; $new_line->process_content = isset( $data->process_content ) ? $data->process_content : ''; $new_line->icon_fontawesome = isset( $data->icon_fontawesome ) ? $data->icon_fontawesome : 'wn-fa wn-fa-adjust'; $process_item_data[] = $new_line; } } if ( is_array($process_item_t2) || is_object($process_item_t2) ){ foreach ( $attributes['process_item_t2'] as $key => $data ) : $new_line = $data; $new_line->line_flag_t2 = isset( $data->line_flag_t2 ) ? $data->line_flag_t2 : ''; $new_line->process_title_t2 = isset( $data->process_title_t2 ) ? $data->process_title_t2 : ''; $new_line->process_content_t2 = isset( $data->process_content_t2 ) ? $data->process_content_t2 : ''; $process_item_data_t2[] = $new_line; endforeach; } if ( is_array($process_item_t3) || is_object($process_item_t3) ){ foreach ( $attributes['process_item_t3'] as $key => $data ) : $new_line = $data; $new_line->process_title_t3 = isset( $data->process_title_t3 ) ? $data->process_title_t3 : ''; $new_line->process_title_top_t3 = isset( $data->process_title_top_t3 ) ? $data->process_title_top_t3 : ''; $new_line->process_content_t3 = isset( $data->process_content_t3 ) ? $data->process_content_t3 : ''; $new_line->link_url = isset( $data->link_url ) ? $data->link_url : ''; $new_line->teaser_btn = isset( $data->teaser_btn ) ? $data->teaser_btn : ''; $process_item_data_t3[] = $new_line; endforeach; } } // render if( $type == '1' ){ $out = '<div class="our-process-wrap ' . $shortcodeclass . '" ' . $shortcodeid . ' >'; if ( is_plugin_active( 'js_composer/js_composer.php' ) ) { foreach ( $process_item_data as $line ) : // Enqueue needed icon font vc_icon_element_fonts_enqueue( 'fontawesome' ); $out .= ' <div class="our-process-item "> <i class="' . esc_attr( $line['icon_fontawesome'] ) . '"></i> <h4>' . $line['process_title'] . '</h4> <p>' . $line['process_content'] . '</p> </div>'; endforeach; } elseif ( is_plugin_active( 'kingcomposer/kingcomposer.php' ) ) { foreach ( $process_item_data as $line ) : // Enqueue needed icon font $out .= ' <div class="our-process-item "> <i class="' . esc_attr( $line->icon_fontawesome ) . '"></i> <h4>' . $line->process_title . '</h4> <p>' . $line->process_content . '</p> </div>'; endforeach; } $out .= '</div>'; } elseif( $type == '2' ){ $out = '<div class= "our-process-wrap-type2 ' . $shortcodeclass . '" ' . $shortcodeid . ' >'; if ( is_plugin_active( 'js_composer/js_composer.php' ) ) { foreach ( $process_item_data_t2 as $line) : $out .= ' <div class="our-process-item-type2"> <span>' . $line['line_flag_t2'] . '</span> <h4>' . $line['process_title_t2'] . '</h4> <p>' . $line['process_content_t2'] . '</p> </div>'; endforeach; } elseif ( is_plugin_active( 'kingcomposer/kingcomposer.php' ) ) { foreach ( $process_item_data_t2 as $line) : $out .= ' <div class="our-process-item-type2"> <span>' . $line->line_flag_t2 . '</span> <h4>' . $line->process_title_t2 . '</h4> <p>' . $line->process_content_t2 . '</p> </div>'; endforeach; } $out .= '</div>'; } elseif( $type == '3' ){ $out = '<div class= "our-process-wrap-type3 ' . $shortcodeclass . '" ' . $shortcodeid . ' >'; if ( is_plugin_active( 'js_composer/js_composer.php' ) ) { static $uniqid = 0; foreach ( $process_item_data_t3 as $line) : $uniqid++; $out .= ' <div class="our-process-item-type3 our-prc-typ3-'. $uniqid .'"> <span>' . $line['process_title_t3'] . '</span> <h4>' . $line['process_title_top_t3'] . '</h4> <p>' . $line['process_content_t3'] . '</p> <a href="' . esc_url( $line['link_url'] ) . '">' . $line['teaser_btn'] . '</a> </div>'; $style .= ! empty ( $line['title_color'] ) ? '.our-process-wrap-type3 .our-prc-typ3-'. $uniqid .' h4 { color: '. $line['title_color'] .';}' : ''; $style .= ! empty ( $line['content_color'] ) ? '.our-process-wrap-type3 .our-prc-typ3-'. $uniqid .' p { color: '. $line['content_color'] .';}' : ''; endforeach; } elseif ( is_plugin_active( 'kingcomposer/kingcomposer.php' ) ) { static $uniqid = 0; foreach ( $process_item_data_t3 as $line) : $uniqid++; $out .= ' <div class= "our-process-item-type3 our-prc-typ3-'. $uniqid .'"> <span>' . $line->process_title_t3 . '</span> <h4>' . $line->process_title_top_t3 . '</h4> <p>' . $line->process_content_t3 . '</p> <a href="' . esc_url( $line->link_url ) . '">' . $line->teaser_btn . '</a> </div>'; endforeach; } $out .= '</div>'; } deep_save_dyn_styles( $style ); // live editor if ( ! in_array( 'admin-bar', get_body_class() ) ) { if ( ! empty( $style ) ) { echo '<style>'; echo $style; echo '</style>'; } } return $out; } add_shortcode( 'our_process', 'deep_our_process_shortcode' );
[+]
..
[-] 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]