Пример #1
0
function converio_slogan($atts, $content = '')
{
    $output = '<p class="slogan"';
    if (isset($atts['color']) && !empty($atts['color'])) {
        $output .= ' style="color:' . converio_arrangement_shortcode_value($atts['color']) . '"';
    }
    $output .= '>';
    return $output . do_shortcode($content) . '</p>';
}
function converio_animated_milestone($attr, $content = "")
{
    if (isset($attr["value_suffix"]) && !empty($attr["value_suffix"])) {
        $output = "<span>" . converio_arrangement_shortcode_value($attr['value_suffix']) . "</span>";
    } else {
        $output = "";
    }
    return '<div class="animated-milestone" data-value="' . (isset($attr["value"]) ? converio_arrangement_shortcode_value($attr["value"]) : '') . '" data-speed="' . (isset($attr["speed"]) ? converio_arrangement_shortcode_value($attr["speed"]) : '') . '" data-color="' . (isset($attr["color"]) ? converio_arrangement_shortcode_value($attr["color"]) : '') . '">' . $content . $output . '</div>';
}
Пример #3
0
function converio_progress($atts, $content = null)
{
    $percent = '';
    extract(shortcode_atts(array('percent' => ''), $atts));
    $size = '';
    if (isset($atts["size"]) && !empty($atts["size"])) {
        if (converio_arrangement_shortcode_value($atts["size"]) == 'small') {
            $size = ' small';
        }
    }
    return '<p class="progress' . $size . '"><span class="fill" data-width="' . intval($percent) . '"><span><strong>' . $percent . '</strong>' . do_shortcode($content) . '</span></span></p>';
}
Пример #4
0
function converio_header_default($atts, $content = null)
{
    $output = '';
    if (isset($atts["size"]) && !empty($atts["size"])) {
        $output = '<h' . $atts["size"];
        if (isset($atts["color"]) && !empty($atts["color"])) {
            $output .= ' style="' . converio_arrangement_shortcode_value($atts["color"]) . ';"';
        }
        $output .= '>' . do_shortcode($content) . '</h' . $atts["size"] . '>';
    }
    return $output;
}
Пример #5
0
function converio_recent_works($attr, $content = null)
{
    $output = '<div class="page-portfolio"><section class="columns portfolio hp-recent-work content-slider">';
    extract(shortcode_atts(array('title' => 'Recent Works', 'number_posts' => '6', 'number_columns' => '3', 'view_anchor_text' => 'yes', 'headline' => 'yes', 'category_name' => ''), $attr));
    if ($title) {
        $output .= '<h3>' . $title . '</h3>';
    }
    $output .= '<div class="slider-box"><div>';
    $args = array('posts_per_page' => $number_posts, 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'project', 'post_status' => 'publish', 'project-categories' => $category_name, 'suppress_filters' => true, 'meta_key' => '_thumbnail_id');
    $posts_array = get_posts($args);
    if (!empty($posts_array)) {
        foreach ($posts_array as $key_data => $val_data) {
            $output .= '<article class="col col' . converio_arrangement_shortcode_value($number_columns) . '">';
            $output .= '<div>';
            if (has_post_thumbnail($val_data->ID)) {
                $url = wp_get_attachment_image_src(get_post_thumbnail_id($val_data->ID), 'project-thumbnail');
                $output .= '<div class="img">';
                $output .= '<a href="' . get_permalink($val_data->ID) . '">' . get_the_post_thumbnail($val_data->ID, 'project-thumbnail-medium') . '</a>';
                if ($view_anchor_text) {
                    $output .= '<div>';
                    $output .= '<ul>';
                    $output .= '<li><a href="' . $url[0] . '" class="action view" title="' . $val_data->post_title . '">' . $view_anchor_text . '</a></li>';
                    $output .= '</ul> </div>';
                }
                $output .= '</div>';
            }
            if ($headline == 'yes') {
                $categories = get_the_terms($val_data->ID, 'project-categories');
                $output .= '<h3><a href="' . get_permalink($val_data->ID) . '">' . $val_data->post_title . '<br>';
                $output .= '<span>';
                if (is_array($categories)) {
                    foreach ($categories as $category) {
                        $output .= $category->name . ' ';
                    }
                } else {
                    if (is_object($categories)) {
                        $output .= $categories->name;
                    }
                }
                $output .= '</span>';
                $output .= '</a></h3>';
            }
            $output .= '</div>';
            $output .= '</article>';
        }
    }
    $output .= '</div></div></section></div>';
    return $output;
}
Пример #6
0
function converio_lead_block($attr, $content = "")
{
    $output = '<div class="lead-block';
    if (isset($attr["class"]) && !empty($attr["class"])) {
        $output .= ' ' . converio_arrangement_shortcode_value($attr["class"]);
    }
    $output .= '">';
    $output .= isset($attr["title"]) && !empty($attr["title"]) ? '<h2 class="alt">' . converio_arrangement_shortcode_value($attr["title"]) . '</h2>' : '';
    if (isset($attr["text"]) && !empty($attr["text"])) {
        $output .= '<p class="muted">' . converio_arrangement_shortcode_value($attr["text"]) . '</p>';
    }
    $output .= do_shortcode($content);
    $output .= '</div>';
    return $output;
}
Пример #7
0
function converio_divider($atts, $content = '')
{
    $arr_type = array('1', '2');
    $type = '';
    $output = '';
    if (isset($atts['type']) && !empty($atts['type'])) {
        $type = in_array(converio_arrangement_shortcode_value($atts['type']), $arr_type) ? converio_arrangement_shortcode_value($atts['type']) : '1';
    }
    if ($content == '') {
        $output .= '<hr';
        if ($type == '2' || isset($atts['width']) && !empty($atts['width'])) {
            $output .= ' class="';
        }
    } else {
        $output .= '<div class="divider';
    }
    if ($type == '2') {
        if ($content != '') {
            $output .= ' ';
        }
        $output .= 'divider-2';
    }
    if (isset($atts['width']) && !empty($atts['width'])) {
        if (($content != '' or $type == '2') and ($atts['width'] == 'small' or $atts['width'] == 'medium')) {
            $output .= ' ';
        }
        if ($atts['width'] == 'small') {
            $output .= 'divider-sm';
        } else {
            if ($atts['width'] == 'medium') {
                $output .= 'divider-md';
            }
        }
    }
    if ($content == '') {
        if ($type == '2' || isset($atts['width']) && !empty($atts['width'])) {
            $output .= '"';
        }
        $output .= ' />';
    } else {
        $output .= '"><div class="divider-content">';
        $output .= do_shortcode($content);
        $output .= '</div></div>';
    }
    return $output;
}
Пример #8
0
function converio_image($atts, $content = '')
{
    $output = '';
    $output .= '<img';
    if (isset($atts['alt']) && !empty($atts['alt'])) {
        $output .= ' alt="' . converio_arrangement_shortcode_value($atts['alt']) . '"';
    }
    if (isset($atts['url']) && !empty($atts['url'])) {
        $output .= ' src="' . converio_arrangement_shortcode_value($atts['url']) . '"';
    }
    if (isset($atts['width']) && !empty($atts['width'])) {
        $output .= ' width="' . converio_arrangement_shortcode_value($atts['width']) . '"';
    }
    if (isset($atts['height']) && !empty($atts['height'])) {
        $output .= ' height="' . converio_arrangement_shortcode_value($atts['height']) . '"';
    }
    $output .= '/>';
    return apply_filters('converio_filters_image_slider', $output);
}
function converio_animated_circle_chart($atts, $content = '')
{
    $output = '<canvas class="circle-counter"';
    if (isset($atts['width']) && !empty($atts['width'])) {
        $output .= ' width="' . converio_arrangement_shortcode_value($atts['width']) . '"';
    }
    if (isset($atts['height']) && !empty($atts['height'])) {
        $output .= ' height="' . converio_arrangement_shortcode_value($atts['height']) . '"';
    }
    if (isset($atts['percent']) && !empty($atts['percent'])) {
        $output .= ' data-percent="' . converio_arrangement_shortcode_value($atts['percent']) . '"';
    }
    if (isset($atts['color']) && !empty($atts['color'])) {
        $output .= ' data-color="' . converio_arrangement_shortcode_value($atts['color']) . '"';
    }
    $output .= '></canvas>';
    $output .= '<div class="circle-counter-text">' . converio_arrangement_shortcode_value($content) . '</div>';
    return $output;
}
Пример #10
0
function converio_dropcap($atts, $content = null)
{
    $arr_style = array('default', 'circle', 'square');
    $arr_size = array('normal', 'small');
    $size = 'normal';
    $style = 'default';
    if (isset($atts["style"]) && !empty($atts["style"])) {
        if (in_array(converio_arrangement_shortcode_value($atts["style"]), $arr_style)) {
            $style = converio_arrangement_shortcode_value($atts["style"]);
        }
    }
    if (isset($atts["size"]) && !empty($atts["size"])) {
        if (in_array(converio_arrangement_shortcode_value($atts["size"]), $arr_size)) {
            $size = converio_arrangement_shortcode_value($atts["size"]);
        }
    }
    $arr_size_class = array('normal' => 'dc', 'small' => 'dc-small');
    $arr_style_class = array('normal' => array('default' => '', 'circle' => ' dc-circle', 'square' => ' dc-square'), 'small' => array('default' => ' dc-normal-small', 'circle' => ' dc-circle-small', 'square' => ' dc-square-small'));
    $output = '<span class="' . $arr_size_class[$size] . $arr_style_class[$size][$style] . '">' . converio_arrangement_shortcode_value($content) . '</span>';
    return $output;
}
Пример #11
0
function converio_box_colored_alternative($atts, $content = '')
{
    $output = '<div class="box-colored alt"';
    $output .= isset($atts['border_color']) && !empty($atts['border_color']) ? ' style="border-color:' . converio_arrangement_shortcode_value($atts['border_color']) . ';"' : '';
    $output .= '>';
    $output .= '<span class="fa-stack fa-3x"><i class="fa' . (isset($atts['icon']) && !empty($atts['icon']) ? ' ' . converio_arrangement_shortcode_value($atts['icon']) : '') . ' fa-stack-1x fa-inverse fa-radius" style="';
    $output .= '' . (isset($atts['icon_background']) && !empty($atts['icon_background']) ? 'background:' . converio_arrangement_shortcode_value($atts['icon_background']) . ';' : '');
    $output .= '"></i></span>';
    if (isset($atts['title']) && !empty($atts['title'])) {
        $output .= '<h4>' . converio_arrangement_shortcode_value($atts['title']) . '</h4>';
    }
    $output .= do_shortcode($content);
    $output .= '</div>';
    return $output;
}
Пример #12
0
function converio_two_thirds($atts, $content = null)
{
    $output = '';
    remove_all_filters('converio_filters_article_tag');
    if (isset($atts['div']) && $atts['div'] == 'yes') {
        add_filter('converio_filters_article_tag', 'converio_filter_article_div', 10);
    } else {
        add_filter('converio_filters_article_tag', 'converio_filter_article_tag', 10);
    }
    if (has_filter('converio_filters_testimonial_slider', 'converio_filter_testimonial_slider_full', 10)) {
        remove_filter('converio_filters_testimonial_slider', 'converio_filter_testimonial_slider_full', 10);
    }
    add_filter('converio_filters_testimonial_slider', 'converio_filter_testimonial_slider_medium', 10, 2);
    remove_all_filters('converio_filters_team_class');
    $output_content = do_shortcode($content);
    $output .= 'class="col col23' . apply_filters('converio_filters_team_class', '');
    if (isset($atts['class']) && !empty($atts['class'])) {
        $output .= ' ' . converio_arrangement_shortcode_value($atts['class']);
    }
    $output .= '">';
    $output .= $output_content;
    remove_filter('converio_filters_testimonial_slider', 'converio_filter_testimonial_slider_medium', 10);
    add_filter('converio_filters_testimonial_slider', 'converio_filter_testimonial_slider_full', 10, 2);
    $output_filter = apply_filters('converio_filters_article_tag', trim($output));
    return $output_filter;
}
Пример #13
0
function converio_filter_team_member($content, $atts)
{
    add_filter('converio_filters_team_class', 'converio_filter_team_class_default', 10);
    $output = '';
    if (isset($atts['boxed']) && !empty($atts['boxed'])) {
        if (converio_arrangement_shortcode_value($atts['boxed']) == "yes") {
            add_filter('converio_filters_team_class', 'converio_filter_team_class_boxed', 10);
            $output .= '<div>';
        }
    }
    if (isset($atts['circled_image']) && !empty($atts['circled_image'])) {
        if (converio_arrangement_shortcode_value($atts['circled_image']) == "yes") {
            add_filter('converio_filters_team_class', 'converio_filter_team_class_circled', 10);
        }
    }
    if (isset($atts['centered']) && !empty($atts['centered'])) {
        if (converio_arrangement_shortcode_value($atts['centered']) == "yes") {
            add_filter('converio_filters_team_class', 'converio_filter_team_class_centered', 10);
        }
    }
    if (isset($atts['social_vertical']) && !empty($atts['social_vertical'])) {
        if (converio_arrangement_shortcode_value($atts['social_vertical']) == "yes") {
            //link for img start
            if (isset($atts['link']) && !empty($atts['link'])) {
                $output .= '<a href="' . $atts['link'] . '">';
            }
            $output .= '<img';
            if (isset($atts['image_url']) && !empty($atts['image_url'])) {
                $output .= ' src="' . $atts['image_url'] . '"';
            }
            if (isset($atts['image_alt']) && !empty($atts['image_alt'])) {
                $output .= ' alt="' . $atts['image_alt'] . '"';
            }
            $output .= '>';
            //link for img end
            if (isset($atts['link']) && !empty($atts['link'])) {
                $output .= '</a>';
            }
            $output .= '<ul class="social';
            if (isset($atts['social_colored']) && !empty($atts['social_colored'])) {
                if (converio_arrangement_shortcode_value($atts['social_colored']) == "yes") {
                    $output .= ' social-colored';
                }
            }
            $output .= ' vertical">';
            foreach ($atts as $key => $att) {
                if ($key != 'image_url' and $key != 'image_alt' and $key != 'name' and $key != 'position' and $key != 'divider' and $key != 'social_colored' and $key != 'centered' and $key != 'boxed' and $key != 'circled_image' and $key != 'social_vertical') {
                    $class_name = $key;
                    $text_name = ucwords($key);
                    if ($key == 'google') {
                        $class_name = "googleplus";
                        $text_name = "Google+";
                    }
                    if ($key == 'mail') {
                        $class_name = "email";
                        $text_name = "E-mail";
                    }
                    if ($key == 'linkedin') {
                        $text_name = "LinkedIn";
                    }
                    $output .= !empty($att) ? '<li><a href="' . converio_arrangement_shortcode_value($att) . '" class="' . $class_name . '">' . $text_name . '</a></li>' : "";
                }
            }
            $output .= '</ul>';
            $output .= '<h3>' . (isset($atts['name']) && !empty($atts['name']) ? converio_arrangement_shortcode_value($atts['name']) : "") . '</h3>';
            $output .= '<p class="position">' . (isset($atts['position']) && !empty($atts['position']) ? converio_arrangement_shortcode_value($atts['position']) : "") . '</p>';
            if (isset($atts['divider']) && !empty($atts['divider'])) {
                if (converio_arrangement_shortcode_value($atts['divider']) == "yes") {
                    $output .= '<hr>';
                }
            }
            $output .= '<p>' . $content . '</p>';
        } else {
            //link for img start
            if (isset($atts['link']) && !empty($atts['link'])) {
                $output .= '<a href="' . $atts['link'] . '">';
            }
            $output .= '<img';
            if (isset($atts['image_url']) && !empty($atts['image_url'])) {
                $output .= ' src="' . $atts['image_url'] . '"';
            }
            if (isset($atts['image_alt']) && !empty($atts['image_alt'])) {
                $output .= ' alt="' . $atts['image_alt'] . '"';
            }
            $output .= '>';
            //link for img end
            if (isset($atts['link']) && !empty($atts['link'])) {
                $output .= '</a>';
            }
            $output .= '<h3>' . (isset($atts['name']) && !empty($atts['name']) ? converio_arrangement_shortcode_value($atts['name']) : "") . '</h3>';
            $output .= '<p class="position">' . (isset($atts['position']) && !empty($atts['position']) ? converio_arrangement_shortcode_value($atts['position']) : "") . '</p>';
            if (isset($atts['divider']) && !empty($atts['divider'])) {
                if (converio_arrangement_shortcode_value($atts['divider']) == "yes") {
                    $output .= '<hr>';
                }
            }
            $output .= '<ul class="social';
            if (isset($atts['social_colored']) && !empty($atts['social_colored'])) {
                if (converio_arrangement_shortcode_value($atts['social_colored']) == "yes") {
                    $output .= ' social-colored';
                }
            }
            $output .= '">';
            foreach ($atts as $key => $att) {
                if ($key != 'image_url' and $key != 'image_alt' and $key != 'name' and $key != 'position' and $key != 'divider' and $key != 'social_colored' and $key != 'centered' and $key != 'boxed' and $key != 'circled_image' and $key != 'social_vertical') {
                    $output .= !empty($att) ? '<li><a href="' . converio_arrangement_shortcode_value($att) . '" class="' . $key . '">' . ucwords($key) . '</a></li>' : "";
                }
            }
            $output .= '</ul>';
            if ($content != '') {
                $output .= '<p>' . $content . '</p>';
            }
        }
    }
    if (isset($atts['boxed']) && !empty($atts['boxed'])) {
        if (converio_arrangement_shortcode_value($atts['boxed']) == "yes") {
            $output .= "</div>";
        }
    }
    return $output;
}