Ejemplo n.º 1
0
extract(shortcode_atts(array('title' => '', 'images' => '', 'onclick' => '', 'custom_links' => '', 'links_target' => '', 'img_size' => 'full', 'el_class' => ''), $atts));
if ($images == '') {
    return false;
}
$images = explode(',', $images);
if ($el_class) {
    $el_class = ' ' . $el_class;
}
if ($onclick == 'custom_link') {
    $custom_links = explode(',', $custom_links);
}
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_om-logos wpb_content_element' . $el_class, $this->settings['base'], $atts);
echo '<div class="' . $css_class . '">' . wpb_widget_title(array('title' => $title, 'extraclass' => 'vc_om-logos_heading')) . '<div class="vc_om-logos-inner">';
foreach ($images as $i => $id) {
    $src = om_img_any_resize($id, $img_size, false, false);
    if ($src) {
        if (get_option(OM_THEME_PREFIX . 'lazyload') == 'true') {
            $img = '<img width="' . $src[1] . '" height="' . $src[2] . '" src="' . TEMPLATE_DIR_URI . '/img/e.png" data-original="' . $src[0] . '" alt="" class="lazyload" />';
        } else {
            $img = '<img width="' . $src[1] . '" height="' . $src[2] . '" src="' . $src[0] . '" alt=""/>';
        }
        if ($onclick == 'custom_link') {
            if (isset($custom_links[$i])) {
                $img = '<a href="' . esc_attr($custom_links[$i]) . '"' . ($links_target ? ' target="' . $links_target . '"' : '') . '>' . $img . '</a>';
            }
        } elseif ($onclick == 'description') {
            $attachment = get_post($id);
            $href = trim($attachment->post_content);
            if ($href) {
                $img = '<a href="' . esc_attr($href) . '"' . ($links_target ? ' target="' . $links_target . '"' : '') . '>' . $img . '</a>';
Ejemplo n.º 2
0
if ($el_class) {
    $el_class = ' ' . $el_class;
}
$styles = array();
$tag_attributes = array();
$classes = array(apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_om-teaser wpb_content_element' . $el_class, $this->settings['base'], $atts));
if ($align) {
    $classes[] = 'om-t-align-' . $align;
}
$link = $link == '||' ? '' : $link;
$link = vc_build_link($link);
$a_href = $link['url'];
$a_title = $link['title'];
$a_target = $link['target'];
if ($bg_image) {
    $bg_image = om_img_any_resize($bg_image, $img_size, true);
}
if ($text_color) {
    $styles[] = 'color:' . $text_color;
}
$height = intval($height);
echo '<div class="' . implode(' ', $classes) . '"' . (!empty($styles) ? ' style="' . implode(';', $styles) . '"' : '') . '>';
echo '<span class="om-t-bg"' . ($bg_image ? ' style="background-image:url(' . $bg_image . ')"' : '') . '></span>';
echo '<span class="om-t-inner"><span class="om-t-tc-uwrapper"><span class="om-t-tc-wrapper"' . ($height ? ' style="height:' . $height . 'px"' : '') . '><span class="om-t-tc">';
if ($title) {
    echo '<span class="om-t-title">' . $title . '</span>';
}
if ($content) {
    echo '<span class="om-t-content">' . wpb_js_remove_wpautop($content, true) . '</span>';
}
echo '</span></span></span></span>';
Ejemplo n.º 3
0
<?php

$atts = vc_shortcode_attribute_parse(array('content_type' => '', 'align' => '', 'animation' => '', 'img' => '', 'img_size' => '', 'icon_type' => '', 'color' => '', 'custom_color' => '', 'icon_size' => '', 'el_class' => ''), $atts);
extract($atts);
if ($el_class) {
    $el_class = ' ' . $el_class;
}
$classes = array(apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_om-moving-box wpb_content_element' . $el_class, $this->settings['base'], $atts));
$styles = array();
if ($align) {
    $styles[] = 'text-align:' . $align;
}
$content = '';
if ($content_type == 'image' && $img) {
    $src = om_img_any_resize($img, $img_size);
    if ($src) {
        $content = '<img src="' . $src . '" class="om-moving-' . $animation . '" alt="" />';
    }
} elseif ($content_type == 'icon' && $icon_type && isset(${"icon_" . $icon_type})) {
    vc_icon_element_fonts_enqueue($icon_type);
    if ($color == 'om-theme-color') {
        $classes[] = 'om-hl-color';
    } elseif ($color == 'custom') {
        if ($custom_color) {
            $styles[] = 'color:' . $custom_color;
        }
    } else {
        if ($tmp = om_wpb_get_std_color_code($color)) {
            $styles[] = 'color:' . $tmp;
        }
    }
Ejemplo n.º 4
0
$atts = vc_map_get_attributes($this->getShortcode(), $atts);
extract($atts);
if (empty($img_size)) {
    $img_size = 'large';
}
if ($el_class) {
    $el_class = ' ' . $el_class;
}
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_om-person wpb_content_element' . $el_class, $this->settings['base'], $atts);
$css_class .= ' om-person-style-' . $style;
if ($img_round == 'yes') {
    $css_class .= ' om-person-round-img';
}
if ($photo) {
    $src = om_img_any_resize($photo, $img_size, true);
    if ($src) {
        $photo = '<img src="' . $src . '" alt="' . esc_attr($name) . '" />';
    } else {
        $photo = '';
    }
}
$social = '';
if ($email) {
    $social .= '<a href="mailto:' . $email . '"><i class="' . om_icon_classes('fa-envelope') . '"></i></a>';
}
if ($behance) {
    $social .= '<a href="' . $behance . '" target="_blank"><i class="' . om_icon_classes('fa-behance') . '"></i></a>';
}
if ($facebook) {
    $social .= '<a href="' . $facebook . '" target="_blank"><i class="' . om_icon_classes('fa-facebook') . '"></i></a>';