Example #1
0
 function cupid_contact_info_shortcode($atts)
 {
     $mobile = $phone = $email = $address = $type = $icon = $title = $html = $el_class = $g5plus_animation = $css_animation = $duration = $delay = $styles_animation = '';
     extract(shortcode_atts(array('type' => 'address', 'icon' => '', 'title' => '', 'address' => '', 'email' => '', 'phone' => '', 'mobile' => '', 'el_class' => '', 'css_animation' => '', 'duration' => '', 'delay' => ''), $atts));
     $g5plus_animation .= ' ' . esc_attr($el_class);
     $g5plus_animation .= g5plus_getCSSAnimation($css_animation);
     $styles_animation = g5plus_getStyleAnimation($duration, $delay);
     $html .= '<div class="cupid-contact-info ' . $g5plus_animation . '" ' . $styles_animation . '>';
     $html .= '<div class="contact-icon"><i class="fa ' . esc_attr($icon) . '"></i></div>';
     $html .= '<h4>' . esc_html($title) . '</h4>';
     $html .= '<div class="contact-info">';
     if ($type == 'address') {
         $html .= '<i class="fa fa-bank"></i><p>' . wp_kses_post($address) . '</p>';
     } else {
         if ($type == 'phone') {
             if ($phone != '') {
                 $html .= '<i class="fa fa-phone"></i><p>' . wp_kses_post($phone) . '</p>';
             }
             if ($mobile != '') {
                 $html .= '<br><i class="fa fa-mobile"></i><p>' . wp_kses_post($mobile) . '</p>';
             }
         } else {
             $html .= '<i class="fa fa-envelope"></i><p>' . wp_kses_post($email) . '</p>';
         }
     }
     $html .= '</div></div>';
     return $html;
 }
Example #2
0
 function cupid_our_staffs_shortcode($atts)
 {
     $item_amount = $column = $html = $el_class = $g5plus_animation = $css_animation = $duration = $delay = $styles_animation = '';
     extract(shortcode_atts(array('column' => '3', 'item_amount' => '10', 'el_class' => '', 'css_animation' => '', 'duration' => '', 'delay' => ''), $atts));
     $g5plus_animation .= ' ' . esc_attr($el_class);
     $g5plus_animation .= g5plus_getCSSAnimation($css_animation);
     $styles_animation = g5plus_getStyleAnimation($duration, $delay);
     $args = array('posts_per_page' => $item_amount, 'post_type' => 'our-staffs', 'orderby' => 'date', 'order' => 'ASC', 'post_status' => 'publish');
     $data = new WP_Query($args);
     if ($data->have_posts()) {
         $html .= '<div class="cupid-our-staffs ' . $g5plus_animation . '" ' . $styles_animation . '>
                    <div class="row">
                     <div class="owl-carousel" data-plugin-options=\'{"items" : ' . $column . ',"itemsDesktop" : [1199,3],"pagination": false, "autoPlay": true}\'>';
         while ($data->have_posts()) {
             $data->the_post();
             $job = get_post_meta(get_the_ID(), 'job', true);
             $image_id = get_post_thumbnail_id();
             $image_url = wp_get_attachment_image($image_id, 'full  img-circle', false, array('alt' => get_the_title(), 'title' => get_the_title()));
             $html .= '<div class="our-staffs-item">
                         <div class="our-staffs-image"><a href="' . get_permalink() . '" title="' . get_the_title() . '" >' . wp_kses_post($image_url) . '</a></div>
                         <a class="our-staffs-name" href="' . get_permalink() . '" title="' . get_the_title() . '" >' . get_the_title() . '</a>
                         <p>' . esc_html($job) . '</p>';
             $html .= '</div>';
         }
         $html .= '</div>
                 </div>
              </div>';
     }
     wp_reset_postdata();
     return $html;
 }
Example #3
0
 function cupid_button_shortcode($atts)
 {
     $link_target = $link = $button_label = $html = $el_class = $g5plus_animation = $css_animation = $duration = $delay = $styles_animation = '';
     extract(shortcode_atts(array('button_label' => '', 'link' => '', 'link_target' => '', 'el_class' => '', 'css_animation' => '', 'duration' => '', 'delay' => ''), $atts));
     $g5plus_animation .= ' ' . esc_attr($el_class);
     $g5plus_animation .= g5plus_getCSSAnimation($css_animation);
     $styles_animation = g5plus_getStyleAnimation($duration, $delay);
     $link_target = $link_target == 'yes' ? '_blank' : '_self';
     $html .= '<a class="cupid-button button-sm' . $g5plus_animation . '" ' . $styles_animation . ' href="' . esc_url($link) . '" target="' . $link_target . '">' . esc_html($button_label) . '</a>';
     return $html;
 }
