コード例 #1
0
ファイル: init.php プロジェクト: adrienlementheour/AliceRouat
    public function content($atts, $content = null)
    {
        # Atts
        $defaults = array('display_type' => '', 'el_class' => '', 'css' => '');
        $atts = vc_shortcode_attribute_parse($defaults, $atts);
        extract($atts);
        # Element Class
        $class = $this->getExtraClass($el_class);
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class, $this->settings['base'], $atts);
        $css_class = "lab-vc-social-networks {$css_class}";
        $css_class .= " display-type-{$display_type}";
        ob_start();
        ?>
		<div class="<?php 
        echo esc_attr($css_class) . vc_shortcode_custom_css_class($css, ' ');
        ?>
">
		<?php 
        echo do_shortcode('[lab_social_networks]');
        ?>
		</div>
		<?php 
        $output = ob_get_clean();
        return $output;
    }
コード例 #2
0
ファイル: vc_pie.php プロジェクト: SayenkoDesign/ividf
<?php

$title = $el_class = $value = $label_value = $units = '';
$atts = vc_shortcode_attribute_parse(array('title' => '', 'el_class' => '', 'value' => '50', 'units' => '', 'color' => 'turquoise', 'label_value' => '', 'custom_color' => '', 'width' => '', 'label_type' => 'number', 'icon_type' => ''), $atts);
extract($atts);
wp_enqueue_script('vc_pie');
$color = trim($color);
$set_back_color = false;
if ($color == 'om-theme-color') {
    $color = get_option(OM_THEME_PREFIX . 'hightlight_color');
    $set_back_color = true;
} elseif ($color == 'custom') {
    $color = $custom_color;
    $set_back_color = true;
}
if (substr($color, 0, 1) == '#') {
    $color = om_rgba2string(om_hex2rgb($color));
}
if (is_numeric($width)) {
    $width .= 'px';
}
$animate_label = 1;
if ($label_type == 'title' || $label_type == 'icon') {
    $animate_label = 0;
}
$vc_pie_chart_value = '';
if ($label_type == 'title') {
    $vc_pie_chart_value = $title;
} elseif ($label_type == 'icon') {
    $iconClass = isset(${"icon_" . $icon_type}) ? ${"icon_" . $icon_type} : '';
    if ($iconClass) {
コード例 #3
0
<?php

$atts = vc_shortcode_attribute_parse(array('title' => '', 'link' => '', 'icon_type' => '', 'el_class' => ''), $atts);
extract($atts);
if ($el_class) {
    $el_class = ' ' . $el_class;
}
$styles = array();
$tag_attributes = array();
$classes = array(apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_om-click-icon-box wpb_content_element' . $el_class, $this->settings['base'], $atts));
$link = $link == '||' ? '' : $link;
$link = vc_build_link($link);
$a_href = $link['url'];
$a_title = $link['title'];
$a_target = $link['target'];
echo '<div class="' . implode(' ', $classes) . '">';
if ($a_href) {
    echo '<a href="' . $a_href . '" title="' . esc_attr($a_title) . '" target="' . $a_target . '">';
}
if ($icon_type && isset(${"icon_" . $icon_type})) {
    vc_icon_element_fonts_enqueue($icon_type);
    echo '<span class="om-cib-icon"><span class="om-cib-icon-inner"><i class="' . ${"icon_" . $icon_type} . '"></i></span><span class="om-cib-icon-inner om-cib-back"><i class="' . ${"icon_" . $icon_type} . '"></i></span></span>';
}
if ($title) {
    echo '<span class="om-cib-title">' . $title . '</span>';
}
if ($content) {
    echo '<span class="om-cib-content">' . wpb_js_remove_wpautop($content, true) . '</span>';
}
if ($a_href) {
    echo '</a>';
コード例 #4
0
ファイル: om_moving_box.php プロジェクト: SayenkoDesign/ividf
<?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;
        }
    }
コード例 #5
0
 * @var string $shape
 * @var string $type
 * @var string $color
 * @var string $css_animation
 * @var string $message_box_type
 * @var string $message_box_style
 * @var string $message_box_shape
 * @var string $message_box_color
 * @var string $icon_type
 */
$defaultFont = 'fontello';
$defaultIconClass = 'icon-info-circled';
//$this->convert..
$atts = $this->convertAttributesToMessageBox2($atts);
$defaults = array('el_class' => '', 'message_box_style' => 'classic', 'style' => 'rounded', 'color' => '', 'message_box_color' => 'alert-info', 'css_animation' => '', 'icon_type' => $defaultFont, 'icon_fontawesome' => $defaultIconClass, 'animation' => '', 'css_animation' => '');
$atts = vc_shortcode_attribute_parse($defaults, $atts);
extract($atts);
$css_anim_class = '';
if ($animation != '') {
    wp_enqueue_script('waypoints');
    $css_anim_class .= " animated {$animation} {$css_animation}";
}
$elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_message_box', $this->settings['base'], $atts), 'style' => 'vc_message_box-' . $message_box_style, 'shape' => 'vc_message_box-' . $style, 'color' => strlen($color) > 0 && strpos('alert', $color) === false ? 'vc_color-' . $color : 'vc_color-' . $message_box_color, 'extra' => $this->getExtraClass($el_class), 'css_animation' => $css_anim_class);
$elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
// Pick up icons
$iconClass = isset(${"icon_" . $icon_type}) ? ${"icon_" . $icon_type} : $defaultIconClass;
switch ($color) {
    case 'info':
        $icon_type = 'fontawesome';
        $iconClass = 'fa fa-info-circle';
        break;
コード例 #6
0
ファイル: om_a_button.php プロジェクト: SayenkoDesign/ividf
<?php

$atts = vc_shortcode_attribute_parse(array('link' => '', 'title' => __('Text on the button', "js_composer"), 'style' => '', 'color' => 'om-theme-color', 'custom_color' => '', 'size' => 'md', 'icon_type' => '', 'el_class' => ''), $atts);
extract($atts);
$classes = array('vc_om_a_button');
if ($el_class) {
    $classes[] = $el_class;
}
$classes[] = 'vc_om-style-' . $style;
$classes[] = 'vc_om-size-' . $size;
$styles = array();
$custom_color_code = '';
if ($color == 'om-theme-color') {
    $classes[] = 'vc_om-om-theme-color';
} elseif ($color == 'custom') {
    if ($custom_color) {
        $custom_color_code = $custom_color;
    }
} else {
    if ($tmp = om_wpb_get_std_color_code($color)) {
        $custom_color_code = $tmp;
    }
}
if ($icon_type && isset(${"icon_" . $icon_type})) {
    vc_icon_element_fonts_enqueue($icon_type);
    $f_icon = '<i class="' . ${"icon_" . $icon_type} . '"></i>';
} else {
    $classes[] = 'vc_om-default-icon';
    $f_icon = '<i class="vc_om-icon"></i>';
}
//parse link
コード例 #7
0
<?php

$atts = vc_shortcode_attribute_parse(array('link' => '', 'icon_type' => '', 'title' => '', 'bg_color' => '', 'bg_custom_color' => '', 'text_color' => '', 'el_class' => ''), $atts);
extract($atts);
if ($el_class) {
    $el_class = ' ' . $el_class;
}
$styles = array();
$classes = array(apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_om-click-icon-box-2 wpb_content_element' . $el_class, $this->settings['base'], $atts));
$link = $link == '||' ? '' : $link;
$link = vc_build_link($link);
$a_href = $link['url'];
$a_title = $link['title'];
$a_target = $link['target'];
if ($bg_color) {
    if ($bg_color == 'om-theme-color') {
        $bg_color = get_option(OM_THEME_PREFIX . 'hightlight_color');
    } 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;
コード例 #8
0
<?php

$atts = vc_shortcode_attribute_parse(array('title' => '', 'title_align' => '', 'align' => 'align_center', 'el_width' => '', 'border_width' => '', 'style' => '', 'color' => '', 'accent_color' => '', 'el_class' => '', 'layout' => 'separator_with_text', 'icon_type' => ''), $atts);
extract($atts);
$class = "vc_separator wpb_content_element";
//$el_width = "90";
//$style = 'double';
//$title = '';
//$color = 'blue';
if ($layout == 'separator_with_icon') {
    $iconClass = isset(${"icon_" . $icon_type}) ? ${"icon_" . $icon_type} : '';
    if ($iconClass) {
        vc_icon_element_fonts_enqueue($icon_type);
        $title = '<i class="' . $iconClass . '"></i>' . $title;
    }
}
$class .= $title_align != '' ? ' vc_' . $title_align : '';
$class .= $el_width != '' ? ' vc_sep_width_' . $el_width : ' vc_sep_width_100';
$class .= $style != '' ? ' vc_sep_' . $style : '';
$class .= $border_width != '' ? ' vc_sep_border_width_' . $border_width : '';
$class .= $align != '' ? ' vc_sep_pos_' . $align : '';
$class .= $layout != '' ? ' vc_' . $layout : '';
if ($color != '' && 'custom' != $color) {
    $class .= ' vc_sep_color_' . $color;
}
$inline_css = 'custom' == $color && $accent_color != '' ? ' style="' . vc_get_css_color('border-color', $accent_color) . '"' : '';
$inline_css_h = 'custom' == $color && $accent_color != '' ? ' style="' . vc_get_css_color('color', $accent_color) . '"' : '';
$class .= $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class, $this->settings['base'], $atts);
?>
<div class="<?php 
コード例 #9
0
ファイル: om_box.php プロジェクト: SayenkoDesign/ividf
<?php

$atts = vc_shortcode_attribute_parse(array('border_width' => '', 'border_style' => '', 'border_color' => '', 'border_custom_color' => '', 'bg_color' => '', 'bg_custom_color' => '', 'bg_image' => '', 'bg_image_pos' => '', 'icon_type' => '', 'icon_style' => '', 'icon_shape' => '', 'text_color' => '', 'height' => '', 'el_class' => ''), $atts);
extract($atts);
if ($el_class) {
    $el_class = ' ' . $el_class;
}
$styles = array();
$classes = array(apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_om-box wpb_content_element' . $el_class, 'om_box', $atts));
$border_width = intval($border_width);
$height = intval($height);
$border_custom_color_code = false;
$bg_custom_color_code = false;
if ($border_width) {
    $classes[] = 'vc_om-with-border';
    $styles[] = 'border-width:' . $border_width . 'px';
}
if ($border_color == 'om-theme-color') {
    $classes[] = 'vc_om-border-om-theme-color';
} elseif ($border_color == 'custom') {
    if ($border_custom_color) {
        $styles[] = 'border-color:' . $border_custom_color;
        $border_custom_color_code = $border_custom_color;
    }
} else {
    if ($tmp = om_wpb_get_std_color_code($border_color)) {
        $border_custom_color_code = $tmp;
        $styles[] = 'border-color:' . $tmp;
    }
}
if ($bg_color) {