示例#1
0
 function start_el(&$output, $item, $depth = 0, $args = array(), $current_object_id = 0)
 {
     global $wp_query;
     $item_output = $li_text_block_class = $column_class = "";
     if ($depth === 0) {
         $this->active_megamenu = get_post_meta($item->ID, '_menu_item_brad_is_megamenu', true);
     }
     if ($depth === 1 && $this->active_megamenu) {
         $this->columns++;
         $this->rowsCounter[$this->rows] = $this->columns;
         if ($this->max_columns < $this->columns) {
             $this->max_columns = $this->columns;
         }
         if ($item->brad_megamenu_hide_title != true) {
             $title = apply_filters('the_title', $item->title, $item->ID);
             if ($title != "-" && $title != '"-"') {
                 $menu_brad_icon = !empty($item->brad_megamenu_icon) ? brad_icon($item->brad_megamenu_icon, '', '', false) : '';
                 $attributes = !empty($item->xfn) ? ' rel="' . esc_attr($item->xfn) . '"' : '';
                 $item_output .= $args->before;
                 $item_output .= '<h4 class="brad-megamenu-title"' . $attributes . '>';
                 $item_output .= $menu_brad_icon;
                 $item_output .= $args->link_before . apply_filters('the_title', $item->title, $item->ID) . $args->link_after;
                 $item_output .= '</h4>';
                 $item_output .= $args->after;
             }
         }
         $column_class = ' {current_row_' . $this->rows . '}';
     } else {
         $menu_brad_icon = !empty($item->brad_megamenu_icon) ? brad_icon($item->brad_megamenu_icon, '', '', false) : '';
         $attributes = !empty($item->attr_title) ? ' title="' . esc_attr($item->attr_title) . '"' : '';
         $attributes .= !empty($item->target) ? ' target="' . esc_attr($item->target) . '"' : '';
         $attributes .= !empty($item->xfn) ? ' rel="' . esc_attr($item->xfn) . '"' : '';
         $attributes .= !empty($item->url) ? ' href="' . esc_attr($item->url) . '"' : '';
         $item_output .= $args->before;
         $item_output .= '<a' . $attributes . '>';
         $item_output .= $menu_brad_icon;
         $item_output .= $args->link_before . apply_filters('the_title', $item->title, $item->ID) . $args->link_after;
         $item_output .= '</a>';
         $item_output .= $args->after;
     }
     $indent = $depth ? str_repeat("\t", $depth) : '';
     $class_names = $value = '';
     $classes = empty($item->classes) ? array() : (array) $item->classes;
     $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item));
     $class_names = ' class="' . $li_text_block_class . esc_attr($class_names) . $column_class . '"';
     $id = apply_filters('nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args);
     $id = $id ? ' id="' . esc_attr($id) . '"' : '';
     $output .= $indent . '<li ' . $id . $value . $class_names . '>';
     $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
 }
示例#2
0
<?php

