示例#1
0
 * @var $i_type
 */
$atts = array();
parse_str($data, $atts);
VcShortcodeAutoloader::getInstance()->includeClass('WPBakeryShortCode_VC_Btn');
$vc_btn = new WPBakeryShortCode_VC_Btn(array('base' => 'vc_btn'));
$inline_css = '';
$icon_wrapper = false;
$icon_html = false;
$attributes = array();
/** @var $vc_btn WPBakeryShortCode_VC_Btn */
$atts = vc_map_get_attributes($vc_btn->getShortcode(), $atts);
extract($atts);
//parse link
$class_to_filter = 'vc_btn3-container ' . $vc_btn->getCSSAnimation($css_animation);
$class_to_filter .= vc_shortcode_custom_css_class($css, ' ') . $vc_btn->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $vc_btn->settings('base'), $atts);
$button_class = ' vc_btn3-size-' . $size . ' vc_btn3-shape-' . $shape . ' vc_btn3-style-' . $style;
$button_html = $title;
if ('' === trim($title)) {
    $button_class .= ' vc_btn3-o-empty';
    $button_html = '<span class="vc_btn3-placeholder">&nbsp;</span>';
}
if ('true' === $button_block && 'inline' !== $align) {
    $button_class .= ' vc_btn3-block';
}
if ('true' === $add_icon) {
    $button_class .= ' vc_btn3-icon-' . $i_align;
    vc_icon_element_fonts_enqueue($i_type);
    if (isset(${'i_icon_' . $i_type})) {
        switch ($i_type) {
示例#2
0
 * @var $add_icon
 * @var $i_align
 * @var $i_type
 */
$atts = array();
parse_str($data, $atts);
require_once vc_path_dir('SHORTCODES_DIR', 'vc-btn.php');
$vc_btn = new WPBakeryShortCode_VC_Btn(array('base' => 'vc_btn'));
$defaults = array('style' => 'classic', 'shape' => 'rounded', 'color' => 'grey', 'custom_background' => '', 'custom_text' => '', 'size' => 'md', 'align' => 'inline', 'link' => '', 'url' => '', 'title' => '', 'button_block' => '', 'el_class' => '', 'add_icon' => '', 'add_icon' => '', 'i_align' => 'left', 'i_icon_pixelicons' => '', 'i_type' => 'fontawesome', 'i_icon_fontawesome' => 'fa fa-adjust', 'i_icon_openiconic' => 'vc-oi vc-oi-dial', 'i_icon_typicons' => 'typcn typcn-adjust-brightness', 'i_icon_entypo' => 'entypo-icon entypo-icon-note', 'i_icon_linecons' => 'vc_li vc_li-heart', 'css_animation' => '');
$inline_css = '';
$icon_wrapper = false;
$icon_html = false;
$atts = vc_shortcode_attribute_parse($defaults, $atts);
extract($atts);
//parse link
$el_class = $vc_btn->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' vc_btn3-container ' . $el_class, $vc_btn->settings('base'), $atts);
$css_class .= $vc_btn->getCSSAnimation($css_animation);
$button_class = ' vc_btn3-size-' . $size . ' vc_btn3-shape-' . $shape . ' vc_btn3-style-' . $style;
$button_html = $title;
if ('' == trim($title)) {
    $button_class .= ' vc_btn3-o-empty';
    $button_html = '<span class="vc_btn3-placeholder">&nbsp;</span>';
}
if ('true' === $button_block && 'inline' != $align) {
    $button_class .= ' vc_btn3-block';
}
if ('true' === $add_icon) {
    $button_class .= ' vc_btn3-icon-' . $i_align;
    vc_icon_element_fonts_enqueue($i_type);
    if (isset(${"i_icon_" . $i_type})) {