Example #4
0
 function cupid_introduction_shortcode($atts)
 {
     $text_align = $description = $text = $html = $el_class = $g5plus_animation = $css_animation = $duration = $delay = $styles_animation = '';
     extract(shortcode_atts(array('text' => '', 'description' => '', 'text_align' => 'left', 'el_class' => '', 'css_animation' => '', 'duration' => '', 'delay' => ''), $atts));
     $g5plus_animation .= ' ' . esc_attr($el_class);
     $g5plus_animation .= g5plus_getCSSAnimation($css_animation);
     $styles_animation = g5plus_getStyleAnimation($duration, $delay);
     $html .= '<div class="cupid-introduction ' . $text_align . $g5plus_animation . '" ' . $styles_animation . '>';
     $html .= '<h3>' . wp_kses_post($text) . '</h3>';
     $html .= '<p>' . esc_html($description) . '</p>';
     $html .= '</div>';
     return $html;
 }
Example #5
0
 function cupid_quote_shortcode($atts)
 {
     $subtext = $text = $html = $el_class = $g5plus_animation = $css_animation = $duration = $delay = $styles_animation = '';
     extract(shortcode_atts(array('text' => '', 'subtext' => '', 'el_class' => '', 'css_animation' => '', 'duration' => '', 'delay' => ''), $atts));
     $g5plus_animation .= ' ' . esc_attr($el_class);
     $g5plus_animation .= g5plus_getCSSAnimation($css_animation);
     $styles_animation = g5plus_getStyleAnimation($duration, $delay);
     $html .= '<div class="cupid-quote content-middle ' . $g5plus_animation . '" ' . $styles_animation . '>';
     $html .= '<div class="content-middle-inner">';
     $html .= '<q>' . esc_html($text) . '</q>';
     $html .= '<p>' . esc_html($subtext) . '</p>';
     $html .= '</div></div>';
     return $html;
 }
Example #6
0
 function cupid_heading_shortcode($atts)
 {
     $description = $title = $html = $el_class = $g5plus_animation = $css_animation = $duration = $delay = $styles_animation = '';
     extract(shortcode_atts(array('title' => '', 'description' => '', 'el_class' => '', 'css_animation' => '', 'duration' => '', 'delay' => ''), $atts));
     $g5plus_animation .= ' ' . esc_attr($el_class);
     $g5plus_animation .= g5plus_getCSSAnimation($css_animation);
     $styles_animation = g5plus_getStyleAnimation($duration, $delay);
     $html = '<div class="cupid-heading ' . $g5plus_animation . '" ' . $styles_animation . '>
             <h2>' . wp_kses_post($title) . '</h2>';
     if ($description != '') {
         $html .= '<span>' . esc_html($description) . '</span>';
     }
     $html .= '</div>';
     return $html;
 }
Example #7
0
 function cupid_services_shortcode($atts)
 {
     $link_target = $link = $title = $description = $html = $el_class = $g5plus_animation = $css_animation = $duration = $delay = $styles_animation = '';
     extract(shortcode_atts(array('title' => '', 'description' => '', 'link' => '', 'link_target' => '', 'el_class' => '', 'css_animation' => '', 'duration' => '', 'delay' => ''), $atts));
     $g5plus_animation .= ' ' . esc_attr($el_class);
     $g5plus_animation .= g5plus_getCSSAnimation($css_animation);
     $styles_animation = g5plus_getStyleAnimation($duration, $delay);
     $link_target = $link_target == 'yes' ? '_blank' : '_self';
     $html .= '<div class="cupid-services content-middle ' . $g5plus_animation . '" ' . $styles_animation . '>';
     $html .= '<div class="content-middle-inner">';
     $html .= '<a href="' . esc_url($link) . '" target="' . $link_target . '">' . esc_html($title) . '</a>';
     $html .= '<p>' . esc_html($description) . '</p>';
     $html .= '</div></div>';
     return $html;
 }