$button_id = rand();
$output = $color = $size = $icon = $target = $href = $title = $position = '';
extract(shortcode_atts(array('style' => 'default', 'color_style' => 'default', 'color' => 'transparent', 'color_hover' => 'transparent', 'acolor' => '#555555', 'acolor_hover' => '#444444', 'bw' => '0', 'bcolor' => 'transparent', 'bcolor_hover' => 'transparent', 'align' => '', 'size' => '', 'br' => 'default', 'icon' => '', 'lb' => 'no', 'icon_style' => '', 'icon_align' => 'right', 'icon_size' => 'normal', 'target' => '_self', 'href' => '', 'icon_c' => '', 'icon_c_hover' => '', 'icon_bc' => '', 'icon_bgc' => '', 'icon_bgc_hover' => '', 'title' => __('Text on the button', "brad-framework"), 'position' => ''), $atts));
$a_class = '';
if ($target == 'same' || $target == '_self') {
    $target = '';
}
$target = $target != '' ? ' target="' . $target . '"' : '';
$icon = $style == 'readmore' ? brad_icon($icon, $icon_style, '', true) : brad_icon($icon, $icon_style, '', false);
if ($style == 'readmore') {
    $class = 'readmore  icon-align-' . $icon_align;
} else {
    $class = 'button button_' . $style . ' button_color_' . $color_style . ' button_' . $size . ' border-radius-' . $br . ' icon-align-' . $icon_align;
}
if ($style == 'custom') {
    $output .= "<style>#brad_button_{$button_id}{color:{$acolor}!important;background-color:{$color};border:" . intval($bw) . "px solid {$bcolor};}#brad_button_{$button_id}:hover{color:{$acolor_hover}!important;background-color:{$color_hover};border-color:{$bcolor_hover};}</style>";
}
if ($style == 'readmore' && ($icon_bc != '' || $icon_c != '' || $icon_c_hover != '' || $icon_bgc != '' || $icon_bgc_hover != '')) {
    $output .= "<style>";
    if ($icon_c_hover != '' || $icon_bgc_hover != "" && ($icon_style == 'style2' || $icon_style == 'style3')) {
        $output .= "#brad_button_{$button_id}:hover .brad-icon{ ";
        if ($icon_c_hover != '') {
            $output .= "color:{$icon_c_hover};";
        }
        if ($icon_bgc_hover != "" && ($icon_style == 'style2' || $icon_style == 'style3')) {
            $output .= "background-color:{$icon_bgc_hover};border-color:{$icon_bgc_hover};";
        }
        $output .= "}";
    }
示例#3
0
<?php

/* Toggle
------------------------------------------------------------*/
$output = $title = $el_class = $open = $css_animation = '';
extract(shortcode_atts(array('title' => __("Click to toggle", "brad-framework"), 'el_class' => '', 'style' => 'style1', 'icon' => '', 'open' => 'false', 'css_animation' => ''), $atts));
$el_class = $this->getExtraClass($el_class);
$open = $open == 'true' ? ' active' : '';
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'toggle ' . $style . '' . $el_class, $this->settings['base']);
$css_class .= $this->getCSSAnimation($css_animation);
$output .= '<div class="' . $css_class . '"><h4 class="toggle-title ' . $open . '"><a href="#">' . brad_icon($icon) . $title . '<span class="plus"></span></a></h4>';
$output .= '<div class="toggle-inner">' . wpb_js_remove_wpautop($content) . '</div></div>' . $this->endBlockComment('toggle') . "\n";
echo $output;
示例#4
0
        }
        $ex_class = $pagination == 'ifscroll' || $pagination == 'loadmore' ? 'posts-with-infinite' : '';
        // Portfolio output starts here..
        $output .= '<div id="portfolio_' . $portfolio_id . '" class="portfolio ' . $ex_class . ' padding-' . $padding . '" ><div class="' . $css_class . '" data-columns="' . $columns . '"  data-animation-delay="' . $css_animation_delay . '" data-animation-effect="' . $css_animation . '" data-masonry-layout="' . $masonry . '">';
        //Build Default argument for portfolio loop
        $args = array('portfolio_style' => $portfolio_style, 'class' => 'span', 'img_size' => $img_size == 'custom' && $custom_img_size != '' ? trim($custom_img_size) : brad_get_img_size($columns, $masonry, $fullwidth), 'show_lb_icon' => $show_lb_icon, 'show_li_icon' => $show_li_icon, 'en_loveit' => $en_loveit, 'disable_li_title' => $disable_li_title, 'show_categories' => $show_categories, 'info_onhover' => $info_onhover);
        while ($portfolios->have_posts()) {
            $portfolios->the_post();
            $output .= brad_portfolio_loop_style1($portfolios, $args);
        }
        $output .= '</div></div>';
        //only included script if portfolio post exists
        $brad_includes['load_isotope'] = true;
        if ($pagination == 'ifscroll' || $pagination == 'loadmore') {
            $output .= '<div id="infinite_scroll_loading" class="clearfix margin-on-' . $padding . ' ' . $portfolio_style . '"></div>';
            $brad_includes['load_infiniteScroll'] = true;
        }
    }
    //End posts if exist;
    if ($pagination == 'default' || $pagination == 'ifscroll' || $pagination == 'loadmore') {
        $p_class = $pagination == 'default' ? '' : 'hidden';
        $output .= brad_pagination($portfolios->max_num_pages, $range = 2, false, $p_class, $portfolios->query_vars['paged']);
    }
    if ($pagination == 'loadmore') {
        $btn_class = !empty($icon) ? 'btn-with-icon' : '';
        $output .= '<p id="load_more" class="sp-container aligncenter"><a  href="#" class="button button_' . $button_style . ' icon-align-right ' . $btn_class . '" title="' . $lm_title . '">' . brad_icon($icon, '', '', false) . '<span>' . $lm_title . '</span></a></p>';
    }
    wp_reset_postdata();
}
$portfolio_id;
echo $output;
示例#5
0
if ($title != '') {
    $ex_class = !empty($icon) ? ' btn-with-icon' : '';
    if ($href != '') {
        $button = '<a class="button ' . $color . $size . $ex_class . '" href="' . $href . '"' . $target . '>' . brad_icon($icon, '', '', false) . '<span>' . $title . '</span></a>';
    } else {
        $button = '<span class="button ' . $color . $size . '">' . brad_icon($icon, '', '', false) . '<span>' . $title . '</span></span>';
    }
} else {
    $button = '';
}
if ($second_title != '') {
    if ($second_href != '') {
        $ex_class = !empty($second_icon) ? ' btn-with-icon' : '';
        $second_button = '<a class="button ' . $second_color . $second_size . $ex_class . '" href="' . $second_href . '"' . $second_target . '>' . brad_icon($second_icon, '', '', false) . '<span>' . $second_title . '</span></a>';
    } else {
        $second_button = '<span class="button ' . $second_color . $second_size . '">' . brad_icon($second_icon, '', '', false) . '<span>' . $second_title . '</span></span>';
    }
} else {
    $second_button = '';
}
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'callout callout-align-' . $align . ' ' . $el_class, $this->settings['base']);
$output .= "\n\t" . '<div class="' . $css_class . '">';
if ($align == 'justify') {
    if ($call_text != '') {
        $output .= '<h3>' . $call_text . '</h3>';
    }
    $output .= $second_button . $button;
} else {
    $output .= '<h3>' . $call_text . $second_button . $button . '</h3>';
}
if ($content != '') {
示例#6
0
<?php

/*Counters
------------------------------------------------*/
$output = $title = $value = $unit = '';
extract(shortcode_atts(array('title' => '', 'value' => '', 'icon' => '', 'css_animation' => '', 'css_animation_delay' => '0', 'unit' => ''), $atts));
$icon = brad_icon($icon);
$output = '<div class="span"><div class="inner-content ' . $this->getCSSAnimation($css_animation) . '" data-animation-delay="' . $css_animation_delay . '" data-animation-effect="' . $css_animation . '"><div class="counter-box-container"><div class="counter-box">';
$output .= '<div class="counter-title">';
$output .= $icon;
$output .= '<span class="counter-value"><span data-percentage="' . trim($value) . '">' . $value . '</span>' . $unit . '</span>';
if ($title != '') {
    $output .= '<div class="hr"><span></span></div><p class="title">' . $title . '</p>';
}
$output .= '</div></div></div></div></div>';
echo $output;
示例#7
0
<?php

$output = '';
extract(shortcode_atts(array('image' => '', 'img_size' => 'full', 'custom_img_size' => '', 'img_align' => 'none', 'img_lightbox' => false, 'icon_lightbox' => '118|ss-air', 'img_link_large' => false, 'img_link' => '', 'img_link_target' => '_self', 'el_class' => '', 'css_animation' => '', 'css_animation_delay' => 0), $atts));
$img_id = preg_replace('/[^\\d]/', '', $image);
if ($custom_img_size != '') {
    $img_size = $custom_img_size;
}
$img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $img_size));
if ($img == NULL) {
    $img['thumbnail'] = '<img src="http://placekitten.com/g/400/300" /> <small>' . __('This is image placeholder, edit your page to replace it.', "brad-framework") . '</small>';
}
$el_class = $this->getExtraClass($el_class);
$link_to = '';
$icon = brad_icon($icon_lightbox);
if ($img_lightbox == 'yes') {
    if ($img_link_large == 'yes') {
        $img_src = wp_get_attachment_image_src($img_id, 'large');
        $link_to = '<a href="' . $img_src[0] . '" class="icon image-lightbox" rel="prettyPhoto[singleImage' . rand() . ']">' . $icon . '</a>';
    } else {
        if (!empty($img_link)) {
            $link_to = '<a href="' . $img_link . '" class="icon image-lightbox" rel="prettyPhoto[singleImage' . rand() . ']">' . $icon . '</a>';
        }
    }
}
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'single-image', $this->settings['base']);
$css_class .= brad_getCSSAnimation($css_animation);
$output .= "\n\t" . '<div class="single-image-container img-align-' . $img_align . ' ' . $el_class . '"><div class="' . $css_class . '" data-animation-delay="' . $css_animation_delay . '" data-animation-effect="' . $css_animation . '">';
$output .= "\n\t\t" . $img['thumbnail'];
$output .= "\n\t\t\t" . $link_to;
$output .= "\n\t" . '</div></div>' . $this->endBlockComment('.image');
示例#8
0
<?php

