Exemplo n.º 1
0
// $style = '';
// $txt_align = 'right';
$link = $link == '||' ? '' : $link;
$class .= $position != '' ? ' vc_cta_btn_pos_' . $position : '';
$class .= $el_width != '' ? ' vc_el_width_' . $el_width : '';
$class .= $color != '' ? ' vc_cta_' . $color : '';
$class .= $style != '' ? ' vc_cta_' . $style : '';
$class .= $txt_align != '' ? ' vc_txt_align_' . $txt_align : '';
$inline_css = '';
if ($accent_color != '') {
    $inline_css .= vc_get_css_color('background', $accent_color) . ';';
    if ($style == 'square_outlined') {
        $inline_css .= vc_get_css_color('border-color', $accent_color) . ';';
    }
    $accent_color_l = om_color_lightness($accent_color, 0.03);
    $accent_color_d = om_color_lightness($accent_color, -0.03);
    $inline_css .= 'background:-moz-linear-gradient(left,  ' . $accent_color_d . ' 0%, ' . $accent_color_l . ' 100%);' . 'background:-webkit-gradient(linear, left top, right top, color-stop(0%,' . $accent_color_d . '), color-stop(100%,' . $accent_color_l . '));' . 'background:-webkit-linear-gradient(left,  ' . $accent_color_d . ' 0%,' . $accent_color_l . ' 100%);' . 'background:-ms-linear-gradient(left,  ' . $accent_color_d . ' 0%,' . $accent_color_l . ' 100%);' . 'background:linear-gradient(to right,  ' . $accent_color_d . ' 0%,' . $accent_color_l . ' 100%);';
}
$inline_css .= $text_color != '' ? 'color:' . $text_color . ';' : '';
$button_html = '';
if ($link) {
    $button_html = do_shortcode('[vc_button2 link="' . $link . '" title="' . $title . '" color="' . $color . '" custom_color="' . $btn_custom_color . '" text_color="' . $btn_text_color . '" text_custom_color="' . $btn_text_custom_color . '" icon="' . $icon . '" size="' . $size . '" style="' . $btn_style . '" el_class="vc_cta_btn"]');
    $class .= ' vc_with_btn';
}
$class .= $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class, $this->settings['base'], $atts);
$css_class .= $this->getCSSAnimation($css_animation);
?>
<div<?php 
echo $inline_css ? ' style="' . $inline_css . '"' : '';
?>
Exemplo n.º 2
0
    } elseif ($bg_color == 'custom') {
        if ($bg_custom_color) {
            $bg_color = $bg_custom_color;
        }
    } else {
        if ($tmp = om_wpb_get_std_color_code($bg_color)) {
            $bg_color = $tmp;
        }
    }
}
if (!$bg_color) {
    $bg_color = '#575757';
}
$styles[] = 'background-color:' . $bg_color;
$bg_alt_color = om_color_lightness($bg_color, -0.07000000000000001);
$bg_alt_color2 = om_color_lightness($bg_color, -0.11);
if ($text_color) {
    $styles[] = 'color:' . $text_color;
}
echo '<div class="' . implode(' ', $classes) . '"' . (!empty($styles) ? ' style="' . implode(';', $styles) . '"' : '') . '>';
echo '<div class="om-cib2-corner-hover" style="border-color:' . $bg_alt_color2 . '"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none"><polygon points="-10,0 0,0 100,50 0,100 -10,100" fill="' . $bg_alt_color2 . '" /></svg></div>';
echo '<div class="om-cib2-icon" style="background-color:' . $bg_alt_color . '">';
if ($icon_type && isset(${"icon_" . $icon_type})) {
    vc_icon_element_fonts_enqueue($icon_type);
    echo '<div class="om-cib2-icon-wrapper"><i class="' . ${"icon_" . $icon_type} . '"></i></div>';
}
echo '<div class="om-cib2-corner"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="100%" viewBox="0 0 100 100" preserveAspectRatio="none"><polygon points="-10,0 0,0 100,50 0,100 -10,100" fill="' . $bg_alt_color . '" /></svg></div>';
echo '</div>';
echo '<div class="om-cib2-content">' . ($title != '' ? '<div class="om-cib2-content-title">' . $title . '</div>' : '') . '<div class="om-cib2-content-text">' . wpb_js_remove_wpautop($content, true) . '</div></div>';
if ($a_href) {
    echo '<a href="' . $a_href . '" title="' . esc_attr($a_title) . '" target="' . $a_target . '" class="om-cib2-link"></a>';
Exemplo n.º 3
0
        $icon_html = '<i class="vc_btn3-icon ' . esc_attr($iconClass) . '"' . ($icon_color == 'custom' && $icon_custom_color ? ' style="color:' . $icon_custom_color . '"' : '') . '></i>';
    }
    if ($i_align == 'left') {
        $button_html = $icon_html . ' ' . $button_html;
    } else {
        $button_html .= ' ' . $icon_html;
    }
}
$button_class .= ' vc_btn3-color-' . $color . ' ';
//
$inline_css .= $color == 'custom' && $custom_color && ($style == 'flat' || $style == '3d') ? 'background-color:' . $custom_color . ';' : '';
$inline_css .= $color == 'custom' && $custom_color && ($style == 'flat' || $style == '3d') ? 'background-color:' . $custom_color . ';' : '';
$inline_css .= $color == 'custom' && $custom_color && $style == 'outline' ? 'color:' . $custom_color . ';border-color:' . $custom_color . ';' : '';
$inline_css .= $text_color == 'custom' && $text_custom_color ? 'color:' . $text_custom_color . ' !important;' : '';
if ($style == '3d' && $color == 'custom' && $custom_color) {
    $inline_css .= 'box-shadow:0 5px 0 ' . om_color_lightness($custom_color, -0.15) . ';';
}
//
if ('' != $inline_css) {
    $inline_css = ' style="' . $inline_css . '"';
}
//
$button_class .= $hover_color != '' ? ' vc_btn3-hover-color-' . $hover_color : '';
$attr_data = array();
if ($hover_color == 'custom' && $hover_custom_color && ($style == 'flat' || $style == '3d')) {
    $attr_data['data-hover-bg-color'] = $hover_custom_color;
}
if ($hover_color == 'custom' && $hover_custom_color && $style == 'outline') {
    $attr_data['data-hover-color'] = $attr_data['data-hover-border-color'] = $hover_custom_color;
}
if ($hover_text_color == 'custom' && $hover_text_custom_color) {
Exemplo n.º 4
0
        $icon_type = $iconClass;
    } else {
        $icon_type = false;
    }
}
$class .= $color != '' ? ' vc_btn_' . $color . ' vc_btn-' . $color : '';
$class .= $size != '' ? ' vc_btn_' . $size . ' vc_btn-' . $size : '';
$class .= $style != '' ? ' vc_btn_' . $style : '';
$class .= $hover_color != '' ? ' vc_btn_hover_color-' . $hover_color : '';
$class .= $icon_type ? ' vc_btn_with_icon' : '';
$cssstyle = '';
$cssstyle .= $color == 'custom' && $custom_color && ($style == 'square' || $style == '3d') ? 'background-color:' . $custom_color . ';' : '';
$cssstyle .= $color == 'custom' && $custom_color && $style == 'square_outlined' ? 'color:' . $custom_color . ';border-color:' . $custom_color . ';' : '';
$cssstyle .= $text_color == 'custom' && $text_custom_color ? 'color:' . $text_custom_color . ' !important;' : '';
if ($style == '3d' && $color == 'custom' && $custom_color) {
    $cssstyle .= 'box-shadow:0 5px 0 ' . om_color_lightness($custom_color, -0.15) . ';';
}
if (is_numeric($width)) {
    $width .= 'px';
}
$cssstyle .= $width ? 'width:' . $width . ';' : '';
$attr_data = array();
if ($hover_color == 'custom' && $hover_custom_color && ($style == 'square' || $style == '3d')) {
    $attr_data['data-hover-bg-color'] = $hover_custom_color;
}
if ($hover_color == 'custom' && $hover_custom_color && $style == 'square_outlined') {
    $attr_data['data-hover-color'] = $attr_data['data-hover-border-color'] = $hover_custom_color;
}
if ($hover_text_color == 'custom' && $hover_text_custom_color) {
    $attr_data['data-hover-color'] = $hover_text_custom_color;
}
Exemplo n.º 5
0
// $style = '';
// $txt_align = 'right';
$link = $link == '||' ? '' : $link;
$class .= $add_button != '' ? ' vc_cta_btn_pos_' . $add_button : '';
$class .= $el_width != '' ? ' vc_el_width_' . $el_width : '';
$class .= $color != '' ? ' vc_cta_' . $color : '';
$class .= $style != '' ? ' vc_cta_' . $style : '';
$class .= $txt_align != '' ? ' vc_txt_align_' . $txt_align : '';
$inline_css = '';
if ($custom_background != '') {
    $inline_css .= vc_get_css_color('background', $custom_background) . ';';
    if ($style == 'square_outlined') {
        $inline_css .= vc_get_css_color('border-color', $custom_background) . ';';
    }
    $custom_background_l = om_color_lightness($custom_background, 0.03);
    $custom_background_d = om_color_lightness($custom_background, -0.03);
    $inline_css .= 'background:-moz-linear-gradient(left,  ' . $custom_background_d . ' 0%, ' . $custom_background_l . ' 100%);' . 'background:-webkit-gradient(linear, left top, right top, color-stop(0%,' . $custom_background_d . '), color-stop(100%,' . $custom_background_l . '));' . 'background:-webkit-linear-gradient(left,  ' . $custom_background_d . ' 0%,' . $custom_background_l . ' 100%);' . 'background:-ms-linear-gradient(left,  ' . $custom_background_d . ' 0%,' . $custom_background_l . ' 100%);' . 'background:linear-gradient(to right,  ' . $custom_background_d . ' 0%,' . $custom_background_l . ' 100%);';
}
$inline_css .= $custom_text != '' ? 'color:' . $custom_text . ';' : '';
$button_html = '';
if ($add_button) {
    $btn_atts = '';
    foreach ($atts as $k => $v) {
        if (strpos($k, 'btn_') === 0) {
            $btn_atts .= ' ' . substr($k, 4) . '="' . esc_attr($v) . '"';
        }
    }
    $button_html = do_shortcode('[vc_btn' . $btn_atts . '][/vc_btn]');
    $class .= ' vc_with_btn';
}
$class .= $this->getExtraClass($el_class);