Example #8
0
 function cupid_call_action_shortcode($atts)
 {
     $link_target = $link = $button_label = $text = $html = $el_class = $g5plus_animation = $css_animation = $duration = $delay = $styles_animation = '';
     extract(shortcode_atts(array('text' => '', 'button_label' => '', 'link' => '', 'link_target' => '', 'el_class' => '', 'css_animation' => '', 'duration' => '', 'delay' => ''), $atts));
     $g5plus_animation .= ' ' . esc_attr($el_class);
     $g5plus_animation .= g5plus_getCSSAnimation($css_animation);
     $styles_animation = g5plus_getStyleAnimation($duration, $delay);
     $link_target = $link_target == 'yes' ? '_blank' : '_self';
     $html .= '<div class="cupid-call-action ' . $g5plus_animation . ' content-middle" ' . $styles_animation . '>
                     <div class="content-middle-inner">
                         <p>' . wp_kses_post($text) . '
                         <a class="cupid-button button-lg" href="' . esc_url($link) . '" target="' . $link_target . '">' . esc_html($button_label) . '</a></p>
                     </div>
               </div>';
     return $html;
 }
Example #9
0
 function cupid_classes_shortcode($atts)
 {
     $g5plus_animation = $show_paging = $column = $duration = $delay = $item = $css_animation = $el_class = '';
     extract(shortcode_atts(array('column' => '3', 'item' => '6', 'show_paging' => '0', 'css_animation' => '', 'duration' => '', 'delay' => '', 'el_class' => ''), $atts));
     $post_per_page = $item;
     if ($show_paging == '1') {
         $post_per_page = -1;
     }
     $g5plus_animation .= ' ' . esc_attr($el_class);
     $g5plus_animation .= g5plus_getCSSAnimation($css_animation);
     $styles_animation = g5plus_getStyleAnimation($duration, $delay);
     $plugin_path = untrailingslashit(plugin_dir_path(__FILE__));
     $template_path = $plugin_path . '/templates/listing.php';
     ob_start();
     include $template_path;
     $ret = ob_get_contents();
     ob_end_clean();
     return $ret;
 }
Example #10
0
 function cupid_gallery_shortcode($atts)
 {
     $g5plus_animation = $current_page = $load_more = $load_more_style = $column = $duration = $delay = $item = $css_animation = $el_class = '';
     extract(shortcode_atts(array('load_more' => '0', 'load_more_style' => 'load-more-button', 'column' => '3', 'item' => '9', 'css_animation' => '', 'duration' => '', 'delay' => '', 'el_class' => '', 'current_page' => '1'), $atts));
     $post_per_page = -1;
     if ($item != '' || !isset($item)) {
         $post_per_page = $item;
     }
     $offset = ($current_page - 1) * $item;
     $g5plus_animation .= ' ' . esc_attr($el_class);
     $g5plus_animation .= g5plus_getCSSAnimation($css_animation);
     $styles_animation = g5plus_getStyleAnimation($duration, $delay);
     $plugin_path = untrailingslashit(plugin_dir_path(__FILE__));
     $template_path = $plugin_path . '/templates/gallery_template.php';
     ob_start();
     include $template_path;
     $ret = ob_get_contents();
     ob_end_clean();
     return $ret;
 }