global $brad_data;
extract(shortcode_atts(array("value" => '50', "size" => '220', "color" => '#555555', 'scales' => 'no', 'scalecolor' => '#777777', 'corner_type' => 'square', 'speed' => 1500, "label_value" => '', 'inverse' => 'no', "icon" => '', "align" => 'aligncenter', "" => "", "el_class" => '', "track_color" => '', "bar_color" => ''), $atts));
$el_class = $this->getExtraClass($el_class);
$output = $style = $linewidth = '';
$bar_color = $bar_color != '' ? $bar_color : $brad_data['color_primary'];
$track_color = $track_color != '' ? $track_color : '#f4f4f4';
$size_m = intval($size) > 0 ? intval($size) / 220 : 1;
$linewidth = 10 * $size_m;
$fontsize = 40 * $size_m;
$style .= "font-size:{$fontsize}px;height:{$size}px;width:{$size}px;line-height:{$size}px;color:{$color}";
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' chart-shortcode  ' . $align . '"  data-percent="0" data-animatepercent="' . $value . '" data-size="' . $size . '" data-line-width="' . $linewidth . '" data-scales=' . $scales . ' data-inverse="' . $inverse . '" data-speed="' . $speed . '" data-barcolor="' . $bar_color . '" data-corner-type="' . $corner_type . '"  data-scalecolor="' . $scalecolor . '" data-trackcolor="' . $track_color . '"' . $el_class, $this->settings['base']);
$output = "\n\t" . '<div class="' . $css_class . '" style="' . $style . '">';
if ($label_value != '') {
    $output .= $label_value;
} else {
    if ($icon != '') {
        $output .= brad_icon($icon, '', '', false);
    }
}
$output .= "\n\t" . '</div>' . $this->endBlockComment('Pie chart') . "\n";
echo $output;
示例#9
0
<?php

extract(shortcode_atts(array('type' => 'h1', 'icon' => '', 'style' => '', 'color' => 'default', 'align' => 'left', 'title' => 'Your title here', 'margin_bottom' => '20px', 'divider_color' => 'dark', 'bw' => 'default', 'bc' => 'default', 'divider_height' => 'default', 'divider_width' => 'default'), $atts));
$output = "\n\t" . '<' . $type . ' class="title text' . $align . ' ' . $style . ' bw-' . $bw . 'px dh-' . $divider_height . 'px  divider-' . $divider_color . ' bc-' . $bc . '  dw-' . $divider_width . ' color-' . $color . '" style="margin-bottom:' . $margin_bottom . 'px">';
$output .= '<span>' . $title . brad_icon($icon, '', '', false) . '</span>';
$output .= "\n\t" . '</' . $type . '>' . $this->endBlockComment('heading') . "\n";
echo $output;
示例#10
0
    $el_class1 = brad_getCSSAnimation($css_animation);
    $el_class2 = '';
} else {
    $el_class1 = '';
    $el_class2 = brad_getCSSAnimation($css_animation);
}
if ($image != "") {
    $img_id = preg_replace('/[^\\d]/', '', $image);
    $img_src = wp_get_attachment_image_src($img_id, '');
    $before_title = '<span class="brad-icon ' . $el_class1 . ' image" data-animation-delay="' . $css_animation_delay . '" data-animation-effect="' . $css_animation . '"><img src="' . $img_src[0] . '" alt="" /></span>';
} else {
    if ($text != '') {
        $before_title = '<span class="brad-icon icon-text ' . $el_class1 . '" data-animation-delay="' . $css_animation_delay . '" data-animation-effect="' . $css_animation . '">' . $text . '</span>';
    } else {
        if ($icon != "") {
            $before_title = brad_icon($icon, $el_class1, '', true, 'data-animation-delay="' . $css_animation_delay . '" data-animation-effect="' . $css_animation . '"');
        }
    }
}
$ex_class = empty($content) ? 'no-content' : '';
if ($feature_link != '') {
    $fe_before = '<a href="' . $feature_link . '" target="' . $ftarget . '" >';
    $fe_after = '</a>';
}
if ($title_link != '' && empty($feature_link)) {
    $tl_before = '<a href="' . $title_link . '" target="' . $ttarget . '">';
    $tl_after = '</a>';
}
$output = '<div class="span"><div class="inner-content ' . $el_class2 . '" data-animation-delay="' . $css_animation_delay . '" data-animation-effect="' . $css_animation . '">' . $fe_before . '<div class="feature_box ' . $ex_class . '">';
$output .= $before_title;
if (empty($title_heading)) {
示例#11
0
<?php

$output = '';
extract(shortcode_atts(array('type' => 'large', 'dh' => '2', 'align' => 'center', 'color' => 'dark', 'icon' => '', 'margin_top' => 2, 'margin_bottom' => 25), $atts));
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'hr border-' . $type . ' dh-' . $dh . 'px align' . $align . ' hr-border-' . $color . '', $this->settings['base']);
if ($icon != '') {
    $css_class .= ' hr-with-icon';
}
$style = "margin-top:{$margin_top}px;margin-bottom:{$margin_bottom}px;";
$output .= '<div  class="' . $css_class . '" style="' . $style . '"><span>' . brad_icon($icon, '', '', false) . '</span></div>' . $this->endBlockComment('separator') . "\n";
echo $output;
示例#12
0
<?php