Example #11
0
 function cupid_icon_box_shortcode($atts)
 {
     $icon_position = $icon_color = $layout_style = $link = $description = $title = $image = $icon = $html = $el_class = $g5plus_animation = $css_animation = $duration = $delay = $styles_animation = '';
     extract(shortcode_atts(array('layout_style' => 'style1', 'icon' => '', 'icon_color' => '', 'icon_position' => 'left', 'link' => '', 'title' => '', 'description' => '', 'el_class' => '', 'css_animation' => '', 'duration' => '', 'delay' => ''), $atts));
     $number_id = rand(0, 10000) . '-' . rand(0, 10000);
     $g5plus_animation .= ' ' . esc_attr($el_class);
     $g5plus_animation .= g5plus_getCSSAnimation($css_animation);
     $styles_animation = g5plus_getStyleAnimation($duration, $delay);
     if ($layout_style == 'style2') {
         $description = '';
     }
     if ($icon_position != '') {
         $icon_position = ' ' . esc_attr($icon_position);
     }
     $html .= '<div id="icon-box-' . $number_id . '" class="cupid-icon-box ' . esc_attr($layout_style) . $icon_position . $g5plus_animation . '" ' . $styles_animation . '>';
     $html .= '<a href="' . esc_url($link) . '"><i class="fa ' . esc_attr($icon) . '"></i></a>
                       <h4>' . wp_kses_post($title) . '</h4>';
     if ($description != '') {
         $html .= '<p>' . esc_html($description) . '</p>';
     }
     $html .= '</div>';
     if ($icon_color != '') {
         $icon_color = esc_attr($icon_color);
         if ($layout_style == 'style1') {
             $style_css = '#icon-box-' . $number_id . '.cupid-icon-box.style1 a{color: ' . $icon_color . ' !important;}#icon-box-' . $number_id . '.cupid-icon-box.style1 a:hover{background-color: ' . $icon_color . ' !important; color:#FFFFFF !important;}#icon-box-' . $number_id . '.cupid-icon-box.style1:hover a{background-color: ' . $icon_color . ' !important; color:#FFFFFF !important;}#icon-box-' . $number_id . '.cupid-icon-box.style1:hover a:after{border-top: 17px solid ' . $icon_color . ' !important;}';
         } else {
             $style_css = '#icon-box-' . $number_id . '.cupid-icon-box.style2 i{background-color: ' . $icon_color . ' !important;}#icon-box-' . $number_id . '.cupid-icon-box.style2 i:after {-webkit-box-shadow: 0 0 0 2px ' . $icon_color . ' !important;-moz-box-shadow: 0 0 0 2px ' . $icon_color . ' !important;-o-box-shadow: 0 0 0 2px ' . $icon_color . ' !important;-ms-box-shadow: 0 0 0 2px ' . $icon_color . ' !important;box-shadow: 0 0 0 2px ' . $icon_color . ' !important;}';
         }
         $html .= '<script>
                     jQuery(document).ready(function () {
                         jQuery("[data-type=vc_shortcodes-custom-css]").append("' . $style_css . '");
                     });
                  </script>';
     }
     return $html;
 }
Example #12
0
 function cupid_vc_row_inner_shortcode($atts, $content = null)
 {
     $video_link = $css_animation = $duration = $delay = $output = $style_css = $layout = $parallax_style = $parallax_scroll_effect = $parallax_speed = $overlay_set = $overlay_color = $overlay_image = $overlay_opacity = $el_id = $el_class = $bg_image = $bg_color = $bg_image_repeat = $pos = $font_color = $padding = $margin_bottom = $css = '';
     extract(shortcode_atts(array('el_class' => '', 'el_id' => '', 'bg_image' => '', 'bg_color' => '', 'bg_image_repeat' => '', 'font_color' => '', 'padding' => '', 'margin_bottom' => '', 'css' => '', 'layout' => '', 'parallax_style' => 'none', 'video_link' => '', 'parallax_scroll_effect' => '', 'parallax_speed' => '', 'overlay_set' => 'hide_overlay', 'overlay_color' => '', 'overlay_image' => '', 'overlay_opacity' => '', 'css_animation' => '', 'duration' => '', 'delay' => ''), $atts));
     //wp_enqueue_style( 'js_composer_front' );
     wp_enqueue_script('wpb_composer_front_js');
     //wp_enqueue_style( 'js_composer_custom_css' );
     $el_class = g5plus_vc_getExtraClass($el_class);
     $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_row wpb_row vc_inner ' . get_row_css_class() . $el_class . vc_shortcode_custom_css_class($css, ' '), $atts);
     #
     $style = g5plus_vc_buildStyle($bg_image, $bg_color, $bg_image_repeat, $font_color, $padding, $margin_bottom);
     /*************edit**************/
     $str_el_id = '';
     $css_overlay_video = '';
     if ($el_id != '') {
         $str_el_id = 'id="' . esc_attr($el_id) . '"';
     }
     if ($layout == 'boxed') {
         $style_css = 'container';
     } elseif ($layout == 'container-fluid') {
         $style_css = 'container-fluid';
     } else {
         $style_css = 'fullwidth';
     }
     $output .= '<div ' . $str_el_id . ' class="' . $style_css . g5plus_getCSSAnimation($css_animation) . '" ' . g5plus_getStyleAnimation($duration, $delay) . '>';
     if ($parallax_style != 'none' && $parallax_style != 'video-background') {
         if ($overlay_set != 'hide_overlay') {
             $css_overlay_video = ' overlay-wapper';
         }
         $output .= '<div data-parallax_speed="' . esc_attr($parallax_speed) / 100 . '" data-scroll_effect="' . esc_attr($parallax_scroll_effect) . '" class="' . esc_attr($css_class) . ' ' . esc_attr($parallax_style) . $css_overlay_video . '"' . $style . '>';
     } else {
         if ($overlay_set != 'hide_overlay') {
             $css_overlay_video = ' overlay-wapper';
         }
         if ($parallax_style == 'video-background') {
             $css_overlay_video .= ' video-background-wapper';
         }
         $output .= '<div class="' . esc_attr($css_class) . $css_overlay_video . '"' . $style . '>';
     }
     if ($parallax_style == 'video-background') {
         $output .= '<video data-top-default="0" muted="muted" loop="loop" autoplay="true" preload="auto">
                 <source src="' . esc_url($video_link) . '">
             </video>';
     }
     if ($overlay_set != 'hide_overlay') {
         $overlay_id = 'overlay-' . uniqid();
         if ($overlay_set == 'show_overlay_color') {
             $overlay_color = g5plus_hex_to_rgba(esc_attr($overlay_color), esc_attr($overlay_opacity) / 100);
             $style_css = ' data-overlay_color= ' . esc_attr($overlay_color);
         } else {
             if ($overlay_set == 'show_overlay_image') {
                 $image_attributes = wp_get_attachment_image_src($overlay_image, 'full');
                 $style_css = ' data-overlay_image= ' . $image_attributes[0] . ' data-overlay_opacity=' . esc_attr($overlay_opacity) / 100;
             }
         }
         $output .= '<div id="' . $overlay_id . '" class="overlay" ' . $style_css . '></div>';
     }
     $output .= wpb_js_remove_wpautop($content);
     $output .= '</div></div>';
     return $output;
 }