$output = '';
extract(shortcode_atts(array('title' => __('Section', 'brad'), 'icon' => '', 'el_class' => ''), $atts));
$el_class = $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'accordion ' . $el_class . ' not-column-inherit', $this->settings['base']);
$output .= "\n\t" . '<div class="' . $css_class . '">';
//data-interval="'.$interval.'"
$output .= "\n\t\t" . '<h4 class="accordion-title"><a href="#">' . brad_icon($icon) . $title . '<span class="plus"></span></a></h4>';
$output .= "\n\t\t\t" . '<div class="accordion-inner">' . wpb_js_remove_wpautop($content) . '</div>';
$output .= "\n\t" . '</div> ' . $this->endBlockComment('.accordion');
echo $output;
示例#13
0
function brad_single_icon($atts, $content)
{
    extract(shortcode_atts(array('icon' => '', 'url' => '#', 'title' => '', 'target' => '_blank'), $atts));
    return "\n\t" . '<li><a href="' . $url . '" title="' . $title . '" target="' . $target . '">' . brad_icon($icon, '', '', false) . '</a></li>';
}
示例#14
0
}
$ex_class = $content != '' || $title_flip != '' ? 'yes' : 'no';
$ex_class1 = intval($height) > 0 ? ' style="min-height:' . intval($height) . 'px;height:' . intval($height) . 'px;"' : '';
$output = '<div class="service-box flip-' . $ex_class . ' hoverlay"><div class="front-content" style="' . $front_style . '"><div ' . $ex_class1 . '><div>';
if ($icon != "") {
    $i_style .= " -webkit-border-radius:{$icon_radius};-moz-border-radius:{$icon_radius};border-radius:{$icon_radius};";
    if ($icon_c != '') {
        $i_style .= "color:{$icon_c};";
    }
    if ($icon_bc != '' && $icon_style == 'style2') {
        $i_style .= "border-color:{$icon_bc};";
    }
    if ($icon_bgc != '' && $icon_style == 'style3') {
        $i_style .= "background-color:{$icon_bgc};";
    }
    $output .= brad_icon($icon, 'service-icon ' . $icon_style . ' ' . $icon_size . '-size ', '', true, 'style="' . $i_style . '"', true);
}
if ($title != '') {
    if ($c_front != '') {
        $t_style .= "color:{$c_front}!important;";
    }
    $output .= '<h4  style="' . $t_style . '">' . $title . '</h4>';
}
if ($desc != '') {
    if ($c_content != '') {
        $c_style .= "color:{$c_content}!important;";
    }
    $output .= '<div class="service-content" style="' . $c_style . '">' . $desc . '</div>';
}
$output .= '</div></div></div>';
if ($content != '' || $title_flip != '') {
示例#15
0
<?php

$brad_icon_id = rand();
$out = $li_after = $li_before = '';
extract(shortcode_atts(array('icon' => '', 'size' => 'small', 'style' => 'style1', 'align' => '', 'color' => '', 'color_hover' => '', 'bg_color' => '', 'bg_color_hover' => '', 'border_color' => '', 'border_width' => '1', 'lb' => 'no', 'link' => '', 'enable_crease' => 'no', 'alpha' => '', 'css_animation' => '', 'css_animation_delay' => 0), $atts));
if ($link != '') {
    $li_before = '<a href="' . $link . '"';
    if ($lb == 'yes') {
        $li_before .= ' rel="prettyPhoto[icon' . rand() . ']"';
    }
    $li_before .= '>';
    $li_after .= '</a>';
}
$class = ' enable-crease-' . $enable_crease . ' ' . $size . '-size ' . $style;
$class .= brad_getCSSAnimation($css_animation);
$icon = !empty($alpha) ? "<span id='brad_vc_icon_{$brad_icon_id}' class='brad-icon icon-text {$class}' data-animation-delay='{$css_animation_delay}' data-animation-effect='{$css_animation}'>{$alpha}</span>" : brad_icon($icon, $class, "brad_vc_icon_{$brad_icon_id}", true, "data-animation-delay='{$css_animation_delay}' data-animation-effect='{$css_animation}'");
if ($color != '' || $color_hover != '' || $bg_color != '' || $bg_color_hover != '' || $border_color != '') {
    $out .= "<style type='text/css' scoped>#brad_vc_icon_{$brad_icon_id}{";
    if ($color != '') {
        $out .= "color:{$color};";
    }
    if ($bg_color != '' && $style == 'style3') {
        $out .= "background-color:{$bg_color};";
    }
    if ($border_color != '' && $style == 'style2') {
        $out .= 'border-width:' . intval($border_width) . 'px;';
        $out .= "border-color:{$border_color};";
    }
    $out .= "}";
    if ($bg_color_hover != '' || $color_hover != '') {
        $out .= "#brad_vc_icon_{$brad_icon_id}:hover{";