Example #13
0
        function cupid_latest_post($atts)
        {
            $layout_style = $item_amount = $is_slider = $html = $el_class = $g5plus_animation = $css_animation = $duration = $delay = $styles_animation = '';
            extract(shortcode_atts(array('layout_style' => 'style1', 'item_amount' => '10', 'is_slider' => false, 'el_class' => '', 'css_animation' => '', 'duration' => '', 'delay' => ''), $atts));
            global $cupid_archive_loop;
            $column = 3;
            if ($layout_style == 'style2') {
                $column = 2;
                $cupid_archive_loop['image-size'] = 'cupid_square_thumbnail';
            }
            $g5plus_animation .= ' ' . esc_attr($el_class);
            $g5plus_animation .= g5plus_getCSSAnimation($css_animation);
            $r = new WP_Query(apply_filters('shortcode_related_args', array('posts_per_page' => $item_amount, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true, 'orderby' => 'date', 'order' => 'DESC', 'post_type' => 'post', 'tax_query' => array(array('taxonomy' => 'post_format', 'field' => 'slug', 'terms' => array('post-format-quote', 'post-format-link', 'post-format-audio'), 'operator' => 'NOT IN')))));
            ob_start();
            if ($r->have_posts()) {
                ?>
                <div class="latest-post-wrapper">
                    <div class="container">
                        <div class="row">
                                <?php 
                if ($is_slider) {
                    ?>
                                <div  class="latest-post-<?php 
                    echo esc_attr($layout_style);
                    ?>
 latest-post-slider <?php 
                    echo esc_attr($g5plus_animation);
                    ?>
" <?php 
                    echo g5plus_getStyleAnimation($duration, $delay);
                    ?>
>
                                    <div data-plugin-options='{"items" : <?php 
                    echo esc_attr($column);
                    ?>
,"pagination":false }' class="owl-carousel">
                                 <?php 
                } else {
                    ?>
                                        <div  class="latest-post-col-<?php 
                    echo esc_attr($column);
                    ?>
 latest-post-no-slider latest-post-<?php 
                    echo esc_attr($layout_style);
                    ?>
 <?php 
                    echo esc_attr($g5plus_animation);
                    ?>
" <?php 
                    echo g5plus_getStyleAnimation($duration, $delay);
                    ?>
>
                                <?php 
                }
                ?>
                                    <?php 
                while ($r->have_posts()) {
                    $r->the_post();
                    ?>
                                        <?php 
                    get_template_part('content');
                    ?>
                                    <?php 
                }
                ?>

                                <?php 
                if ($is_slider) {
                    ?>
                                    </div>
                                <?php 
                }
                ?>

                            </div>

                        </div>
                    </div>
                </div>
            <?php 
            }
            wp_reset_postdata();
            cupid_archive_loop_reset();
            $content = ob_get_clean();
            return $content;
        }