Import legacy nurinda.co.id website
This commit is contained in:
1 parent
3f59bb9038
commit
6e21646ac4
13389 files changed
+3246690
No files matched your search
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $id
|
||||
* @var $el_class
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_Layerslider_Vc
|
||||
*/
|
||||
$el_class = $title = $id = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_layerslider_element wpb_content_element' . $el_class, $this->settings['base'], $atts );
|
||||
|
||||
$output .= '<div class="' . esc_attr( $css_class ) . '">';
|
||||
$output .= wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_layerslider_heading' ) );
|
||||
$output .= apply_filters( 'vc_layerslider_shortcode', do_shortcode( '[layerslider id="' . $id . '"]' ) );
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
$block = $block_data[0];
|
||||
$settings = $block_data[1];
|
||||
$link_setting = empty( $settings[0] ) ? '' : $settings[0];
|
||||
?>
|
||||
<?php if ( 'title' === $block ) : ?>
|
||||
<h2 class="post-title">
|
||||
<?php echo empty( $link_setting ) || 'no_link' !== $link_setting ? $this->getLinked( $post, $post->title, $link_setting, 'link_title' ) : $post->title ?>
|
||||
</h2>
|
||||
<?php elseif ( 'image' === $block && ! empty( $post->thumbnail ) ) : ?>
|
||||
<div class="post-thumb">
|
||||
<?php echo empty( $link_setting ) || 'no_link' !== $link_setting ? $this->getLinked( $post, $post->thumbnail, $link_setting, 'link_image' ) : $post->thumbnail ?>
|
||||
</div>
|
||||
<?php elseif ( 'text' === $block ) : ?>
|
||||
<div class="entry-content">
|
||||
<?php echo empty( $link_setting ) || 'text' === $link_setting ? $post->content : $post->excerpt; ?>
|
||||
</div>
|
||||
<?php elseif ( 'link' === $block ) : ?>
|
||||
<a href="<?php echo $post->link ?>" class="vc_read_more" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'js_composer' ), $post->title_attribute ) ); ?>"<?php echo $this->link_target ?>><?php _e( 'Read more', 'js_composer' ) ?></a>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $alias
|
||||
* @var $el_class
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_Rev_Slider_Vc
|
||||
*/
|
||||
$title = $alias = $el_class = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_revslider_element wpb_content_element' . $el_class, $this->settings['base'], $atts );
|
||||
|
||||
$output .= '<div class="' . esc_attr( $css_class ) . '">';
|
||||
$output .= wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_revslider_heading' ) );
|
||||
$output .= apply_filters( 'vc_revslider_shortcode', do_shortcode( '[rev_slider ' . $alias . ']' ) );
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $el_class
|
||||
* @var $collapsible
|
||||
* @var $disable_keyboard
|
||||
* @var $active_tab
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Accordion
|
||||
*/
|
||||
$title = $el_class = $collapsible = $disable_keyboard = $active_tab = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
wp_enqueue_script( 'jquery-ui-accordion' );
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_accordion wpb_content_element ' . $el_class . ' not-column-inherit', $this->settings['base'], $atts );
|
||||
|
||||
$output = '
|
||||
<div class="' . esc_attr( $css_class ) . '" data-collapsible="' . esc_attr( $collapsible ) . '" data-vc-disable-keydown="' . ( esc_attr( ( 'yes' === $disable_keyboard ? 'true' : 'false' ) ) ) . '" data-active-tab="' . $active_tab . '">
|
||||
<div class="wpb_wrapper wpb_accordion_wrapper ui-accordion">
|
||||
' . wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_accordion_heading' ) ) . '
|
||||
' . wpb_js_remove_wpautop( $content ) . '
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $el_id
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Accordion_tab
|
||||
*/
|
||||
$title = $el_id = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_accordion_section group', $this->settings['base'], $atts );
|
||||
|
||||
$output = '
|
||||
<div ' . ( isset( $el_id ) && ! empty( $el_id ) ? "id='" . esc_attr( $el_id ) . "'" : '' ) . 'class="' . esc_attr( $css_class ) . '">
|
||||
<h3 class="wpb_accordion_header ui-accordion-header"><a href="#' . sanitize_title( $title ) . '">' . $title . '</a></h3>
|
||||
<div class="wpb_accordion_content ui-accordion-content vc_clearfix">
|
||||
' . ( ( '' === trim( $content ) ) ? __( 'Empty section. Edit page to add content here.', 'js_composer' ) : wpb_js_remove_wpautop( $content ) ) . '
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts array
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Basic_Grid
|
||||
*/
|
||||
$this->post_id = false;
|
||||
$this->items = array();
|
||||
$css = $el_class = '';
|
||||
$posts = $filter_terms = array();
|
||||
$this->buildAtts( $atts, $content );
|
||||
|
||||
$css = isset( $atts['css'] ) ? $atts['css'] : '';
|
||||
$el_class = isset( $atts['el_class'] ) ? $atts['el_class'] : '';
|
||||
|
||||
$class_to_filter = 'vc_grid-container vc_clearfix wpb_content_element ' . $this->shortcode;
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
wp_enqueue_script( 'prettyphoto' );
|
||||
wp_enqueue_style( 'prettyphoto' );
|
||||
|
||||
if ( 'true' === $this->atts['btn_add_icon'] ) {
|
||||
vc_icon_element_fonts_enqueue( $this->atts['btn_i_type'] );
|
||||
}
|
||||
|
||||
$this->buildGridSettings();
|
||||
if ( isset( $this->atts['style'] ) && 'pagination' === $this->atts['style'] ) {
|
||||
wp_enqueue_script( 'twbs-pagination' );
|
||||
}
|
||||
if ( ! empty( $atts['page_id'] ) ) {
|
||||
$this->grid_settings['page_id'] = (int) $atts['page_id'];
|
||||
}
|
||||
$this->enqueueScripts();
|
||||
|
||||
$animation = isset( $this->atts['initial_loading_animation'] ) ? $this->atts['initial_loading_animation'] : 'zoomIn';
|
||||
|
||||
$wrapper_attributes = array();
|
||||
// Used for preload first page
|
||||
if ( ! vc_is_page_editable() ) {
|
||||
if ( in_array( $this->atts['style'], array(
|
||||
'load-more',
|
||||
'lazy',
|
||||
'all',
|
||||
) ) && in_array( $this->settings['base'], array( 'vc_basic_grid' ) ) ) {
|
||||
$this->atts['max_items'] = 'all' === $this->atts['style'] || $this->atts['items_per_page'] > $this->atts['max_items'] ? $this->atts['max_items'] : $this->atts['items_per_page'];
|
||||
$this->buildItems();
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $atts['el_id'] ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $atts['el_id'] ) . '"';
|
||||
}
|
||||
?><!-- vc_grid start -->
|
||||
<div class="vc_grid-container-wrapper vc_clearfix" <?php echo implode( ' ', $wrapper_attributes ); ?>>
|
||||
<div class="<?php echo esc_attr( $css_class ) ?>" data-initial-loading-animation="<?php echo esc_attr( $animation ); ?>" data-vc-<?php echo esc_attr( $this->pagable_type ); ?>-settings="<?php echo esc_attr( json_encode( $this->grid_settings ) ); ?>" data-vc-request="<?php echo esc_attr( apply_filters( 'vc_grid_request_url', admin_url( 'admin-ajax.php' ) ) ); ?>" data-vc-post-id="<?php echo esc_attr( get_the_ID() ); ?>" data-vc-public-nonce="<?php echo vc_generate_nonce( 'vc-public-nonce' ); ?>">
|
||||
<?php
|
||||
// preload first page
|
||||
echo $this->renderItems();
|
||||
?>
|
||||
</div>
|
||||
</div><!-- vc_grid end -->
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
*/
|
||||
if ( 'yes' === $atts['show_filter'] && ! empty( $filter_terms ) ) :
|
||||
$unique_terms = array_unique( $filter_terms );
|
||||
$terms_ids = ! empty( $atts['exclude_filter'] ) ? array_diff( $unique_terms, // Posts filter terms
|
||||
array_map( 'abs', preg_split( '/\s*\,\s*/', $atts['exclude_filter'] ) ) ) : $unique_terms;
|
||||
$terms = count( $terms_ids ) > 0 ? get_terms( $atts['filter_source'], array(
|
||||
'include' => implode( ',', $terms_ids ),
|
||||
) ) : array();
|
||||
|
||||
$filter_default = $atts['filter_default_title'];
|
||||
if ( empty( $filter_default ) ) {
|
||||
$filter_default = __( 'All', 'js_composer' );
|
||||
}
|
||||
if ( 'dropdown' !== $atts['filter_style'] ) {
|
||||
echo '<ul class="vc_grid-filter vc_clearfix vc_grid-filter-' . esc_attr( $atts['filter_style'] ) . ' vc_grid-filter-size-' . esc_attr( $atts['filter_size'] ) . ' vc_grid-filter-' . esc_attr( $atts['filter_align'] ) . ' vc_grid-filter-color-' . esc_attr( $atts['filter_color'] ) . '" data-vc-grid-filter="' . esc_attr( $atts['filter_source'] ) . '"><li class="vc_active vc_grid-filter-item"><span data-vc-grid-filter-value="*">';
|
||||
echo esc_attr( $filter_default );;
|
||||
echo '</span></li>';
|
||||
foreach ( $terms as $term ) {
|
||||
echo '<li class="vc_grid-filter-item"><span' . ' data-vc-grid-filter-value=".vc_grid-term-' . $term->term_id . '">';
|
||||
echo esc_attr( $term->name );
|
||||
echo '</span><!-- fix whitespace
|
||||
--></li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
|
||||
?>
|
||||
<!-- for responsive vc_responsive !-->
|
||||
<div class="<?php echo 'dropdown' === $atts['filter_style'] ? 'vc_grid-filter-dropdown' : 'vc_grid-filter-select'; ?> vc_grid-filter-<?php echo esc_attr( $atts['filter_align'] ); ?> vc_grid-filter-color-<?php echo esc_attr( $atts['filter_color'] ); ?>" data-vc-grid-filter-select="<?php echo esc_attr( $atts['filter_source'] ) ?>">
|
||||
<div class="vc_grid-styled-select"><select data-filter="<?php echo esc_attr( $atts['filter_source'] ) ?>">
|
||||
<option class="vc_active" value="*"><?php echo esc_attr( $filter_default ); ?> </option>
|
||||
<?php foreach ( $terms as $term ) :
|
||||
echo '<option value=".vc_grid-term-' . esc_attr( $term->term_id ) . '">' . esc_html( $term->name ) . ' </option>';
|
||||
endforeach; ?>
|
||||
</select><i class="vc_arrow-icon-navicon"></i>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $style
|
||||
* @var $shape
|
||||
* @var $color
|
||||
* @var $custom_background
|
||||
* @var $custom_text
|
||||
* @var $size
|
||||
* @var $align
|
||||
* @var $link
|
||||
* @var $title
|
||||
* @var $button_block
|
||||
* @var $el_id
|
||||
* @var $el_class
|
||||
* @var $outline_custom_color
|
||||
* @var $outline_custom_hover_background
|
||||
* @var $outline_custom_hover_text
|
||||
* @var $add_icon
|
||||
* @var $i_align
|
||||
* @var $i_type
|
||||
* @var $i_icon_fontawesome
|
||||
* @var $i_icon_openiconic
|
||||
* @var $i_icon_typicons
|
||||
* @var $i_icon_entypo
|
||||
* @var $i_icon_linecons
|
||||
* @var $i_icon_pixelicons
|
||||
* @var $css_animation
|
||||
* @var $css
|
||||
* @var $gradient_color_1
|
||||
* @var $gradient_color_2
|
||||
* @var $gradient_custom_color_1 ;
|
||||
* @var $gradient_custom_color_2 ;
|
||||
* @var $gradient_text_color ;
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Btn
|
||||
*/
|
||||
$style = $shape = $color = $size = $custom_background = $custom_text = $align = $link = $title = $button_block = $el_class = $outline_custom_color = $outline_custom_hover_background = $outline_custom_hover_text = $add_icon = $i_align = $i_type = $i_icon_entypo = $i_icon_fontawesome = $i_icon_linecons = $i_icon_pixelicons = $i_icon_typicons = $css = $css_animation = '';
|
||||
$gradient_color_1 = $gradient_color_2 = $gradient_custom_color_1 = $gradient_custom_color_2 = $gradient_text_color = '';
|
||||
$custom_onclick = $custom_onclick_code = '';
|
||||
$a_href = $a_title = $a_target = $a_rel = '';
|
||||
$styles = array();
|
||||
$icon_wrapper = false;
|
||||
$icon_html = false;
|
||||
$attributes = array();
|
||||
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
//parse link
|
||||
$link = trim( $link );
|
||||
$link = ( '||' === $link ) ? '' : $link;
|
||||
$link = vc_build_link( $link );
|
||||
$use_link = false;
|
||||
if ( strlen( $link['url'] ) > 0 ) {
|
||||
$use_link = true;
|
||||
$a_href = $link['url'];
|
||||
$a_href = apply_filters( 'vc_btn_a_href', $a_href );
|
||||
$a_title = $link['title'];
|
||||
$a_title = apply_filters( 'vc_btn_a_title', $a_title );
|
||||
$a_target = $link['target'];
|
||||
$a_rel = $link['rel'];
|
||||
}
|
||||
|
||||
$wrapper_classes = array(
|
||||
'vc_btn3-container',
|
||||
$this->getExtraClass( $el_class ),
|
||||
$this->getCSSAnimation( $css_animation ),
|
||||
'vc_btn3-' . $align,
|
||||
);
|
||||
|
||||
$button_classes = array(
|
||||
'vc_general',
|
||||
'vc_btn3',
|
||||
'vc_btn3-size-' . $size,
|
||||
'vc_btn3-shape-' . $shape,
|
||||
'vc_btn3-style-' . $style,
|
||||
);
|
||||
|
||||
$button_html = $title;
|
||||
|
||||
if ( '' === trim( $title ) ) {
|
||||
$button_classes[] = 'vc_btn3-o-empty';
|
||||
$button_html = '<span class="vc_btn3-placeholder"> </span>';
|
||||
}
|
||||
if ( 'true' === $button_block && 'inline' !== $align ) {
|
||||
$button_classes[] = 'vc_btn3-block';
|
||||
}
|
||||
if ( 'true' === $add_icon ) {
|
||||
$button_classes[] = 'vc_btn3-icon-' . $i_align;
|
||||
vc_icon_element_fonts_enqueue( $i_type );
|
||||
|
||||
if ( isset( ${'i_icon_' . $i_type} ) ) {
|
||||
if ( 'pixelicons' === $i_type ) {
|
||||
$icon_wrapper = true;
|
||||
}
|
||||
$icon_class = ${'i_icon_' . $i_type};
|
||||
} else {
|
||||
$icon_class = 'fa fa-adjust';
|
||||
}
|
||||
|
||||
if ( $icon_wrapper ) {
|
||||
$icon_html = '<i class="vc_btn3-icon"><span class="vc_btn3-icon-inner ' . esc_attr( $icon_class ) . '"></span></i>';
|
||||
} else {
|
||||
$icon_html = '<i class="vc_btn3-icon ' . esc_attr( $icon_class ) . '"></i>';
|
||||
}
|
||||
|
||||
if ( 'left' === $i_align ) {
|
||||
$button_html = $icon_html . ' ' . $button_html;
|
||||
} else {
|
||||
$button_html .= ' ' . $icon_html;
|
||||
}
|
||||
}
|
||||
|
||||
if ( 'custom' === $style ) {
|
||||
if ( $custom_background ) {
|
||||
$styles[] = vc_get_css_color( 'background-color', $custom_background );
|
||||
}
|
||||
|
||||
if ( $custom_text ) {
|
||||
$styles[] = vc_get_css_color( 'color', $custom_text );
|
||||
}
|
||||
|
||||
if ( ! $custom_background && ! $custom_text ) {
|
||||
$button_classes[] = 'vc_btn3-color-grey';
|
||||
}
|
||||
} elseif ( 'outline-custom' === $style ) {
|
||||
if ( $outline_custom_color ) {
|
||||
$styles[] = vc_get_css_color( 'border-color', $outline_custom_color );
|
||||
$styles[] = vc_get_css_color( 'color', $outline_custom_color );
|
||||
$attributes[] = 'onmouseleave="this.style.borderColor=\'' . $outline_custom_color . '\'; this.style.backgroundColor=\'transparent\'; this.style.color=\'' . $outline_custom_color . '\'"';
|
||||
} else {
|
||||
$attributes[] = 'onmouseleave="this.style.borderColor=\'\'; this.style.backgroundColor=\'transparent\'; this.style.color=\'\'"';
|
||||
}
|
||||
|
||||
$onmouseenter = array();
|
||||
if ( $outline_custom_hover_background ) {
|
||||
$onmouseenter[] = 'this.style.borderColor=\'' . $outline_custom_hover_background . '\';';
|
||||
$onmouseenter[] = 'this.style.backgroundColor=\'' . $outline_custom_hover_background . '\';';
|
||||
}
|
||||
if ( $outline_custom_hover_text ) {
|
||||
$onmouseenter[] = 'this.style.color=\'' . $outline_custom_hover_text . '\';';
|
||||
}
|
||||
if ( $onmouseenter ) {
|
||||
$attributes[] = 'onmouseenter="' . implode( ' ', $onmouseenter ) . '"';
|
||||
}
|
||||
|
||||
if ( ! $outline_custom_color && ! $outline_custom_hover_background && ! $outline_custom_hover_text ) {
|
||||
$button_classes[] = 'vc_btn3-color-inverse';
|
||||
|
||||
foreach ( $button_classes as $k => $v ) {
|
||||
if ( 'vc_btn3-style-outline-custom' === $v ) {
|
||||
unset( $button_classes[ $k ] );
|
||||
break;
|
||||
}
|
||||
}
|
||||
$button_classes[] = 'vc_btn3-style-outline';
|
||||
}
|
||||
} elseif ( 'gradient' === $style || 'gradient-custom' === $style ) {
|
||||
|
||||
$gradient_color_1 = vc_convert_vc_color( $gradient_color_1 );
|
||||
$gradient_color_2 = vc_convert_vc_color( $gradient_color_2 );
|
||||
|
||||
$button_text_color = '#fff';
|
||||
if ( 'gradient-custom' === $style ) {
|
||||
$gradient_color_1 = $gradient_custom_color_1;
|
||||
$gradient_color_2 = $gradient_custom_color_2;
|
||||
$button_text_color = $gradient_text_color;
|
||||
}
|
||||
|
||||
$gradient_css = array();
|
||||
$gradient_css[] = 'color: ' . $button_text_color;
|
||||
$gradient_css[] = 'border: none';
|
||||
$gradient_css[] = 'background-color: ' . $gradient_color_1;
|
||||
$gradient_css[] = 'background-image: -webkit-linear-gradient(left, ' . $gradient_color_1 . ' 0%, ' . $gradient_color_2 . ' 50%,' . $gradient_color_1 . ' 100%)';
|
||||
$gradient_css[] = 'background-image: linear-gradient(to right, ' . $gradient_color_1 . ' 0%, ' . $gradient_color_2 . ' 50%,' . $gradient_color_1 . ' 100%)';
|
||||
$gradient_css[] = '-webkit-transition: all .2s ease-in-out';
|
||||
$gradient_css[] = 'transition: all .2s ease-in-out';
|
||||
$gradient_css[] = 'background-size: 200% 100%';
|
||||
|
||||
// hover css
|
||||
$gradient_css_hover = array();
|
||||
$gradient_css_hover[] = 'color: ' . $button_text_color;
|
||||
$gradient_css_hover[] = 'background-color: ' . $gradient_color_2;
|
||||
$gradient_css_hover[] = 'border: none';
|
||||
$gradient_css_hover[] = 'background-position: 100% 0';
|
||||
|
||||
$uid = uniqid();
|
||||
echo '<style type="text/css">.vc_btn3-style-' . $style . '.vc_btn-gradient-btn-' . $uid . ':hover{' . implode( ';', $gradient_css_hover ) . ';' . '}</style>';
|
||||
echo '<style type="text/css">.vc_btn3-style-' . $style . '.vc_btn-gradient-btn-' . $uid . '{' . implode( ';', $gradient_css ) . ';' . '}</style>';
|
||||
$button_classes[] = 'vc_btn-gradient-btn-' . $uid;
|
||||
$attributes[] = 'data-vc-gradient-1="' . $gradient_color_1 . '"';
|
||||
$attributes[] = 'data-vc-gradient-2="' . $gradient_color_2 . '"';
|
||||
} else {
|
||||
$button_classes[] = 'vc_btn3-color-' . $color;
|
||||
}
|
||||
|
||||
if ( $styles ) {
|
||||
$attributes[] = 'style="' . implode( ' ', $styles ) . '"';
|
||||
}
|
||||
|
||||
$class_to_filter = implode( ' ', array_filter( $wrapper_classes ) );
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
if ( $button_classes ) {
|
||||
$button_classes = esc_attr( apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode( ' ', array_filter( $button_classes ) ), $this->settings['base'], $atts ) );
|
||||
$attributes[] = 'class="' . trim( $button_classes ) . '"';
|
||||
}
|
||||
|
||||
if ( $use_link ) {
|
||||
$attributes[] = 'href="' . trim( $a_href ) . '"';
|
||||
$attributes[] = 'title="' . esc_attr( trim( $a_title ) ) . '"';
|
||||
if ( ! empty( $a_target ) ) {
|
||||
$attributes[] = 'target="' . esc_attr( trim( $a_target ) ) . '"';
|
||||
}
|
||||
if ( ! empty( $a_rel ) ) {
|
||||
$attributes[] = 'rel="' . esc_attr( trim( $a_rel ) ) . '"';
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $custom_onclick ) && $custom_onclick_code ) {
|
||||
$attributes[] = 'onclick="' . esc_attr( $custom_onclick_code ) . '"';
|
||||
}
|
||||
|
||||
$attributes = implode( ' ', $attributes );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
?>
|
||||
<div class="<?php echo trim( esc_attr( $css_class ) ) ?>" <?php echo implode( ' ', $wrapper_attributes ); ?>>
|
||||
<?php
|
||||
if ( $use_link ) {
|
||||
echo '<a ' . $attributes . '>' . $button_html . '</a>';
|
||||
} else {
|
||||
echo '<button ' . $attributes . '>' . $button_html . '</button>';
|
||||
}
|
||||
?></div>
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $color
|
||||
* @var $size
|
||||
* @var $icon
|
||||
* @var $target
|
||||
* @var $href
|
||||
* @var $el_class
|
||||
* @var $title
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Button
|
||||
*/
|
||||
$color = $size = $icon = $target = $href = $el_class = $title = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$a_class = '';
|
||||
|
||||
if ( '' !== $el_class ) {
|
||||
$tmp_class = explode( ' ', strtolower( $el_class ) );
|
||||
$tmp_class = str_replace( '.', '', $tmp_class );
|
||||
if ( in_array( 'prettyphoto', $tmp_class ) ) {
|
||||
wp_enqueue_script( 'prettyphoto' );
|
||||
wp_enqueue_style( 'prettyphoto' );
|
||||
$a_class .= ' prettyphoto';
|
||||
$el_class = str_ireplace( 'prettyphoto', '', $el_class );
|
||||
}
|
||||
if ( in_array( 'pull-right', $tmp_class ) && '' !== $href ) {
|
||||
$a_class .= ' pull-right';
|
||||
$el_class = str_ireplace( 'pull-right', '', $el_class );
|
||||
}
|
||||
if ( in_array( 'pull-left', $tmp_class ) && '' !== $href ) {
|
||||
$a_class .= ' pull-left';
|
||||
$el_class = str_ireplace( 'pull-left', '', $el_class );
|
||||
}
|
||||
}
|
||||
|
||||
if ( 'same' === $target || '_self' === $target ) {
|
||||
$target = '';
|
||||
}
|
||||
$target = ( '' !== $target ) ? ' target="' . esc_attr( $target ) . '"' : '';
|
||||
|
||||
$color = ( '' !== $color ) ? ' wpb_' . $color : '';
|
||||
$size = ( '' !== $size && 'wpb_regularsize' !== $size ) ? ' wpb_' . $size : ' ' . $size;
|
||||
$icon = ( '' !== $icon && 'none' !== $icon ) ? ' ' . $icon : '';
|
||||
$i_icon = ( '' !== $icon ) ? ' <i class="icon"> </i>' : '';
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_button ' . $color . $size . $icon . $el_class, $this->settings['base'], $atts );
|
||||
|
||||
if ( '' !== $href ) {
|
||||
$output .= '<span class="' . esc_attr( $css_class ) . '">' . $title . $i_icon . '</span>';
|
||||
$output = '<a class="wpb_button_a' . esc_attr( $a_class ) . '" title="' . esc_attr( $title ) . '" href="' . esc_attr( $href ) . '"' . $target . '>' . $output . '</a>';
|
||||
} else {
|
||||
$output .= '<button class="' . esc_attr( $css_class ) . '">' . $title . $i_icon . '</button>';
|
||||
|
||||
}
|
||||
echo $output;
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $link
|
||||
* @var $title
|
||||
* @var $color
|
||||
* @var $size
|
||||
* @var $style
|
||||
* @var $el_class
|
||||
* @var $align
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Button2
|
||||
*/
|
||||
$link = $title = $color = $size = $style = $el_class = $align = '';
|
||||
$wrapper_start = $wrapper_end = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$class = 'vc_btn';
|
||||
//parse link
|
||||
$link = ( '||' === $link ) ? '' : $link;
|
||||
$link = vc_build_link( $link );
|
||||
$a_href = $link['url'];
|
||||
$a_title = $link['title'];
|
||||
$a_target = $link['target'];
|
||||
$a_rel = $link['rel'];
|
||||
if ( ! empty( $a_rel ) ) {
|
||||
$a_rel = ' rel="' . esc_attr( trim( $a_rel ) ) . '"';
|
||||
}
|
||||
|
||||
$class .= ( '' !== $color ) ? ( ' vc_btn_' . $color . ' vc_btn-' . $color ) : '';
|
||||
$class .= ( '' !== $size ) ? ( ' vc_btn_' . $size . ' vc_btn-' . $size ) : '';
|
||||
$class .= ( '' !== $style ) ? ' vc_btn_' . $style : '';
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' ' . $class . $el_class, $this->settings['base'], $atts );
|
||||
$wrapper_css_class = 'vc_button-2-wrapper';
|
||||
if ( $align ) {
|
||||
$wrapper_css_class .= ' vc_button-2-align-' . $align;
|
||||
}
|
||||
?>
|
||||
<div class="<?php echo esc_attr( $wrapper_css_class ) ?>"><a class="<?php echo esc_attr( trim( $css_class ) ); ?>" href="<?php echo esc_attr( $a_href ); ?>" title="<?php echo esc_attr( $a_title ); ?>" target="<?php echo esc_attr( $a_target ); ?>"<?php echo $a_rel; ?>><?php echo $title; ?></a>
|
||||
</div>
|
||||
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $posts_query
|
||||
* @var $mode
|
||||
* @var $speed
|
||||
* @var $slides_per_view
|
||||
* @var $wrap
|
||||
* @var $autoplay
|
||||
* @var $hide_pagination_control
|
||||
* @var $hide_prev_next_buttons
|
||||
* @var $layout
|
||||
* @var $link_target
|
||||
* @var $thumb_size
|
||||
* @var $partial_view
|
||||
* @var $title
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_Vc_Carousel
|
||||
*/
|
||||
$el_class = $posts_query = $mode = $speed = $slides_per_view =
|
||||
$wrap = $autoplay = $hide_pagination_control = $hide_prev_next_buttons =
|
||||
$layout = $link_target = $thumb_size = $partial_view = $title = '';
|
||||
|
||||
global $vc_teaser_box;
|
||||
|
||||
$args = $my_query = '';
|
||||
$posts = array();
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
global $vc_posts_grid_exclude_id;
|
||||
$vc_posts_grid_exclude_id[] = get_the_ID(); // fix recursive nesting
|
||||
if ( is_array( $posts_query ) ) {
|
||||
$posts_query['post_status'] = 'publish';
|
||||
} else {
|
||||
$posts_query .= '|post_status:publish';
|
||||
}
|
||||
list( $args, $my_query ) = vc_build_loop_query( $posts_query, get_the_ID() );
|
||||
$teaser_blocks = vc_sorted_list_parse_value( $layout );
|
||||
/** @var $my_query WP_Query */
|
||||
while ( $my_query->have_posts() ) {
|
||||
$my_query->the_post(); // Get post from query
|
||||
if ( in_array( get_the_ID(), $vc_posts_grid_exclude_id ) ) {
|
||||
continue;
|
||||
}
|
||||
$post = new stdClass(); // Creating post object.
|
||||
$post->id = get_the_ID();
|
||||
$post->link = get_permalink( $post->id );
|
||||
$post->post_type = get_post_type();
|
||||
if ( '1' === $vc_teaser_box->getTeaserData( 'enable', $post->id ) ) {
|
||||
$post->custom_user_teaser = true;
|
||||
$data = $vc_teaser_box->getTeaserData( 'data', $post->id );
|
||||
if ( ! empty( $data ) ) {
|
||||
$data = json_decode( $data );
|
||||
}
|
||||
$post->bgcolor = $vc_teaser_box->getTeaserData( 'bgcolor', $post->id );
|
||||
$post->custom_teaser_blocks = array();
|
||||
$post->title_attribute = the_title_attribute( 'echo=0' );
|
||||
if ( ! empty( $data ) ) {
|
||||
foreach ( $data as $block ) {
|
||||
$settings = array();
|
||||
if ( 'title' === $block->name ) {
|
||||
$post->title = the_title( '', '', false );
|
||||
} elseif ( 'image' === $block->name ) {
|
||||
if ( 'featured' === $block->image ) {
|
||||
$post->thumbnail_data = $this->getPostThumbnail( $post->id, $thumb_size );
|
||||
} elseif ( ! empty( $block->image ) ) {
|
||||
$post->thumbnail_data = wpb_getImageBySize( array(
|
||||
'attach_id' => (int) $block->image,
|
||||
'thumb_size' => $thumb_size,
|
||||
) );
|
||||
} else {
|
||||
$post->thumbnail_data = false;
|
||||
}
|
||||
$post->thumbnail = $post->thumbnail_data && isset( $post->thumbnail_data['thumbnail'] ) ? $post->thumbnail_data['thumbnail'] : '';
|
||||
$post->image_link = empty( $video ) && $post->thumbnail && isset( $post->thumbnail_data['p_img_large'][0] ) ? $post->thumbnail_data['p_img_large'][0] : $video;
|
||||
} elseif ( 'text' === $block->name ) {
|
||||
if ( 'custom' === $block->mode ) {
|
||||
$settings[] = 'text';
|
||||
$post->content = $block->text;
|
||||
} elseif ( 'excerpt' === $block->mode ) {
|
||||
$settings[] = $block->mode;
|
||||
$post->excerpt = $this->getPostExcerpt();
|
||||
} else {
|
||||
$settings[] = $block->mode;
|
||||
$post->content = $this->getPostContent();
|
||||
}
|
||||
}
|
||||
if ( isset( $block->link ) ) {
|
||||
if ( 'post' === $block->link ) {
|
||||
$settings[] = 'link_post';
|
||||
} elseif ( 'big_image' === $block->link ) {
|
||||
$settings[] = 'link_image';
|
||||
} else {
|
||||
$settings[] = 'no_link';
|
||||
}
|
||||
$settings[] = '';
|
||||
}
|
||||
$post->custom_teaser_blocks[] = array( $block->name, $settings );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$post->custom_user_teaser = false;
|
||||
$post->title = the_title( '', '', false );
|
||||
$post->title_attribute = the_title_attribute( 'echo=0' );
|
||||
$post->post_type = get_post_type();
|
||||
$post->content = $this->getPostContent();
|
||||
$post->excerpt = $this->getPostExcerpt();
|
||||
$post->thumbnail_data = $this->getPostThumbnail( $post->id, $thumb_size );
|
||||
$post->thumbnail = $post->thumbnail_data && isset( $post->thumbnail_data['thumbnail'] ) ? $post->thumbnail_data['thumbnail'] : '';
|
||||
$video = get_post_meta( $post->id, '_p_video', true );
|
||||
$post->image_link = empty( $video ) && $post->thumbnail && isset( $post->thumbnail_data['p_img_large'][0] ) ? $post->thumbnail_data['p_img_large'][0] : $video;
|
||||
}
|
||||
|
||||
$post->categories_css = $this->getCategoriesCss( $post->id );
|
||||
|
||||
$posts[] = $post;
|
||||
}
|
||||
wp_reset_query();
|
||||
$this->setLinkTarget( $link_target );
|
||||
|
||||
wp_enqueue_script( 'vc_carousel_js' );
|
||||
wp_enqueue_style( 'vc_carousel_css' );
|
||||
|
||||
$css_class = $this->settings['base'] . ' wpb_content_element vc_carousel_slider_' . $slides_per_view . ' vc_carousel_' . $mode . ( empty( $el_class ) ? '' : ' ' . $el_class );
|
||||
$carousel_id = esc_attr( 'vc_carousel-' . WPBakeryShortCode_Vc_Carousel::getCarouselIndex() );
|
||||
?>
|
||||
<div
|
||||
class="<?php echo esc_attr( apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $css_class, $this->settings['base'], $atts ) ) ?>">
|
||||
<div class="wpb_wrapper">
|
||||
<?php echo wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_gallery_heading' ) ) ?>
|
||||
<div id="<?php echo $carousel_id ?>" data-ride="vc_carousel" data-wrap="<?php echo 'yes' === $wrap ? 'true' : 'false' ?>" data-interval="<?php echo 'yes' === $autoplay ? $speed : 0 ?>" data-auto-height="true" data-mode="<?php echo $mode ?>" data-partial="<?php echo 'yes' === $partial_view ? 'true' : 'false' ?>" data-per-view="<?php echo $slides_per_view ?>" data-hide-on-end="<?php echo 'yes' === $autoplay ? 'false' : 'true' ?>" class="vc_carousel vc_slide">
|
||||
<?php if ( 'yes' !== $hide_pagination_control ) : ?>
|
||||
<!-- Indicators -->
|
||||
<ol class="vc_carousel-indicators">
|
||||
<?php for ( $i = 0; $i < count( $posts ); $i ++ ) : ?>
|
||||
<li data-target="#<?php echo $carousel_id ?>" data-slide-to="<?php echo $i ?>"></li>
|
||||
<?php endfor; ?>
|
||||
</ol>
|
||||
<?php endif ?>
|
||||
<!-- Wrapper for slides -->
|
||||
<div class="vc_carousel-inner">
|
||||
<div class="vc_carousel-slideline">
|
||||
<div class="vc_carousel-slideline-inner">
|
||||
<?php foreach ( $posts as $post ) : ?>
|
||||
<?php
|
||||
$blocks_to_build = true === $post->custom_user_teaser ? $post->custom_teaser_blocks : $teaser_blocks;
|
||||
$block_style = isset( $post->bgcolor ) ? ' style="background-color: ' . $post->bgcolor . '"' : '';
|
||||
?>
|
||||
<div class="vc_item vc_slide_<?php echo $post->post_type ?>"<?php echo $block_style ?>>
|
||||
<div class="vc_inner">
|
||||
<?php foreach ( $blocks_to_build as $block_data ) : ?>
|
||||
<?php include $this->getBlockTemplate() ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ( 'yes' !== $hide_prev_next_buttons ) : ?>
|
||||
<!-- Controls -->
|
||||
<a class="vc_left vc_carousel-control" href="#<?php echo $carousel_id ?>" data-slide="prev">
|
||||
<span class="icon-prev"></span>
|
||||
</a>
|
||||
<a class="vc_right vc_carousel-control" href="#<?php echo $carousel_id ?>" data-slide="next">
|
||||
<span class="icon-next"></span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_id
|
||||
* @var $el_class
|
||||
* @var $width
|
||||
* @var $css
|
||||
* @var $offset
|
||||
* @var $content - shortcode content
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Column
|
||||
*/
|
||||
$el_class = $el_id = $width = $parallax_speed_bg = $parallax_speed_video = $parallax = $parallax_image = $video_bg = $video_bg_url = $video_bg_parallax = $css = $offset = $css_animation = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
wp_enqueue_script( 'wpb_composer_front_js' );
|
||||
|
||||
$width = wpb_translateColumnWidthToSpan( $width );
|
||||
$width = vc_column_offset_class_merge( $offset, $width );
|
||||
|
||||
$css_classes = array(
|
||||
$this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation ),
|
||||
'wpb_column',
|
||||
'vc_column_container',
|
||||
$width,
|
||||
);
|
||||
|
||||
if ( vc_shortcode_custom_css_has_property( $css, array(
|
||||
'border',
|
||||
'background',
|
||||
) ) || $video_bg || $parallax
|
||||
) {
|
||||
$css_classes[] = 'vc_col-has-fill';
|
||||
}
|
||||
|
||||
$wrapper_attributes = array();
|
||||
|
||||
$has_video_bg = ( ! empty( $video_bg ) && ! empty( $video_bg_url ) && vc_extract_youtube_id( $video_bg_url ) );
|
||||
|
||||
$parallax_speed = $parallax_speed_bg;
|
||||
if ( $has_video_bg ) {
|
||||
$parallax = $video_bg_parallax;
|
||||
$parallax_speed = $parallax_speed_video;
|
||||
$parallax_image = $video_bg_url;
|
||||
$css_classes[] = 'vc_video-bg-container';
|
||||
wp_enqueue_script( 'vc_youtube_iframe_api_js' );
|
||||
}
|
||||
|
||||
if ( ! empty( $parallax ) ) {
|
||||
wp_enqueue_script( 'vc_jquery_skrollr_js' );
|
||||
$wrapper_attributes[] = 'data-vc-parallax="' . esc_attr( $parallax_speed ) . '"'; // parallax speed
|
||||
$css_classes[] = 'vc_general vc_parallax vc_parallax-' . $parallax;
|
||||
if ( false !== strpos( $parallax, 'fade' ) ) {
|
||||
$css_classes[] = 'js-vc_parallax-o-fade';
|
||||
$wrapper_attributes[] = 'data-vc-parallax-o-fade="on"';
|
||||
} elseif ( false !== strpos( $parallax, 'fixed' ) ) {
|
||||
$css_classes[] = 'js-vc_parallax-o-fixed';
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $parallax_image ) ) {
|
||||
if ( $has_video_bg ) {
|
||||
$parallax_image_src = $parallax_image;
|
||||
} else {
|
||||
$parallax_image_id = preg_replace( '/[^\d]/', '', $parallax_image );
|
||||
$parallax_image_src = wp_get_attachment_image_src( $parallax_image_id, 'full' );
|
||||
if ( ! empty( $parallax_image_src[0] ) ) {
|
||||
$parallax_image_src = $parallax_image_src[0];
|
||||
}
|
||||
}
|
||||
$wrapper_attributes[] = 'data-vc-parallax-image="' . esc_attr( $parallax_image_src ) . '"';
|
||||
}
|
||||
if ( ! $parallax && $has_video_bg ) {
|
||||
$wrapper_attributes[] = 'data-vc-video-bg="' . esc_attr( $video_bg_url ) . '"';
|
||||
}
|
||||
|
||||
$css_class = preg_replace( '/\s+/', ' ', apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode( ' ', array_filter( $css_classes ) ), $this->settings['base'], $atts ) );
|
||||
$wrapper_attributes[] = 'class="' . esc_attr( trim( $css_class ) ) . '"';
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output .= '<div ' . implode( ' ', $wrapper_attributes ) . '>';
|
||||
$innerColumnClass = 'vc_column-inner ' . esc_attr( trim( vc_shortcode_custom_css_class( $css ) ) );
|
||||
$output .= '<div class="' . trim( $innerColumnClass ) . '">';
|
||||
$output .= '<div class="wpb_wrapper">';
|
||||
$output .= wpb_js_remove_wpautop( $content );
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $width
|
||||
* @var $css
|
||||
* @var $offset
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Column_Inner
|
||||
*/
|
||||
$el_class = $width = $el_id = $css = $offset = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$width = wpb_translateColumnWidthToSpan( $width );
|
||||
$width = vc_column_offset_class_merge( $offset, $width );
|
||||
|
||||
$css_classes = array(
|
||||
$this->getExtraClass( $el_class ),
|
||||
'wpb_column',
|
||||
'vc_column_container',
|
||||
$width,
|
||||
);
|
||||
|
||||
if ( vc_shortcode_custom_css_has_property( $css, array(
|
||||
'border',
|
||||
'background',
|
||||
) ) ) {
|
||||
$css_classes[] = 'vc_col-has-fill';
|
||||
}
|
||||
|
||||
$wrapper_attributes = array();
|
||||
|
||||
$css_class = preg_replace( '/\s+/', ' ', apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode( ' ', array_filter( $css_classes ) ), $this->settings['base'], $atts ) );
|
||||
$wrapper_attributes[] = 'class="' . esc_attr( trim( $css_class ) ) . '"';
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output .= '<div ' . implode( ' ', $wrapper_attributes ) . '>';
|
||||
$innerColumnClass = 'vc_column-inner ' . esc_attr( trim( vc_shortcode_custom_css_class( $css ) ) );
|
||||
$output .= '<div class="' . trim( $innerColumnClass ) . '">';
|
||||
$output .= '<div class="wpb_wrapper">';
|
||||
$output .= wpb_js_remove_wpautop( $content );
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $css_animation
|
||||
* @var $css
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Column_text
|
||||
*/
|
||||
$el_class = $el_id = $css = $css_animation = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$class_to_filter = 'wpb_text_column wpb_content_element ' . $this->getCSSAnimation( $css_animation );
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '
|
||||
<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>
|
||||
<div class="wpb_wrapper">
|
||||
' . wpb_js_remove_wpautop( $content, true ) . '
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Cta
|
||||
*/
|
||||
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
$this->buildTemplate( $atts, $content );
|
||||
$containerClass = trim( 'vc_cta3-container ' . esc_attr( implode( ' ', $this->getTemplateVariable( 'container-class' ) ) ) );
|
||||
$cssClass = trim( 'vc_general ' . esc_attr( implode( ' ', $this->getTemplateVariable( 'css-class' ) ) ) );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $atts['el_id'] ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $atts['el_id'] ) . '"';
|
||||
}
|
||||
?>
|
||||
<section class="<?php echo esc_attr( $containerClass ); ?>" <?php echo implode( ' ', $wrapper_attributes ); ?>>
|
||||
<div class="<?php echo esc_attr( $cssClass ); ?>"<?php
|
||||
if ( $this->getTemplateVariable( 'inline-css' ) ) {
|
||||
echo ' style="' . esc_attr( implode( ' ', $this->getTemplateVariable( 'inline-css' ) ) ) . '"';
|
||||
}
|
||||
?>>
|
||||
<?php echo $this->getTemplateVariable( 'icons-top' ); ?>
|
||||
<?php echo $this->getTemplateVariable( 'icons-left' ); ?>
|
||||
<div class="vc_cta3_content-container">
|
||||
<?php echo $this->getTemplateVariable( 'actions-top' ); ?>
|
||||
<?php echo $this->getTemplateVariable( 'actions-left' ); ?>
|
||||
<div class="vc_cta3-content">
|
||||
<header class="vc_cta3-content-header">
|
||||
<?php echo $this->getTemplateVariable( 'heading1' ); ?>
|
||||
<?php echo $this->getTemplateVariable( 'heading2' ); ?>
|
||||
</header>
|
||||
<?php echo $this->getTemplateVariable( 'content' ); ?>
|
||||
</div>
|
||||
<?php echo $this->getTemplateVariable( 'actions-bottom' ); ?>
|
||||
<?php echo $this->getTemplateVariable( 'actions-right' ); ?>
|
||||
</div>
|
||||
<?php echo $this->getTemplateVariable( 'icons-bottom' ); ?>
|
||||
<?php echo $this->getTemplateVariable( 'icons-right' ); ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $color
|
||||
* @var $icon
|
||||
* @var $size
|
||||
* @var $target
|
||||
* @var $href
|
||||
* @var $title
|
||||
* @var $call_text
|
||||
* @var $position
|
||||
* @var $el_class
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Cta_button
|
||||
*/
|
||||
$color = $icon = $size = $target = $href = $target = $call_text = $position = $el_class = $css_animation = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
|
||||
if ( 'same' === $target || '_self' === $target ) {
|
||||
$target = '';
|
||||
}
|
||||
if ( '' !== $target ) {
|
||||
$target = ' target="' . esc_attr( $target ) . '"';
|
||||
}
|
||||
|
||||
$icon = ( '' !== $icon && 'none' !== $icon ) ? ' ' . $icon : '';
|
||||
$i_icon = ( '' !== $icon ) ? ' <i class="icon"> </i>' : '';
|
||||
|
||||
$color = ( '' !== $color ) ? ' wpb_' . $color : '';
|
||||
$size = ( '' !== $size && 'wpb_regularsize' !== $size ) ? ' wpb_' . $size : ' ' . $size;
|
||||
|
||||
$a_class = '';
|
||||
if ( '' !== $el_class ) {
|
||||
$tmp_class = explode( ' ', $el_class );
|
||||
if ( in_array( 'prettyphoto', $tmp_class ) ) {
|
||||
wp_enqueue_script( 'prettyphoto' );
|
||||
wp_enqueue_style( 'prettyphoto' );
|
||||
$a_class .= ' prettyphoto';
|
||||
$el_class = str_ireplace( 'prettyphoto', '', $el_class );
|
||||
}
|
||||
}
|
||||
|
||||
if ( '' !== $href ) {
|
||||
$button = '<span class="wpb_button ' . esc_attr( $color . $size . $icon ) . '">' . $title . $i_icon . '</span>';
|
||||
$button = '<a class="wpb_button_a' . esc_attr( $a_class ) . '" href="' . $href . '"' . $target . '>' . $button . '</a>';
|
||||
} else {
|
||||
$button = '';
|
||||
$el_class .= ' cta_no_button';
|
||||
}
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_call_to_action wpb_content_element vc_clearfix ' . $position . $el_class, $this->settings['base'], $atts );
|
||||
$css_class .= $this->getCSSAnimation( $css_animation );
|
||||
|
||||
$output .= '<div class="' . esc_attr( $css_class ) . '">';
|
||||
if ( 'cta_align_bottom' !== $position ) {
|
||||
$output .= $button;
|
||||
}
|
||||
$output .= apply_filters( 'wpb_cta_text', '<h2 class="wpb_call_text">' . $call_text . '</h2>', array( 'content' => $call_text ) );
|
||||
if ( 'cta_align_bottom' === $position ) {
|
||||
$output .= $button;
|
||||
}
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $h2
|
||||
* @var $h4
|
||||
* @var $position
|
||||
* @var $el_width
|
||||
* @var $style
|
||||
* @var $txt_align
|
||||
* @var $accent_color
|
||||
* @var $link
|
||||
* @var $title
|
||||
* @var $color
|
||||
* @var $size
|
||||
* @var $btn_style
|
||||
* @var $el_class
|
||||
* @var $css_animation
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Cta_button2
|
||||
*/
|
||||
$h2 = $h4 = $position = $el_class = $el_width = $size = $txt_align = $accent_color = $link = $title = $color = $size = $btn_style = $css_animation = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$class = 'vc_call_to_action wpb_content_element';
|
||||
|
||||
$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 = ( '' !== $accent_color ) ? ' style="' . vc_get_css_color( 'background-color', $accent_color ) . vc_get_css_color( 'border-color', $accent_color ) . '"' : '';
|
||||
|
||||
$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; ?> class="<?php echo esc_attr( trim( $css_class ) ); ?>">
|
||||
<?php if ( '' !== $link && 'bottom' !== $position ) {
|
||||
echo do_shortcode( '[vc_button2 align="' . $position . '" link="' . $link . '" title="' . $title . '" color="' . $color . '" size="' . $size . '" style="' . $btn_style . '" el_class="vc_cta_btn"]' );
|
||||
} ?>
|
||||
<?php if ( '' !== $h2 || '' !== $h4 ) : ?>
|
||||
<hgroup>
|
||||
<?php if ( '' !== $h2 ) : ?><h2 class="wpb_heading"><?php echo $h2; ?></h2><?php endif ?>
|
||||
<?php if ( '' !== $h4 ) : ?><h4 class="wpb_heading"><?php echo $h4; ?></h4><?php endif ?>
|
||||
</hgroup>
|
||||
<?php endif ?>
|
||||
<?php echo wpb_js_remove_wpautop( $content, true ); ?>
|
||||
<?php if ( '' !== $link && 'bottom' === $position ) {
|
||||
echo do_shortcode( '[vc_button2 link="' . $link . '" title="' . $title . '" color="' . $color . '" size="' . $size . '" style="' . $btn_style . '" el_class="vc_cta_btn"]' );
|
||||
} ?>
|
||||
</div>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* @var array $atts
|
||||
* @var string $field_key
|
||||
* @var string $custom_field_key
|
||||
* @var string $el_class
|
||||
*/
|
||||
$field_key = $custom_field_key = $el_class = '';
|
||||
|
||||
extract( shortcode_atts( array(
|
||||
'field_key' => '',
|
||||
'custom_field_key' => '',
|
||||
'el_class' => '',
|
||||
), $atts ) );
|
||||
|
||||
$key = strlen( $custom_field_key ) > 0 ? $custom_field_key : $field_key;
|
||||
|
||||
if ( strlen( $key ) ) : ?>
|
||||
<div class="vc_gitem-custom-field-<?php echo esc_attr( $key ) ?>">{{ post_meta_value:<?php echo esc_attr( $key ) ?>
|
||||
}}
|
||||
</div>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $source
|
||||
* @var $text
|
||||
* @var $link
|
||||
* @var $google_fonts
|
||||
* @var $font_container
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $css
|
||||
* @var $css_animation
|
||||
* @var $font_container_data - returned from $this->getAttributes
|
||||
* @var $google_fonts_data - returned from $this->getAttributes
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Custom_heading
|
||||
*/
|
||||
$source = $text = $link = $google_fonts = $font_container = $el_id = $el_class = $css = $css_animation = $font_container_data = $google_fonts_data = array();
|
||||
// This is needed to extract $font_container_data and $google_fonts_data
|
||||
extract( $this->getAttributes( $atts ) );
|
||||
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
/**
|
||||
* @var $css_class
|
||||
*/
|
||||
extract( $this->getStyles( $el_class . $this->getCSSAnimation( $css_animation ), $css, $google_fonts_data, $font_container_data, $atts ) );
|
||||
|
||||
$settings = get_option( 'wpb_js_google_fonts_subsets' );
|
||||
if ( is_array( $settings ) && ! empty( $settings ) ) {
|
||||
$subsets = '&subset=' . implode( ',', $settings );
|
||||
} else {
|
||||
$subsets = '';
|
||||
}
|
||||
|
||||
if ( ( ! isset( $atts['use_theme_fonts'] ) || 'yes' !== $atts['use_theme_fonts'] ) && isset( $google_fonts_data['values']['font_family'] ) ) {
|
||||
wp_enqueue_style( 'vc_google_fonts_' . vc_build_safe_css_class( $google_fonts_data['values']['font_family'] ), 'https://fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets );
|
||||
}
|
||||
|
||||
if ( ! empty( $styles ) ) {
|
||||
$style = 'style="' . esc_attr( implode( ';', $styles ) ) . '"';
|
||||
} else {
|
||||
$style = '';
|
||||
}
|
||||
|
||||
if ( 'post_title' === $source ) {
|
||||
$text = get_the_title( get_the_ID() );
|
||||
}
|
||||
|
||||
if ( ! empty( $link ) ) {
|
||||
$link = vc_build_link( $link );
|
||||
$text = '<a href="' . esc_attr( $link['url'] ) . '"' . ( $link['target'] ? ' target="' . esc_attr( $link['target'] ) . '"' : '' ) . ( $link['rel'] ? ' rel="' . esc_attr( $link['rel'] ) . '"' : '' ) . ( $link['title'] ? ' title="' . esc_attr( $link['title'] ) . '"' : '' ) . '>' . $text . '</a>';
|
||||
}
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '';
|
||||
if ( apply_filters( 'vc_custom_heading_template_use_wrapper', false ) ) {
|
||||
$output .= '<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>';
|
||||
$output .= '<' . $font_container_data['values']['tag'] . ' ' . $style . ' >';
|
||||
$output .= $text;
|
||||
$output .= '</' . $font_container_data['values']['tag'] . '>';
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$output .= '<' . $font_container_data['values']['tag'] . ' ' . $style . ' class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>';
|
||||
$output .= $text;
|
||||
$output .= '</' . $font_container_data['values']['tag'] . '>';
|
||||
}
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $height
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $css
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Empty_space
|
||||
*/
|
||||
$height = $el_class = $el_id = $css = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$pattern = '/^(\d*(?:\.\d+)?)\s*(px|\%|in|cm|mm|em|rem|ex|pt|pc|vw|vh|vmin|vmax)?$/';
|
||||
// allowed metrics: http://www.w3schools.com/cssref/css_units.asp
|
||||
$regexr = preg_match( $pattern, $height, $matches );
|
||||
$value = isset( $matches[1] ) ? (float) $matches[1] : (float) WPBMap::getParam( 'vc_empty_space', 'height' );
|
||||
$unit = isset( $matches[2] ) ? $matches[2] : 'px';
|
||||
$height = $value . $unit;
|
||||
|
||||
$inline_css = ( (float) $height >= 0.0 ) ? ' style="height: ' . esc_attr( $height ) . '"' : '';
|
||||
|
||||
$class = 'vc_empty_space ' . $this->getExtraClass( $el_class ) . vc_shortcode_custom_css_class( $css, ' ' );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class, $this->settings['base'], $atts );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
?>
|
||||
<div class="<?php echo esc_attr( trim( $css_class ) ); ?>" <?php echo implode( ' ', $wrapper_attributes ); ?> <?php echo $inline_css; ?> ><span class="vc_empty_space_inner"></span></div>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $type
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $css
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Facebook
|
||||
*/
|
||||
$type = $css = $el_class = $el_id = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$url = get_permalink();
|
||||
$el_class = isset( $el_class ) ? $el_class : '';
|
||||
|
||||
$class_to_filter = 'fb_like wpb_content_element fb_type_' . $type;
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '><iframe src="//www.facebook.com/plugins/like.php?href='
|
||||
. $url . '&layout='
|
||||
. $type . '&show_faces=false&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true"></iframe></div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $title
|
||||
* @var $flickr_id
|
||||
* @var $count
|
||||
* @var $type
|
||||
* @var $display
|
||||
* @var $css
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_flickr
|
||||
*/
|
||||
$el_class = $el_id = $title = $flickr_id = $css = $css_animation = $count = $type = $display = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$class_to_filter = 'wpb_flickr_widget wpb_content_element';
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '
|
||||
<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>
|
||||
<div class="wpb_wrapper">
|
||||
' . wpb_widget_title( array(
|
||||
'title' => $title,
|
||||
'extraclass' => 'wpb_flickr_heading',
|
||||
) ) . '
|
||||
<script type="text/javascript" src="//www.flickr.com/badge_code_v2.gne?count=' . $count . '&display=' . $display . '&size=s&layout=x&source=' . $type . '&' . $type . '=' . $flickr_id . '"></script>
|
||||
<p class="flickr_stream_wrap"><a class="wpb_follow_btn wpb_flickr_stream" href="//www.flickr.com/photos/' . $flickr_id . '">' . __( 'View stream on flickr', 'js_composer' ) . '</a></p>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,176 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $source
|
||||
* @var $type
|
||||
* @var $onclick
|
||||
* @var $custom_links
|
||||
* @var $custom_links_target
|
||||
* @var $img_size
|
||||
* @var $external_img_size
|
||||
* @var $images
|
||||
* @var $custom_srcs
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $interval
|
||||
* @var $css
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_gallery
|
||||
*/
|
||||
$thumbnail = '';
|
||||
$title = $source = $type = $onclick = $custom_links = $custom_links_target = $img_size = $external_img_size = $images = $custom_srcs = $el_class = $el_id = $interval = $css = $css_animation = '';
|
||||
$large_img_src = '';
|
||||
|
||||
$attributes = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $attributes );
|
||||
|
||||
$default_src = vc_asset_url( 'vc/no_image.png' );
|
||||
|
||||
$gal_images = '';
|
||||
$link_start = '';
|
||||
$link_end = '';
|
||||
$el_start = '';
|
||||
$el_end = '';
|
||||
$slides_wrap_start = '';
|
||||
$slides_wrap_end = '';
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
if ( 'nivo' === $type ) {
|
||||
$type = ' wpb_slider_nivo theme-default';
|
||||
wp_enqueue_script( 'nivo-slider' );
|
||||
wp_enqueue_style( 'nivo-slider-css' );
|
||||
wp_enqueue_style( 'nivo-slider-theme' );
|
||||
|
||||
$slides_wrap_start = '<div class="nivoSlider">';
|
||||
$slides_wrap_end = '</div>';
|
||||
} elseif ( 'flexslider' === $type || 'flexslider_fade' === $type || 'flexslider_slide' === $type || 'fading' === $type ) {
|
||||
$el_start = '<li>';
|
||||
$el_end = '</li>';
|
||||
$slides_wrap_start = '<ul class="slides">';
|
||||
$slides_wrap_end = '</ul>';
|
||||
wp_enqueue_style( 'flexslider' );
|
||||
wp_enqueue_script( 'flexslider' );
|
||||
} elseif ( 'image_grid' === $type ) {
|
||||
wp_enqueue_script( 'vc_grid-js-imagesloaded' );
|
||||
wp_enqueue_script( 'isotope' );
|
||||
wp_enqueue_style( 'isotope-css' );
|
||||
|
||||
$el_start = '<li class="isotope-item">';
|
||||
$el_end = '</li>';
|
||||
$slides_wrap_start = '<ul class="wpb_image_grid_ul">';
|
||||
$slides_wrap_end = '</ul>';
|
||||
}
|
||||
|
||||
if ( 'link_image' === $onclick ) {
|
||||
wp_enqueue_script( 'prettyphoto' );
|
||||
wp_enqueue_style( 'prettyphoto' );
|
||||
}
|
||||
|
||||
$flex_fx = '';
|
||||
if ( 'flexslider' === $type || 'flexslider_fade' === $type || 'fading' === $type ) {
|
||||
$type = ' wpb_flexslider flexslider_fade flexslider';
|
||||
$flex_fx = ' data-flex_fx="fade"';
|
||||
} elseif ( 'flexslider_slide' === $type ) {
|
||||
$type = ' wpb_flexslider flexslider_slide flexslider';
|
||||
$flex_fx = ' data-flex_fx="slide"';
|
||||
} elseif ( 'image_grid' === $type ) {
|
||||
$type = ' wpb_image_grid';
|
||||
}
|
||||
|
||||
if ( '' === $images ) {
|
||||
$images = '-1,-2,-3';
|
||||
}
|
||||
|
||||
$pretty_rel_random = ' data-rel="prettyPhoto[rel-' . get_the_ID() . '-' . rand() . ']"';
|
||||
|
||||
if ( 'custom_link' === $onclick ) {
|
||||
$custom_links = vc_value_from_safe( $custom_links );
|
||||
$custom_links = explode( ',', $custom_links );
|
||||
}
|
||||
|
||||
switch ( $source ) {
|
||||
case 'media_library':
|
||||
$images = explode( ',', $images );
|
||||
break;
|
||||
|
||||
case 'external_link':
|
||||
$images = vc_value_from_safe( $custom_srcs );
|
||||
$images = explode( ',', $images );
|
||||
|
||||
break;
|
||||
}
|
||||
foreach ( $images as $i => $image ) {
|
||||
switch ( $source ) {
|
||||
case 'media_library':
|
||||
if ( $image > 0 ) {
|
||||
$img = wpb_getImageBySize( array(
|
||||
'attach_id' => $image,
|
||||
'thumb_size' => $img_size,
|
||||
) );
|
||||
$thumbnail = $img['thumbnail'];
|
||||
$large_img_src = $img['p_img_large'][0];
|
||||
} else {
|
||||
$large_img_src = $default_src;
|
||||
$thumbnail = '<img src="' . $default_src . '" />';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'external_link':
|
||||
$image = esc_attr( $image );
|
||||
$dimensions = vcExtractDimensions( $external_img_size );
|
||||
$hwstring = $dimensions ? image_hwstring( $dimensions[0], $dimensions[1] ) : '';
|
||||
$thumbnail = '<img ' . $hwstring . ' src="' . $image . '" />';
|
||||
$large_img_src = $image;
|
||||
break;
|
||||
}
|
||||
|
||||
$link_start = $link_end = '';
|
||||
|
||||
switch ( $onclick ) {
|
||||
case 'img_link_large':
|
||||
$link_start = '<a href="' . $large_img_src . '" target="' . $custom_links_target . '">';
|
||||
$link_end = '</a>';
|
||||
break;
|
||||
|
||||
case 'link_image':
|
||||
$link_start = '<a class="prettyphoto" href="' . $large_img_src . '"' . $pretty_rel_random . '>';
|
||||
$link_end = '</a>';
|
||||
break;
|
||||
|
||||
case 'custom_link':
|
||||
if ( ! empty( $custom_links[ $i ] ) ) {
|
||||
$link_start = '<a href="' . $custom_links[ $i ] . '"' . ( ! empty( $custom_links_target ) ? ' target="' . $custom_links_target . '"' : '' ) . '>';
|
||||
$link_end = '</a>';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$gal_images .= $el_start . $link_start . $thumbnail . $link_end . $el_end;
|
||||
}
|
||||
|
||||
$class_to_filter = 'wpb_gallery wpb_content_element vc_clearfix';
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '';
|
||||
$output .= '<div class="' . $css_class . '" ' . implode( ' ', $wrapper_attributes ) . '>';
|
||||
$output .= '<div class="wpb_wrapper">';
|
||||
$output .= wpb_widget_title( array(
|
||||
'title' => $title,
|
||||
'extraclass' => 'wpb_gallery_heading',
|
||||
) );
|
||||
$output .= '<div class="wpb_gallery_slides' . $type . '" data-interval="' . $interval . '"' . $flex_fx . '>' . $slides_wrap_start . $gal_images . $slides_wrap_end . '</div>';
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $width
|
||||
* @var $is_end
|
||||
* @var $css
|
||||
* @var $c_zone_position
|
||||
* @var $bgimage
|
||||
* @var $height
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Gitem
|
||||
*/
|
||||
$el_class = $width = $is_end = $css = $c_zone_position = $bgimage = $height = '';
|
||||
|
||||
extract( shortcode_atts( array(
|
||||
'el_class' => '',
|
||||
'width' => '12',
|
||||
'is_end' => '',
|
||||
'css' => '',
|
||||
'c_zone_position' => '',
|
||||
'bgimage' => '',
|
||||
'height' => '',
|
||||
), $atts ) );
|
||||
|
||||
$css_class = 'vc_grid-item vc_clearfix' . ( 'true' === $is_end ? ' vc_grid-last-item' : '' )
|
||||
. ( strlen( $el_class ) ? ' ' . $el_class : '' )
|
||||
. ' vc_col-sm-'
|
||||
. $width
|
||||
. ( ! empty( $c_zone_position ) ? ' vc_grid-item-zone-c-' . $c_zone_position : '' );
|
||||
$css_class_mini = 'vc_grid-item-mini vc_clearfix ' . vc_shortcode_custom_css_class( $css, ' ' );
|
||||
$css_class .= '{{ filter_terms_css_classes }}';
|
||||
$css_style = '';
|
||||
|
||||
if ( 'featured' === $bgimage ) {
|
||||
$css_style = 'background-image: url(\'{{ post_image_url }}\');';
|
||||
$css_class .= ' vc_grid-item-background-cover';
|
||||
}
|
||||
if ( strlen( $height ) > 0 ) {
|
||||
$css_style .= 'height: ' . $height . ';';
|
||||
}
|
||||
$output = '<div class="' . esc_attr( $css_class ) . '"'
|
||||
. ( empty( $css_style ) ? '' : ' style="' . esc_attr( $css_style ) . '"' )
|
||||
. '><div class="' . $css_class_mini . '">' . do_shortcode( $content )
|
||||
. '</div><div class="vc_clearfix"></div></div>';
|
||||
echo $output;
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $css
|
||||
* @var $animation
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Gitem_Animated_Block
|
||||
*/
|
||||
$css = $animation = $animation_attr = '';
|
||||
|
||||
extract( shortcode_atts( array(
|
||||
'css' => '', // unmapped
|
||||
'animation' => '',
|
||||
), $atts ) );
|
||||
|
||||
$css_style = '';
|
||||
$css_class = 'vc_gitem-animated-block ' . vc_shortcode_custom_css_class( $css, ' ' );
|
||||
if ( ! empty( $animation ) ) {
|
||||
$css_class .= ' vc_gitem-animate vc_gitem-animate-' . $animation;
|
||||
$animation_attr .= ' data-vc-animation="' . esc_attr( $animation ) . '"';
|
||||
} elseif ( 'vc_gitem_preview' !== vc_request_param( 'action' ) && vc_verify_admin_nonce() && ( current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ) ) ) {
|
||||
$content = preg_replace( '/(?<=\[)(vc_gitem_zone_b\b)/', '$1 render="no"', $content );
|
||||
}
|
||||
?>
|
||||
<div class="<?php echo esc_attr( $css_class ) ?>"<?php echo $animation_attr ?><?php
|
||||
echo( empty( $css_style ) ? '' : ' style="' . esc_attr( $css_style ) . '"' )
|
||||
?>><?php echo do_shortcode( $content ) ?></div>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $background_color
|
||||
* @var $float
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Gitem
|
||||
*/
|
||||
$el_class = $background_color = $float = '';
|
||||
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
if ( ! empty( $background_color ) ) {
|
||||
$background_color = ' vc_bg-' . $background_color;
|
||||
}
|
||||
echo '<div class="vc_gitem-block' . esc_attr( $background_color )
|
||||
. ( strlen( $el_class ) > 0 ? ' ' . esc_attr( $el_class ) : '' )
|
||||
. ' vc_gitem-float-' . esc_attr( $float )
|
||||
. '">'
|
||||
. do_shortcode( $content ) . '</div>';
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $width
|
||||
* @var $align
|
||||
* @var $css
|
||||
* @var $el_class
|
||||
* @var $featured_image
|
||||
* @var $img_size
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Gitem_Col
|
||||
*/
|
||||
$width = $align = $css = $el_class = $featured_image = $img_size = '';
|
||||
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
|
||||
extract( $atts );
|
||||
// TODO: Note that vc_map_get_attributes doesnt return align so it should be checked in next bug fix
|
||||
|
||||
$style = '';
|
||||
$width = wpb_translateColumnWidthToSpan( $width );
|
||||
$css_class = $width
|
||||
. ( strlen( $el_class ) ? ' ' . $el_class : '' )
|
||||
. ' vc_gitem-col vc_gitem-col-align-' . $align
|
||||
. vc_shortcode_custom_css_class( $css, ' ' );
|
||||
|
||||
if ( 'yes' === $featured_image ) {
|
||||
$style = '{{ post_image_background_image_css' . ':' . $img_size . ' }}';
|
||||
}
|
||||
echo '<div class="' . $css_class . '"'
|
||||
. ( strlen( $style ) > 0 ? ' style="' . $style . '"' : '' )
|
||||
. '>'
|
||||
. do_shortcode( $content )
|
||||
. '</div>';
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
?>{{ featured_image:<?php echo http_build_query( $atts ) ?> }}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Gitem_Post_Author
|
||||
*/
|
||||
|
||||
$atts = $this->getAttributes( $atts );
|
||||
|
||||
$styles = $this->getStyles( $atts['el_class'], $atts['css'], $atts['google_fonts_data'], $atts['font_container_data'], $atts );
|
||||
|
||||
if ( ! empty( $atts['link'] ) ) {
|
||||
$atts['link'] = 'post_author';
|
||||
$link_html = vc_gitem_create_link( $atts );
|
||||
}
|
||||
$use_custom_fonts = isset( $atts['use_custom_fonts'] ) && 'yes' === $atts['use_custom_fonts'];
|
||||
$settings = get_option( 'wpb_js_google_fonts_subsets' );
|
||||
$subsets = '';
|
||||
if ( is_array( $settings ) && ! empty( $settings ) ) {
|
||||
$subsets = '&subset=' . implode( ',', $settings );
|
||||
}
|
||||
$content = '{{ post_author }}';
|
||||
if ( ! empty( $link_html ) ) {
|
||||
$content = '<' . $link_html . '>' . $content . '</a>';
|
||||
}
|
||||
$css_class = array(
|
||||
$styles['css_class'],
|
||||
'vc_gitem-post-data',
|
||||
);
|
||||
$css_class[] = 'vc_gitem-post-data-source-post_author';
|
||||
if ( $use_custom_fonts && ! empty( $atts['google_fonts_data'] ) && isset( $atts['google_fonts_data']['values']['font_family'] ) ) {
|
||||
wp_enqueue_style( 'vc_google_fonts_' . vc_build_safe_css_class( $atts['google_fonts_data']['values']['font_family'] ), 'https://fonts.googleapis.com/css?family=' . $atts['google_fonts_data']['values']['font_family'] . $subsets );
|
||||
}
|
||||
$output .= '<div class="' . esc_attr( implode( ' ', $css_class ) ) . '" >';
|
||||
$style = '';
|
||||
if ( ! empty( $styles['styles'] ) ) {
|
||||
$style = 'style="' . esc_attr( implode( ';', $styles['styles'] ) ) . '"';
|
||||
}
|
||||
$output .= '<' . $atts['font_container_data']['values']['tag'] . ' ' . $style . ' >';
|
||||
$output .= $content;
|
||||
$output .= '</' . $atts['font_container_data']['values']['tag'] . '>';
|
||||
$output .= '</div>';
|
||||
echo $output;
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Gitem_Post_Categories
|
||||
*/
|
||||
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
|
||||
?>
|
||||
{{ post_categories:<?php echo http_build_query( array(
|
||||
'atts' => $atts,
|
||||
) ); ?> }}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Gitem_Post_Data
|
||||
*/
|
||||
$output = $text = $google_fonts = $font_container = $el_class = $css = $font_container_data = $link_html = '';
|
||||
$google_fonts_data = array();
|
||||
extract( $this->getAttributes( $atts ) );
|
||||
|
||||
extract( $this->getStyles( $el_class, $css, $google_fonts_data, $font_container_data, $atts ) );
|
||||
|
||||
$data_source = $this->getDataSource( $atts );
|
||||
if ( isset( $atts['link'] ) && '' !== $atts['link'] && 'none' !== $atts['link'] ) {
|
||||
$link_html = vc_gitem_create_link( $atts );
|
||||
}
|
||||
$use_custom_fonts = isset( $atts['use_custom_fonts'] ) && 'yes' === $atts['use_custom_fonts'];
|
||||
$settings = get_option( 'wpb_js_google_fonts_subsets' );
|
||||
$subsets = '';
|
||||
if ( is_array( $settings ) && ! empty( $settings ) ) {
|
||||
$subsets = '&subset=' . implode( ',', $settings );
|
||||
}
|
||||
$content = '{{ post_data:' . esc_attr( $data_source ) . ' }}';
|
||||
if ( ! empty( $link_html ) ) {
|
||||
$content = '<' . $link_html . '>' . $content . '</a>';
|
||||
}
|
||||
$css_class .= ' vc_gitem-post-data';
|
||||
if ( $data_source ) {
|
||||
$css_class .= ' vc_gitem-post-data-source-' . $data_source;
|
||||
}
|
||||
if ( $use_custom_fonts && ! empty( $google_fonts_data ) && isset( $google_fonts_data['values']['font_family'] ) ) {
|
||||
wp_enqueue_style( 'vc_google_fonts_' . vc_build_safe_css_class( $google_fonts_data['values']['font_family'] ), 'https://fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets );
|
||||
}
|
||||
$output .= '<div class="' . esc_attr( $css_class ) . '" >';
|
||||
$style = '';
|
||||
if ( ! empty( $styles ) ) {
|
||||
$style = 'style="' . esc_attr( implode( ';', $styles ) ) . '"';
|
||||
}
|
||||
$output .= '<' . $font_container_data['values']['tag'] . ' ' . $style . ' >';
|
||||
$output .= $content;
|
||||
$output .= '</' . $font_container_data['values']['tag'] . '>';
|
||||
$output .= '</div>';
|
||||
echo $output;
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $key
|
||||
* @var $el_class
|
||||
* @var $align
|
||||
* @var $label
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Gitem_Post_Meta
|
||||
*/
|
||||
$key = $el_class = $align = $label = '';
|
||||
$label_html = '';
|
||||
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$css_class = 'vc_gitem-post-meta-field-' . $key
|
||||
. ( strlen( $el_class ) ? ' ' . $el_class : '' )
|
||||
. ( strlen( $align ) ? ' vc_gitem-align-' . $align : '' );
|
||||
if ( strlen( $label ) ) {
|
||||
$label_html = '<span class="vc_gitem-post-meta-label">' . esc_html( $label ) . '</span>';
|
||||
}
|
||||
if ( strlen( $key ) ) : ?>
|
||||
<div class="<?php echo esc_attr( $css_class ) ?>"><?php echo $label_html ?> {{ post_meta_value:<?php echo esc_attr( $key ) ?> }}
|
||||
</div>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $css
|
||||
* @var $el_class
|
||||
* @var $position
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Gitem_Row
|
||||
*/
|
||||
$css = $el_class = $position = '';
|
||||
|
||||
extract( shortcode_atts( array(
|
||||
'css' => '',
|
||||
'el_class' => '',
|
||||
'position' => 'top',
|
||||
), $atts ) );
|
||||
|
||||
$css_class = 'vc_gitem_row vc_row'
|
||||
. ( strlen( $el_class ) ? ' ' . $el_class : '' )
|
||||
. vc_shortcode_custom_css_class( $css, ' ' )
|
||||
. ( $position ? ' vc_gitem-row-position-' . $position : '' );
|
||||
if ( ! vc_gitem_has_content( $content ) ) {
|
||||
return;
|
||||
}
|
||||
echo '<div class="' . esc_attr( $css_class ) . '">' . do_shortcode( $content ) . '</div>';
|
||||
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $css
|
||||
* @var $position
|
||||
* @var $bgimage
|
||||
* @var $height
|
||||
* @var $link
|
||||
* @var $url
|
||||
* @var $height_mode
|
||||
* @var $featured_image
|
||||
* @var $img_size
|
||||
* @var $render
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Gitem_Zone
|
||||
*/
|
||||
$el_class = $css = $position = $bgimage = $height = $link = $url = $height_mode = $featured_image = $img_size = $render = $rel = '';
|
||||
|
||||
$css_style = $css_style_mini = '';
|
||||
$image_block = $image = '';
|
||||
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
if ( 'no' === $render ) {
|
||||
echo '';
|
||||
|
||||
return;
|
||||
}
|
||||
// Here we check content. If it doesn't contain any useful content, not to render all this staff.
|
||||
if ( 'yes' !== $featured_image && empty( $css ) && empty( $el_class ) && empty( $height ) && ! vc_gitem_has_content( $content ) ) {
|
||||
return;
|
||||
}
|
||||
$css_class = 'vc_gitem-zone'
|
||||
. ( strlen( $this->zone_name ) ? ' vc_gitem-zone-' . $this->zone_name : '' );
|
||||
$css_class_mini = 'vc_gitem-zone-mini';
|
||||
// Autoheight Mode
|
||||
// http://jsfiddle.net/tL2pgtyb/4/ {{
|
||||
// Set css classes for shortcode main html element wrapper and background block
|
||||
$css_class .= vc_shortcode_custom_css_class( $css, ' ' )
|
||||
. ( strlen( $el_class ) ? ' ' . $el_class : '' );
|
||||
preg_match( '/background(\-image)?\s*\:\s*[^\s]*?\s*url\(\'?([^\)]+)\'?\)/', $css, $img_matches );
|
||||
$background_image_css_editor = isset( $img_matches[2] ) ? $img_matches[2] : false;
|
||||
if ( 'custom' === $height_mode ) {
|
||||
if ( strlen( $height ) > 0 ) {
|
||||
if ( preg_match( '/^\d+$/', $height ) ) {
|
||||
$height .= 'px';
|
||||
}
|
||||
$css_style .= 'height: ' . $height . ';';
|
||||
}
|
||||
} elseif ( 'original' !== $height_mode ) {
|
||||
$css_class .= ' vc-gitem-zone-height-mode-auto'
|
||||
. ( strlen( $height_mode ) > 0 ? ' vc-gitem-zone-height-mode-auto-' . $height_mode : '' );
|
||||
}
|
||||
if ( 'yes' === $featured_image ) {
|
||||
$css_style .= '{{ post_image_background_image_css' . ':' . $img_size . ' }}';
|
||||
$image = '<img src="{{ post_image_url' . ( false !== $background_image_css_editor ? ':' . rawurlencode( $background_image_css_editor ) . '' : ':' ) . ':' . $img_size . ' }}" class="vc_gitem-zone-img" alt="{{ post_image_alt }}">';
|
||||
} elseif ( false !== $background_image_css_editor ) {
|
||||
$image = '<img src="' . esc_attr( $background_image_css_editor ) . '" class="vc_gitem-zone-img" alt="{{ post_image_alt }}">';
|
||||
}
|
||||
if ( strlen( $link ) > 0 && 'none' !== $link ) {
|
||||
$css_class .= ' vc_gitem-is-link';
|
||||
if ( 'custom' === $link && ! empty( $url ) ) {
|
||||
$link_s = vc_build_link( $url );
|
||||
/*
|
||||
$attr = ' data-vc-link="' . esc_attr( $link_s['url'] ) . '"'
|
||||
. ' data-vc-target="' . esc_attr( trim($link_s['target']) ) . '"'
|
||||
. ' title="' . esc_attr( $link_s['title'] ) . '"';
|
||||
*/
|
||||
$rel = '';
|
||||
if ( ! empty( $link_s['rel'] ) ) {
|
||||
$rel = ' rel="' . esc_attr( trim( $link_s['rel'] ) ) . '"';
|
||||
}
|
||||
$image_block = '<a href="' . esc_attr( $link_s['url'] ) . '" title="'
|
||||
. esc_attr( $link_s['title'] ) . '" target="' . esc_attr( trim( $link_s['target'] ) )
|
||||
. '" class="vc_gitem-link vc-zone-link"' . $rel . '></a>';
|
||||
} elseif ( 'post_link' === $link ) {
|
||||
$image_block = '<a href="{{ post_link_url }}" title="{{ post_title }}" class="vc_gitem-link vc-zone-link"></a>';
|
||||
} elseif ( 'post_author' === $link ) {
|
||||
$image_block = '<a href="{{ post_author_href }}" title="{{ post_author }}" class="vc_gitem-link vc-zone-link"></a>';
|
||||
} elseif ( 'image' === $link ) {
|
||||
$image_block = '<a href="{{ post_image_url }}" title="{{ post_title }}" class="vc_gitem-link vc-zone-link"></a>';
|
||||
} elseif ( 'image_lightbox' === $link ) {
|
||||
if ( ! isset( $this->prettyphoto_rel ) ) {
|
||||
$this->prettyphoto_rel = ' data-rel="prettyPhoto[rel-' . get_the_ID() . '-' . rand() . ']"';
|
||||
}
|
||||
$image_block .= '<a href="{{ post_image_url }}" title="{{ post_title }}" ' . $this->prettyphoto_rel . ' data-vc-gitem-zone="prettyphotoLink" class="vc_gitem-link prettyphoto vc-zone-link vc-prettyphoto-link"></a>';
|
||||
}
|
||||
$image_block = apply_filters( 'vc_gitem_zone_image_block_link', $image_block, $link, 'vc_gitem-link vc-zone-link' );
|
||||
}
|
||||
?>
|
||||
<div class="<?php echo esc_attr( $css_class ) ?>"<?php
|
||||
echo( empty( $css_style ) ? '' : ' style="' . esc_attr( $css_style ) . '"' )
|
||||
?>>
|
||||
<?php echo $image_block ?>
|
||||
<?php echo $image ?>
|
||||
<div class="<?php echo esc_attr( $css_class_mini ) ?>"<?php echo( empty( $css_style_mini ) ? '' : ' style="' . esc_attr( $css_style_mini ) . '"' ) ?>>
|
||||
<?php echo do_shortcode( $content ) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $css
|
||||
* @var $render
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Gitem_Zone
|
||||
*/
|
||||
$el_class = $css = $render = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
extract( $atts );
|
||||
|
||||
if ( 'no' === $render ) {
|
||||
echo '';
|
||||
|
||||
return;
|
||||
}
|
||||
$css_class = 'vc_gitem-zone'
|
||||
. ( strlen( $this->zone_name ) ? ' vc_gitem-zone-' . $this->zone_name : '' )
|
||||
. $this->getExtraClass( $el_class );
|
||||
|
||||
$css_class_mini = 'vc_gitem-zone-mini';
|
||||
$css_class .= vc_shortcode_custom_css_class( $css, ' ' );
|
||||
?>
|
||||
<div class="<?php echo esc_attr( $css_class ) ?>">
|
||||
<div class="<?php echo esc_attr( $css_class_mini ) ?>">
|
||||
<?php echo do_shortcode( $content ) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $link
|
||||
* @var $size
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $css
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Gmaps
|
||||
*/
|
||||
$title = $link = $size = $el_class = $css = $css_animation = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$zoom = 14; // deprecated 4.0.2. In 4.6 was moved outside from shortcode_atts
|
||||
$type = 'm'; // deprecated 4.0.2
|
||||
$bubble = ''; // deprecated 4.0.2
|
||||
|
||||
if ( '' === $link ) {
|
||||
return null;
|
||||
}
|
||||
$link = trim( vc_value_from_safe( $link ) );
|
||||
$bubble = ( '' !== $bubble && '0' !== $bubble ) ? '&iwloc=near' : '';
|
||||
$size = str_replace( array(
|
||||
'px',
|
||||
' ',
|
||||
), array(
|
||||
'',
|
||||
'',
|
||||
), $size );
|
||||
|
||||
if ( is_numeric( $size ) ) {
|
||||
$link = preg_replace( '/height="[0-9]*"/', 'height="' . $size . '"', $link );
|
||||
}
|
||||
|
||||
$class_to_filter = 'wpb_gmaps_widget wpb_content_element' . ( '' === $size ? ' vc_map_responsive' : '' );
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
?>
|
||||
<div class="<?php echo esc_attr( $css_class ); ?>" <?php echo implode( ' ', $wrapper_attributes ); ?>>
|
||||
<?php echo wpb_widget_title( array(
|
||||
'title' => $title,
|
||||
'extraclass' => 'wpb_map_heading',
|
||||
) ); ?>
|
||||
<div class="wpb_wrapper">
|
||||
<div class="wpb_map_wraper">
|
||||
<?php
|
||||
if ( preg_match( '/^\<iframe/', $link ) ) {
|
||||
echo $link;
|
||||
} else {
|
||||
// TODO: refactor or remove outdated/deprecated attributes that is not mapped in gmaps.
|
||||
echo '<iframe width="100%" height="' . $size . '" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="' . $link . '&t=' . $type . '&z=' . $zoom . '&output=embed' . $bubble . '"></iframe>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $type
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $annotation
|
||||
* @var $widget_width
|
||||
* @var $css
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_GooglePlus
|
||||
*/
|
||||
$type = $annotation = $widget_width = $css = $el_class = $el_id = $css_animation = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
if ( empty( $annotation ) ) {
|
||||
$annotation = 'bubble';
|
||||
}
|
||||
$params = '';
|
||||
$params .= ( '' !== $type ) ? ' size="' . $type . '"' : '';
|
||||
$params .= ( '' !== $annotation ) ? ' annotation="' . $annotation . '"' : '';
|
||||
|
||||
if ( empty( $type ) ) {
|
||||
$type = 'standard';
|
||||
}
|
||||
if ( 'inline' === $annotation && strlen( $widget_width ) > 0 ) {
|
||||
$params .= ' width="' . (int) $widget_width . '"';
|
||||
}
|
||||
|
||||
$class_to_filter = 'wpb_googleplus wpb_content_element wpb_googleplus_type_' . $type . ' vc_googleplus-annotation-' . $annotation . $this->getCSSAnimation( $css_animation ) . $this->getExtraClass( $el_class );
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '><g:plusone' . $params . '></g:plusone></div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $css_animation
|
||||
* @var $css
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Gutenberg
|
||||
*/
|
||||
$el_class = $el_id = $css = $css_animation = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$class_to_filter = 'vc_gutenberg wpb_content_element ' . $this->getCSSAnimation( $css_animation );
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '
|
||||
<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>
|
||||
<div class="wpb_wrapper">
|
||||
' . wpb_js_remove_wpautop( $content, true ) . '
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* @var $this \WPBakeryShortCode_VC_Hoverbox
|
||||
* @var $atts array
|
||||
* @var $content string
|
||||
*/
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
|
||||
if ( ! empty( $atts['image'] ) ) {
|
||||
$image = intval( $atts['image'] );
|
||||
$image_data = wp_get_attachment_image_src( $image, 'large' );
|
||||
$image_src = $image_data[0];
|
||||
} else {
|
||||
$image_src = vc_asset_url( 'vc/no_image.png' );
|
||||
}
|
||||
$image_src = esc_url( $image_src );
|
||||
|
||||
$align = 'vc-hoverbox-align--' . esc_attr( $atts['align'] );
|
||||
$shape = 'vc-hoverbox-shape--' . esc_attr( $atts['shape'] );
|
||||
$width = 'vc-hoverbox-width--' . esc_attr( $atts['el_width'] );
|
||||
$reverse = 'vc-hoverbox-direction--default';
|
||||
if ( ! empty( $atts['reverse'] ) ) {
|
||||
$reverse = 'vc-hoverbox-direction--reverse';
|
||||
}
|
||||
$id = '';
|
||||
if ( ! empty( $atts['el_id'] ) ) {
|
||||
$id = 'id="' . esc_attr( $atts['el_id'] ) . '"';
|
||||
}
|
||||
|
||||
$class_to_filter = vc_shortcode_custom_css_class( $atts['css'], ' ' ) . $this->getExtraClass( $atts['el_class'] ) . $this->getCSSAnimation( $atts['css_animation'] );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
// Hover Background color
|
||||
if ( 'custom' !== $atts['hover_background_color'] ) {
|
||||
$hover_background_color = vc_convert_vc_color( $atts['hover_background_color'] );
|
||||
} else {
|
||||
$hover_background_color = esc_attr( $atts['hover_custom_background'] );
|
||||
}
|
||||
|
||||
$primary_title = $this->getHeading( 'primary_title', $atts, $atts['primary_align'] );
|
||||
$hover_title = $this->getHeading( 'hover_title', $atts, $atts['hover_align'] );
|
||||
|
||||
$content = wpb_js_remove_wpautop( $content, true );
|
||||
$button = '';
|
||||
if ( $atts['hover_add_button'] ) {
|
||||
$button = $this->renderButton( $atts );
|
||||
}
|
||||
$template = <<<HTML
|
||||
<div class="vc-hoverbox-wrapper $css_class $shape $align $reverse $width" $id>
|
||||
<div class="vc-hoverbox">
|
||||
<div class="vc-hoverbox-inner">
|
||||
<div class="vc-hoverbox-block vc-hoverbox-front" style="background-image: url($image_src);">
|
||||
<div class="vc-hoverbox-block-inner vc-hoverbox-front-inner">
|
||||
$primary_title
|
||||
</div>
|
||||
</div>
|
||||
<div class="vc-hoverbox-block vc-hoverbox-back" style="background-color: $hover_background_color;">
|
||||
<div class="vc-hoverbox-block-inner vc-hoverbox-back-inner">
|
||||
$hover_title
|
||||
$content
|
||||
$button
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
HTML;
|
||||
|
||||
echo $template;
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $type
|
||||
* @var $icon_fontawesome
|
||||
* @var $icon_openiconic
|
||||
* @var $icon_typicons
|
||||
* @var $icon_entypo
|
||||
* @var $icon_linecons
|
||||
* @var $color
|
||||
* @var $custom_color
|
||||
* @var $background_style
|
||||
* @var $background_color
|
||||
* @var $custom_background_color
|
||||
* @var $size
|
||||
* @var $align
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $link
|
||||
* @var $css_animation
|
||||
* @var $css
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Icon
|
||||
*/
|
||||
$type = $icon_fontawesome = $icon_openiconic = $icon_typicons = $icon_entypo = $icon_linecons = $color = $custom_color = $background_style = $background_color = $custom_background_color = $size = $align = $el_class = $el_id = $link = $css_animation = $css = $rel = '';
|
||||
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$class_to_filter = '';
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
// Enqueue needed icon font.
|
||||
vc_icon_element_fonts_enqueue( $type );
|
||||
|
||||
$url = vc_build_link( $link );
|
||||
$has_style = false;
|
||||
if ( strlen( $background_style ) > 0 ) {
|
||||
$has_style = true;
|
||||
if ( false !== strpos( $background_style, 'outline' ) ) {
|
||||
$background_style .= ' vc_icon_element-outline'; // if we use outline style it is border in css
|
||||
} else {
|
||||
$background_style .= ' vc_icon_element-background';
|
||||
}
|
||||
}
|
||||
|
||||
$iconClass = isset( ${'icon_' . $type} ) ? esc_attr( ${'icon_' . $type} ) : 'fa fa-adjust';
|
||||
|
||||
$style = '';
|
||||
if ( 'custom' === $background_color ) {
|
||||
if ( false !== strpos( $background_style, 'outline' ) ) {
|
||||
$style = 'border-color:' . $custom_background_color;
|
||||
} else {
|
||||
$style = 'background-color:' . $custom_background_color;
|
||||
}
|
||||
}
|
||||
$style = $style ? ' style="' . esc_attr( $style ) . '"' : '';
|
||||
$rel = '';
|
||||
if ( ! empty( $url['rel'] ) ) {
|
||||
$rel = ' rel="' . esc_attr( $url['rel'] ) . '"';
|
||||
}
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
?>
|
||||
<div <?php echo implode( ' ', $wrapper_attributes ); ?>
|
||||
class="vc_icon_element vc_icon_element-outer<?php echo strlen( $css_class ) > 0 ? ' ' . trim( esc_attr( $css_class ) ) : ''; ?> vc_icon_element-align-<?php echo esc_attr( $align );
|
||||
if ( $has_style ) {
|
||||
echo ' vc_icon_element-have-style';
|
||||
} ?>">
|
||||
<div class="vc_icon_element-inner vc_icon_element-color-<?php echo esc_attr( $color );
|
||||
if ( $has_style ) {
|
||||
echo ' vc_icon_element-have-style-inner';
|
||||
} ?> vc_icon_element-size-<?php echo esc_attr( $size ); ?> vc_icon_element-style-<?php echo esc_attr( $background_style ); ?> vc_icon_element-background-color-<?php echo esc_attr( $background_color ); ?>"<?php echo $style ?>>
|
||||
<span class="vc_icon_element-icon <?php echo $iconClass; ?>" <?php echo( 'custom' === $color ? 'style="color:' . esc_attr( $custom_color ) . ' !important"' : '' ); ?>></span><?php
|
||||
if ( strlen( $link ) > 0 && strlen( $url['url'] ) > 0 ) {
|
||||
echo '<a class="vc_icon_element-link" href="' . esc_attr( $url['url'] ) . '" ' . $rel . ' title="' . esc_attr( $url['title'] ) . '" target="' . ( strlen( $url['target'] ) > 0 ? esc_attr( $url['target'] ) : '_self' ) . '"></a>';
|
||||
}
|
||||
?></div>
|
||||
</div>
|
||||
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $onclick
|
||||
* @var $custom_links
|
||||
* @var $custom_links_target
|
||||
* @var $img_size
|
||||
* @var $images
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $mode
|
||||
* @var $slides_per_view
|
||||
* @var $wrap
|
||||
* @var $autoplay
|
||||
* @var $hide_pagination_control
|
||||
* @var $hide_prev_next_buttons
|
||||
* @var $speed
|
||||
* @var $partial_view
|
||||
* @var $css
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_images_carousel
|
||||
*/
|
||||
$title = $onclick = $custom_links = $custom_links_target =
|
||||
$img_size = $images = $el_class = $el_id = $mode = $slides_per_view =
|
||||
$wrap = $autoplay = $hide_pagination_control =
|
||||
$hide_prev_next_buttons = $speed = $partial_view = $css = $css_animation = '';
|
||||
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$gal_images = '';
|
||||
$link_start = '';
|
||||
$link_end = '';
|
||||
$el_start = '';
|
||||
$el_end = '';
|
||||
$slides_wrap_start = '';
|
||||
$slides_wrap_end = '';
|
||||
$pretty_rand = 'link_image' === $onclick ? ' data-rel="prettyPhoto[rel-' . get_the_ID() . '-' . rand() . ']"' : '';
|
||||
|
||||
wp_enqueue_script( 'vc_carousel_js' );
|
||||
wp_enqueue_style( 'vc_carousel_css' );
|
||||
if ( 'link_image' === $onclick ) {
|
||||
wp_enqueue_script( 'prettyphoto' );
|
||||
wp_enqueue_style( 'prettyphoto' );
|
||||
}
|
||||
|
||||
if ( '' === $images ) {
|
||||
$images = '-1,-2,-3';
|
||||
}
|
||||
|
||||
if ( 'custom_link' === $onclick ) {
|
||||
$custom_links = vc_value_from_safe( $custom_links );
|
||||
$custom_links = explode( ',', $custom_links );
|
||||
}
|
||||
|
||||
$images = explode( ',', $images );
|
||||
$i = - 1;
|
||||
|
||||
$class_to_filter = 'wpb_images_carousel wpb_content_element vc_clearfix';
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
$carousel_id = 'vc_images-carousel-' . WPBakeryShortCode_VC_images_carousel::getCarouselIndex();
|
||||
$slider_width = $this->getSliderWidth( $img_size );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
?>
|
||||
<div <?php echo implode( ' ', $wrapper_attributes ); ?> class="<?php echo esc_attr( apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $css_class, $this->settings['base'], $atts ) ); ?>">
|
||||
<div class="wpb_wrapper">
|
||||
<?php echo wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_gallery_heading' ) ) ?>
|
||||
<div id="<?php echo $carousel_id ?>" data-ride="vc_carousel" data-wrap="<?php echo 'yes' === $wrap ? 'true' : 'false' ?>" style="width: <?php echo $slider_width ?>;" data-interval="<?php echo 'yes' === $autoplay ? $speed : 0 ?>" data-auto-height="yes" data-mode="<?php echo $mode ?>" data-partial="<?php echo 'yes' === $partial_view ? 'true' : 'false' ?>" data-per-view="<?php echo $slides_per_view ?>" data-hide-on-end="<?php echo 'yes' === $autoplay ? 'false' : 'true' ?>" class="vc_slide vc_images_carousel">
|
||||
<?php if ( 'yes' !== $hide_pagination_control ) : ?>
|
||||
<!-- Indicators -->
|
||||
<ol class="vc_carousel-indicators">
|
||||
<?php for ( $z = 0; $z < count( $images ); $z ++ ) : ?>
|
||||
<li data-target="#<?php echo $carousel_id ?>" data-slide-to="<?php echo $z ?>"></li>
|
||||
<?php endfor; ?>
|
||||
</ol>
|
||||
<?php endif ?>
|
||||
<!-- Wrapper for slides -->
|
||||
<div class="vc_carousel-inner">
|
||||
<div class="vc_carousel-slideline">
|
||||
<div class="vc_carousel-slideline-inner">
|
||||
<?php foreach ( $images as $attach_id ) : ?>
|
||||
<?php
|
||||
$i ++;
|
||||
if ( $attach_id > 0 ) {
|
||||
$post_thumbnail = wpb_getImageBySize( array(
|
||||
'attach_id' => $attach_id,
|
||||
'thumb_size' => $img_size,
|
||||
) );
|
||||
} else {
|
||||
$post_thumbnail = array();
|
||||
$post_thumbnail['thumbnail'] = '<img src="' . vc_asset_url( 'vc/no_image.png' ) . '" />';
|
||||
$post_thumbnail['p_img_large'][0] = vc_asset_url( 'vc/no_image.png' );
|
||||
}
|
||||
$thumbnail = $post_thumbnail['thumbnail'];
|
||||
?>
|
||||
<div class="vc_item">
|
||||
<div class="vc_inner">
|
||||
<?php if ( 'link_image' === $onclick ) : ?>
|
||||
<?php $p_img_large = $post_thumbnail['p_img_large']; ?>
|
||||
<a class="prettyphoto" href="<?php echo $p_img_large[0] ?>" <?php echo $pretty_rand; ?>>
|
||||
<?php echo $thumbnail ?>
|
||||
</a>
|
||||
<?php elseif ( 'custom_link' === $onclick && isset( $custom_links[ $i ] ) && '' !== $custom_links[ $i ] ) : ?>
|
||||
<a href="<?php echo $custom_links[ $i ] ?>"<?php echo( ! empty( $custom_links_target ) ? ' target="' . $custom_links_target . '"' : '' ) ?>>
|
||||
<?php echo $thumbnail ?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?php echo $thumbnail ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ( 'yes' !== $hide_prev_next_buttons ) : ?>
|
||||
<!-- Controls -->
|
||||
<a class="vc_left vc_carousel-control" href="#<?php echo $carousel_id ?>" data-slide="prev">
|
||||
<span class="icon-prev"></span>
|
||||
</a>
|
||||
<a class="vc_right vc_carousel-control" href="#<?php echo $carousel_id ?>" data-slide="next">
|
||||
<span class="icon-next"></span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode
|
||||
*/
|
||||
$el_class = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$css = $this->getExtraClass( $el_class );
|
||||
|
||||
echo '<div class="vc_items' . esc_attr( $css ) . '">' . __( 'Item', 'js_composer' ) . '</div>';
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCodesContainer
|
||||
*/
|
||||
$el_class = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$el_class .= ( ! empty( $el_class ) ? ' ' : '' ) . 'wpb_item items_container';
|
||||
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $el_class, $this->settings['base'], $atts );
|
||||
|
||||
$output = '
|
||||
<div class="' . esc_attr( $css_class ) . '">
|
||||
<div class="wpb_wrapper">
|
||||
' . wpb_js_remove_wpautop( $content ) . '
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,196 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $title
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $type
|
||||
* @var $style
|
||||
* @var $legend
|
||||
* @var $animation
|
||||
* @var $tooltips
|
||||
* @var $x_values
|
||||
* @var $values
|
||||
* @var $css
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_Vc_Line_Chart
|
||||
*/
|
||||
$el_class = $el_id = $title = $type = $legend = $style = $tooltips = $animation = $x_values = $values = $css = $css_animation = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$base_colors = array(
|
||||
'normal' => array(
|
||||
'blue' => '#5472d2',
|
||||
'turquoise' => '#00c1cf',
|
||||
'pink' => '#fe6c61',
|
||||
'violet' => '#8d6dc4',
|
||||
'peacoc' => '#4cadc9',
|
||||
'chino' => '#cec2ab',
|
||||
'mulled-wine' => '#50485b',
|
||||
'vista-blue' => '#75d69c',
|
||||
'orange' => '#f7be68',
|
||||
'sky' => '#5aa1e3',
|
||||
'green' => '#6dab3c',
|
||||
'juicy-pink' => '#f4524d',
|
||||
'sandy-brown' => '#f79468',
|
||||
'purple' => '#b97ebb',
|
||||
'black' => '#2a2a2a',
|
||||
'grey' => '#ebebeb',
|
||||
'white' => '#ffffff',
|
||||
'default' => '#f7f7f7',
|
||||
'primary' => '#0088cc',
|
||||
'info' => '#58b9da',
|
||||
'success' => '#6ab165',
|
||||
'warning' => '#ff9900',
|
||||
'danger' => '#ff675b',
|
||||
'inverse' => '#555555',
|
||||
),
|
||||
'active' => array(
|
||||
'blue' => '#3c5ecc',
|
||||
'turquoise' => '#00a4b0',
|
||||
'pink' => '#fe5043',
|
||||
'violet' => '#7c57bb',
|
||||
'peacoc' => '#39a0bd',
|
||||
'chino' => '#c3b498',
|
||||
'mulled-wine' => '#413a4a',
|
||||
'vista-blue' => '#5dcf8b',
|
||||
'orange' => '#f5b14b',
|
||||
'sky' => '#4092df',
|
||||
'green' => '#5f9434',
|
||||
'juicy-pink' => '#f23630',
|
||||
'sandy-brown' => '#f57f4b',
|
||||
'purple' => '#ae6ab0',
|
||||
'black' => '#1b1b1b',
|
||||
'grey' => '#dcdcdc',
|
||||
'white' => '#f0f0f0',
|
||||
'default' => '#e8e8e8',
|
||||
'primary' => '#0074ad',
|
||||
'info' => '#3fafd4',
|
||||
'success' => '#59a453',
|
||||
'warning' => '#e08700',
|
||||
'danger' => '#ff4b3c',
|
||||
'inverse' => '#464646',
|
||||
),
|
||||
);
|
||||
$colors = array(
|
||||
'flat' => array(
|
||||
'normal' => $base_colors['normal'],
|
||||
'active' => $base_colors['active'],
|
||||
),
|
||||
);
|
||||
foreach ( $base_colors['normal'] as $name => $color ) {
|
||||
$colors['modern']['normal'][ $name ] = array( vc_colorCreator( $color, 7 ), $color );
|
||||
}
|
||||
foreach ( $base_colors['active'] as $name => $color ) {
|
||||
$colors['modern']['active'][ $name ] = array( vc_colorCreator( $color, 7 ), $color );
|
||||
}
|
||||
|
||||
wp_enqueue_script( 'vc_line_chart' );
|
||||
|
||||
$class_to_filter = 'vc_chart vc_line-chart wpb_content_element';
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
$options = array();
|
||||
|
||||
if ( ! empty( $legend ) ) {
|
||||
$options[] = 'data-vc-legend="1"';
|
||||
}
|
||||
|
||||
if ( ! empty( $tooltips ) ) {
|
||||
$options[] = 'data-vc-tooltips="1"';
|
||||
}
|
||||
|
||||
if ( ! empty( $animation ) ) {
|
||||
$options[] = 'data-vc-animation="' . esc_attr( str_replace( 'easein', 'easeIn', $animation ) ) . '"';
|
||||
}
|
||||
|
||||
$values = (array) vc_param_group_parse_atts( $values );
|
||||
$data = array(
|
||||
'labels' => explode( ';', trim( $x_values, ';' ) ),
|
||||
'datasets' => array(),
|
||||
);
|
||||
|
||||
foreach ( $values as $k => $v ) {
|
||||
|
||||
if ( 'custom' === $style ) {
|
||||
if ( ! empty( $v['custom_color'] ) ) {
|
||||
$color = $v['custom_color'];
|
||||
$highlight = vc_colorCreator( $v['custom_color'], - 10 ); //10% darker
|
||||
} else {
|
||||
$color = 'grey';
|
||||
$highlight = 'grey';
|
||||
}
|
||||
} else {
|
||||
$color = isset( $colors[ $style ]['normal'][ $v['color'] ] ) ? $colors[ $style ]['normal'][ $v['color'] ] : $v['normal']['color'];
|
||||
$highlight = isset( $colors[ $style ]['active'][ $v['color'] ] ) ? $colors[ $style ]['active'][ $v['color'] ] : $v['active']['color'];
|
||||
}
|
||||
|
||||
// don't use gradients for lines
|
||||
if ( 'line' === $type ) {
|
||||
$color = is_array( $color ) ? end( $color ) : $color;
|
||||
$highlight = is_array( $highlight ) ? end( $highlight ) : $highlight;
|
||||
$rgb = vc_hex2rgb( $color );
|
||||
$fill_color = 'rgba(' . $rgb[0] . ', ' . $rgb[1] . ', ' . $rgb[2] . ', 0.1)';
|
||||
} else {
|
||||
$fill_color = $color;
|
||||
}
|
||||
|
||||
if ( 'modern' === $style ) {
|
||||
$stroke_color = vc_colorCreator( is_array( $color ) ? end( $color ) : $color, - 7 );
|
||||
$highlight_stroke_color = vc_colorCreator( $stroke_color, - 7 );
|
||||
} else {
|
||||
$stroke_color = $color;
|
||||
$highlight_stroke_color = $highlight;
|
||||
}
|
||||
|
||||
$data['datasets'][] = array(
|
||||
'label' => isset( $v['title'] ) ? $v['title'] : '',
|
||||
'fillColor' => $fill_color,
|
||||
'strokeColor' => $stroke_color,
|
||||
'pointColor' => $color,
|
||||
'pointStrokeColor' => $color,
|
||||
'highlightFill' => $highlight,
|
||||
'highlightStroke' => $highlight_stroke_color,
|
||||
'pointHighlightFill' => $highlight_stroke_color,
|
||||
'pointHighlightStroke' => $highlight_stroke_color,
|
||||
'data' => explode( ';', isset( $v['y_values'] ) ? trim( $v['y_values'], ';' ) : '' ),
|
||||
);
|
||||
}
|
||||
|
||||
$options[] = 'data-vc-type="' . esc_attr( $type ) . '"';
|
||||
$options[] = 'data-vc-values="' . htmlentities( json_encode( $data ) ) . '"';
|
||||
|
||||
if ( '' !== $title ) {
|
||||
$title = '<h2 class="wpb_heading">' . $title . '</h4>';
|
||||
}
|
||||
|
||||
$canvas_html = '<canvas class="vc_line-chart-canvas" width="1" height="1"></canvas>';
|
||||
$legend_html = '';
|
||||
if ( $legend ) {
|
||||
foreach ( $data['datasets'] as $v ) {
|
||||
$color = is_array( $v['pointColor'] ) ? current( $v['pointColor'] ) : $v['pointColor'];
|
||||
$legend_html .= '<li><span style="background-color:' . $color . '"></span>' . $v['label'] . '</li>';
|
||||
}
|
||||
$legend_html = '<ul class="vc_chart-legend">' . $legend_html . '</ul>';
|
||||
$canvas_html = '<div class="vc_chart-with-legend">' . $canvas_html . '</div>';
|
||||
}
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$options[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '
|
||||
<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $options ) . '>
|
||||
' . $title . '
|
||||
<div class="wpb_wrapper">
|
||||
' . $canvas_html . $legend_html . '
|
||||
</div>' . '
|
||||
</div>' . '
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
*
|
||||
* @todo add $icon_... defaults
|
||||
* @todo add $icon_typicons and etc
|
||||
*
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $message_box_style
|
||||
* @var $style
|
||||
* @var $color
|
||||
* @var $message_box_color
|
||||
* @var $css_animation
|
||||
* @var $icon_type
|
||||
* @var $icon_fontawesome
|
||||
* @var $content - shortcode content
|
||||
* @var $css
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Message
|
||||
*/
|
||||
$el_class = $el_id = $message_box_color = $message_box_style = $style = $css = $color = $css_animation = $icon_type = '';
|
||||
$icon_fontawesome = $icon_linecons = $icon_openiconic = $icon_typicons = $icon_entypo = '';
|
||||
$defaultIconClass = 'fa fa-adjust';
|
||||
$atts = $this->convertAttributesToMessageBox2( $atts );
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$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 && false === strpos( 'alert', $color ) ) ? 'vc_color-' . $color : 'vc_color-' . $message_box_color,
|
||||
'css_animation' => $this->getCSSAnimation( $css_animation ),
|
||||
);
|
||||
|
||||
$class_to_filter = preg_replace( array( '/\s+/', '/^\s|\s$/' ), array( ' ', '' ), implode( ' ', $elementClass ) );
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
// 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;
|
||||
case 'alert-info':
|
||||
$icon_type = 'pixelicons';
|
||||
$iconClass = 'vc_pixel_icon vc_pixel_icon-info';
|
||||
break;
|
||||
case 'success':
|
||||
$icon_type = 'fontawesome';
|
||||
$iconClass = 'fa fa-check';
|
||||
break;
|
||||
case 'alert-success':
|
||||
$icon_type = 'pixelicons';
|
||||
$iconClass = 'vc_pixel_icon vc_pixel_icon-tick';
|
||||
break;
|
||||
case 'warning':
|
||||
$icon_type = 'fontawesome';
|
||||
$iconClass = 'fa fa-exclamation-triangle';
|
||||
break;
|
||||
case 'alert-warning':
|
||||
$icon_type = 'pixelicons';
|
||||
$iconClass = 'vc_pixel_icon vc_pixel_icon-alert';
|
||||
break;
|
||||
case 'danger':
|
||||
$icon_type = 'fontawesome';
|
||||
$iconClass = 'fa fa-times';
|
||||
break;
|
||||
case 'alert-danger':
|
||||
$icon_type = 'pixelicons';
|
||||
$iconClass = 'vc_pixel_icon vc_pixel_icon-explanation';
|
||||
break;
|
||||
case 'alert-custom':
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Enqueue needed font for icon element
|
||||
if ( 'pixelicons' !== $icon_type ) {
|
||||
vc_icon_element_fonts_enqueue( $icon_type );
|
||||
}
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
?>
|
||||
<div class="<?php echo esc_attr( $css_class ); ?>" <?php echo implode( ' ', $wrapper_attributes ); ?>>
|
||||
<div class="vc_message_box-icon"><i class="<?php echo esc_attr( $iconClass ); ?>"></i>
|
||||
</div><?php echo wpb_js_remove_wpautop( $content, true );
|
||||
?></div>
|
||||
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $value
|
||||
* @var $units
|
||||
* @var $color
|
||||
* @var $custom_color
|
||||
* @var $label_value
|
||||
* @var $css
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_Vc_Pie
|
||||
*/
|
||||
$title = $el_class = $el_id = $value = $units = $color = $custom_color = $label_value = $css = $css_animation = '';
|
||||
$atts = $this->convertOldColorsToNew( $atts );
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
wp_enqueue_script( 'vc_pie' );
|
||||
|
||||
$colors = array(
|
||||
'blue' => '#5472d2',
|
||||
'turquoise' => '#00c1cf',
|
||||
'pink' => '#fe6c61',
|
||||
'violet' => '#8d6dc4',
|
||||
'peacoc' => '#4cadc9',
|
||||
'chino' => '#cec2ab',
|
||||
'mulled-wine' => '#50485b',
|
||||
'vista-blue' => '#75d69c',
|
||||
'orange' => '#f7be68',
|
||||
'sky' => '#5aa1e3',
|
||||
'green' => '#6dab3c',
|
||||
'juicy-pink' => '#f4524d',
|
||||
'sandy-brown' => '#f79468',
|
||||
'purple' => '#b97ebb',
|
||||
'black' => '#2a2a2a',
|
||||
'grey' => '#ebebeb',
|
||||
'white' => '#ffffff',
|
||||
);
|
||||
|
||||
if ( 'custom' === $color ) {
|
||||
$color = $custom_color;
|
||||
} else {
|
||||
$color = isset( $colors[ $color ] ) ? $colors[ $color ] : '';
|
||||
}
|
||||
|
||||
if ( ! $color ) {
|
||||
$color = $colors['grey'];
|
||||
}
|
||||
|
||||
$class_to_filter = 'vc_pie_chart wpb_content_element';
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class= "' . esc_attr( $css_class ) . '" data-pie-value="' . esc_attr( $value ) . '" data-pie-label-value="' . esc_attr( $label_value ) . '" data-pie-units="' . esc_attr( $units ) . '" data-pie-color="' . esc_attr( $color ) . '">';
|
||||
$output .= '<div class="wpb_wrapper">';
|
||||
$output .= '<div class="vc_pie_wrapper">';
|
||||
$output .= '<span class="vc_pie_chart_back" style="border-color: ' . esc_attr( $color ) . '"></span>';
|
||||
$output .= '<span class="vc_pie_chart_value"></span>';
|
||||
$output .= '<canvas width="101" height="101"></canvas>';
|
||||
$output .= '</div>';
|
||||
|
||||
if ( '' !== $title ) {
|
||||
$output .= '<h4 class="wpb_heading wpb_pie_chart_heading">' . $title . '</h4>';
|
||||
}
|
||||
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $type
|
||||
* @var $annotation // TODO: check why annotation doesn't set before
|
||||
* @var $css
|
||||
* @var $css_animation
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Pinterest
|
||||
*/
|
||||
$type = $annotation = $css = $el_class = $el_id = $css_animation = '';
|
||||
global $post;
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$url = rawurlencode( get_permalink() );
|
||||
if ( has_post_thumbnail() ) {
|
||||
$img_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' );
|
||||
$media = ( is_array( $img_url ) ) ? '&media=' . rawurlencode( $img_url[0] ) : '';
|
||||
} else {
|
||||
$media = '';
|
||||
}
|
||||
$excerpt = is_object( $post ) && isset( $post->post_excerpt ) ? $post->post_excerpt : '';
|
||||
$description = ( '' !== $excerpt ) ? '&description=' . rawurlencode( strip_tags( $excerpt ) ) : '';
|
||||
|
||||
$el_class = isset( $el_class ) ? $el_class : '';
|
||||
$class_to_filter = 'wpb_pinterest wpb_content_element wpb_pinterest_type_' . $type;
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output .= '<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>';
|
||||
$output .= '<a href="//pinterest.com/pin/create/button/?url=' . $url . $media . $description . '" class="pin-it-button" count-layout="' . $type . '"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>';
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,200 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $grid_columns_count
|
||||
* @var $grid_teasers_count
|
||||
* @var $grid_layout
|
||||
* @var $grid_link_target
|
||||
* @var $filter
|
||||
* @var $grid_thumb_size
|
||||
* @var $grid_layout_mode
|
||||
* @var $el_class
|
||||
* @var $loop
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Posts_Grid
|
||||
*/
|
||||
$title = $grid_columns_count = $grid_teasers_count = $grid_layout =
|
||||
$grid_link_target = $filter = $grid_thumb_size = $grid_layout_mode = $el_class = $loop = '';
|
||||
|
||||
global $vc_teaser_box;
|
||||
$grid_link = '';
|
||||
$posts = array();
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$this->resetTaxonomies();
|
||||
if ( empty( $loop ) ) {
|
||||
return;
|
||||
}
|
||||
$this->getLoop( $loop );
|
||||
$my_query = $this->query;
|
||||
$args = $this->loop_args;
|
||||
$teaser_blocks = vc_sorted_list_parse_value( $grid_layout );
|
||||
global $vc_posts_grid_exclude_id;
|
||||
/** @var $my_query WP_Query */
|
||||
while ( $my_query->have_posts() ) {
|
||||
$my_query->the_post(); // Get post from query
|
||||
$post = new stdClass(); // Creating post object.
|
||||
if ( in_array( get_the_ID(), $vc_posts_grid_exclude_id ) ) {
|
||||
continue;
|
||||
}
|
||||
$post->id = get_the_ID();
|
||||
$post->link = get_permalink( $post->id );
|
||||
if ( '1' === $vc_teaser_box->getTeaserData( 'enable', $post->id ) ) {
|
||||
$post->custom_user_teaser = true;
|
||||
$data = $vc_teaser_box->getTeaserData( 'data', $post->id );
|
||||
if ( ! empty( $data ) ) {
|
||||
$data = json_decode( $data );
|
||||
}
|
||||
$post->bgcolor = $vc_teaser_box->getTeaserData( 'bgcolor', $post->id );
|
||||
$post->custom_teaser_blocks = array();
|
||||
$post->title_attribute = the_title_attribute( 'echo=0' );
|
||||
if ( ! empty( $data ) ) {
|
||||
foreach ( $data as $block ) {
|
||||
$settings = array();
|
||||
if ( 'title' === $block->name ) {
|
||||
$post->title = the_title( '', '', false );
|
||||
} elseif ( 'image' === $block->name ) {
|
||||
if ( 'featured' === $block->image ) {
|
||||
$post->thumbnail_data = $this->getPostThumbnail( $post->id, $grid_thumb_size );
|
||||
} elseif ( ! empty( $block->image ) ) {
|
||||
$post->thumbnail_data = wpb_getImageBySize( array(
|
||||
'attach_id' => (int) $block->image,
|
||||
'thumb_size' => $grid_thumb_size,
|
||||
) );
|
||||
} else {
|
||||
$post->thumbnail_data = false;
|
||||
}
|
||||
$post->thumbnail = $post->thumbnail_data && isset( $post->thumbnail_data['thumbnail'] ) ? $post->thumbnail_data['thumbnail'] : '';
|
||||
$post->image_link = empty( $video ) && $post->thumbnail && isset( $post->thumbnail_data['p_img_large'][0] ) ? $post->thumbnail_data['p_img_large'][0] : $video;
|
||||
} elseif ( 'text' === $block->name ) {
|
||||
if ( 'custom' === $block->mode ) {
|
||||
$settings[] = 'text';
|
||||
$post->content = $block->text;
|
||||
} elseif ( 'excerpt' === $block->mode ) {
|
||||
$settings[] = $block->mode;
|
||||
$post->excerpt = $this->getPostExcerpt();
|
||||
} else {
|
||||
$settings[] = $block->mode;
|
||||
$post->content = $this->getPostContent();
|
||||
}
|
||||
}
|
||||
if ( isset( $block->link ) ) {
|
||||
if ( 'post' === $block->link ) {
|
||||
$settings[] = 'link_post';
|
||||
} elseif ( 'big_image' === $block->link ) {
|
||||
$settings[] = 'link_image';
|
||||
} else {
|
||||
$settings[] = 'no_link';
|
||||
}
|
||||
$settings[] = '';
|
||||
}
|
||||
$post->custom_teaser_blocks[] = array( $block->name, $settings );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$post->custom_user_teaser = false;
|
||||
$post->title = the_title( '', '', false );
|
||||
$post->title_attribute = the_title_attribute( 'echo=0' );
|
||||
$post->post_type = get_post_type();
|
||||
$post->content = $this->getPostContent();
|
||||
$post->excerpt = $this->getPostExcerpt();
|
||||
$post->thumbnail_data = $this->getPostThumbnail( $post->id, $grid_thumb_size );
|
||||
$post->thumbnail = $post->thumbnail_data && isset( $post->thumbnail_data['thumbnail'] ) ? $post->thumbnail_data['thumbnail'] : '';
|
||||
$video = get_post_meta( $post->id, '_p_video', true );
|
||||
$post->image_link = empty( $video ) && $post->thumbnail && isset( $post->thumbnail_data['p_img_large'][0] ) ? $post->thumbnail_data['p_img_large'][0] : $video;
|
||||
}
|
||||
|
||||
$post->categories_css = $this->getCategoriesCss( $post->id );
|
||||
|
||||
$posts[] = $post;
|
||||
}
|
||||
wp_reset_query();
|
||||
|
||||
/**
|
||||
* Css classes for grid and teasers.
|
||||
* {{
|
||||
*/
|
||||
$post_types_teasers = '';
|
||||
if ( ! empty( $args['post_type'] ) && is_array( $args['post_type'] ) ) {
|
||||
foreach ( $args['post_type'] as $post_type ) {
|
||||
$post_types_teasers .= 'wpb_teaser_grid_' . $post_type . ' ';
|
||||
}
|
||||
}
|
||||
$li_span_class = $this->spanClass( $grid_columns_count );
|
||||
|
||||
$css_class = 'wpb_row wpb_teaser_grid wpb_content_element ' .
|
||||
$this->getMainCssClass( $filter ) . // Css class as selector for isotope plugin
|
||||
' columns_count_' . $grid_columns_count . // Custom margin/padding for different count of columns in grid
|
||||
' columns_count_' . $grid_columns_count . // Combination of layout and column count
|
||||
' ' . $post_types_teasers; // Css classes by selected post types
|
||||
|
||||
$class_to_filter = $css_class;
|
||||
$class_to_filter .= $this->getExtraClass( $el_class );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
$this->setLinkTarget( $grid_link_target );
|
||||
|
||||
?>
|
||||
<div class="<?php echo esc_attr( trim( $css_class ) ); ?>">
|
||||
<div class="wpb_wrapper">
|
||||
<?php echo wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_teaser_grid_heading' ) ) ?>
|
||||
<div class="teaser_grid_container">
|
||||
<?php if ( 'yes' === $filter && ! empty( $this->filter_categories ) ) :
|
||||
$categories_array = $this->getFilterCategories();
|
||||
echo '<ul class="categories_filter vc_col-sm-12 vc_clearfix">'
|
||||
. '<li class="active"><a href="#" data-filter="*">';
|
||||
_e( 'All', 'js_composer' );
|
||||
echo '</a></li>';
|
||||
foreach ( $this->getFilterCategories() as $cat ) :
|
||||
echo '<li><a href="#"'
|
||||
. ' data-filter=".grid-cat-<?php echo $cat->term_id ?>">'
|
||||
. esc_attr( $cat->name )
|
||||
. '</a></li>';
|
||||
endforeach;
|
||||
echo '</ul>';
|
||||
?>
|
||||
<div class="vc_clearfix"></div>
|
||||
<?php endif ?>
|
||||
<ul class="wpb_thumbnails wpb_thumbnails-fluid vc_clearfix" data-layout-mode="<?php echo $grid_layout_mode ?>">
|
||||
<?php
|
||||
/**
|
||||
* Enqueue js/css
|
||||
* {{
|
||||
*/
|
||||
wp_enqueue_style( 'isotope-css' );
|
||||
wp_enqueue_script( 'isotope' );
|
||||
?>
|
||||
<?php if ( count( $posts ) > 0 ) : ?>
|
||||
<?php foreach ( $posts as $post ) :
|
||||
$blocks_to_build = true === $post->custom_user_teaser ? $post->custom_teaser_blocks : $teaser_blocks;
|
||||
$block_style = isset( $post->bgcolor ) ? ' style="background-color: ' . $post->bgcolor . '"' : '';
|
||||
echo '<li'
|
||||
. ' class="isotope-item '
|
||||
. esc_attr( apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $li_span_class, 'vc_teaser_grid_li', $atts ) )
|
||||
. ' '
|
||||
. $post->categories_css
|
||||
. '"'
|
||||
. $block_style
|
||||
. '>';
|
||||
echo '<div class="isotope-inner">';
|
||||
foreach ( $blocks_to_build as $block_data ) :
|
||||
include $this->getBlockTemplate();
|
||||
endforeach;
|
||||
echo '</div></li>';
|
||||
?>
|
||||
<?php endforeach ?>
|
||||
<?php else : ?>
|
||||
<li class="<?php echo $this->spanClass( 1 ); ?>"><?php _e( 'Nothing found.', 'js_composer' ) ?></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,229 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $type
|
||||
* @var $count
|
||||
* @var $interval
|
||||
* @var $slides_content
|
||||
* @var $slides_title
|
||||
* @var $link
|
||||
* @var $custom_links
|
||||
* @var $thumb_size
|
||||
* @var $posttypes
|
||||
* @var $posts_in
|
||||
* @var $categories
|
||||
* @var $orderby
|
||||
* @var $order
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $css
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Posts_slider
|
||||
*/
|
||||
$title = $type = $count = $interval = $slides_content = $slides_title = $link = $custom_links = $thumb_size = $posttypes = $posts_in = $categories = $order = $orderby = $el_class = $el_id = $css = '';
|
||||
$link_image_start = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$gal_images = '';
|
||||
$link_start = '';
|
||||
$link_end = '';
|
||||
$el_start = '';
|
||||
$el_end = '';
|
||||
$slides_wrap_start = '';
|
||||
$slides_wrap_end = '';
|
||||
|
||||
if ( 'nivo' === $type ) {
|
||||
$type = ' wpb_slider_nivo theme-default';
|
||||
wp_enqueue_script( 'nivo-slider' );
|
||||
wp_enqueue_style( 'nivo-slider-css' );
|
||||
wp_enqueue_style( 'nivo-slider-theme' );
|
||||
|
||||
$slides_wrap_start = '<div class="nivoSlider">';
|
||||
$slides_wrap_end = '</div>';
|
||||
} elseif ( 'flexslider' === $type || 'flexslider_fade' === $type || 'flexslider_slide' === $type || 'fading' === $type ) {
|
||||
$el_start = '<li>';
|
||||
$el_end = '</li>';
|
||||
$slides_wrap_start = '<ul class="slides">';
|
||||
$slides_wrap_end = '</ul>';
|
||||
wp_enqueue_style( 'flexslider' );
|
||||
wp_enqueue_script( 'flexslider' );
|
||||
}
|
||||
$flex_fx = '';
|
||||
if ( 'flexslider' === $type || 'flexslider_fade' === $type || 'fading' === $type ) {
|
||||
$type = ' wpb_flexslider flexslider_fade flexslider';
|
||||
$flex_fx = ' data-flex_fx="fade"';
|
||||
} elseif ( 'flexslider_slide' === $type ) {
|
||||
$type = ' wpb_flexslider flexslider_slide flexslider';
|
||||
$flex_fx = ' data-flex_fx="slide"';
|
||||
}
|
||||
|
||||
if ( 'link_image' === $link ) {
|
||||
wp_enqueue_script( 'prettyphoto' );
|
||||
wp_enqueue_style( 'prettyphoto' );
|
||||
}
|
||||
|
||||
$query_args = array(
|
||||
'post_status' => 'publish',
|
||||
);
|
||||
|
||||
//exclude current post/page from query
|
||||
if ( '' !== $posts_in ) {
|
||||
$query_args['post__in'] = explode( ',', $posts_in );
|
||||
}
|
||||
global $vc_posts_grid_exclude_id;
|
||||
$vc_posts_grid_exclude_id[] = get_the_ID();
|
||||
$query_args['post__not_in'] = array( get_the_ID() );
|
||||
|
||||
// Post teasers count
|
||||
if ( '' !== $count && ! is_numeric( $count ) ) {
|
||||
$count = - 1;
|
||||
}
|
||||
if ( '' !== $count && is_numeric( $count ) ) {
|
||||
$query_args['posts_per_page'] = $count;
|
||||
}
|
||||
|
||||
// Post types
|
||||
$pt = array();
|
||||
if ( '' !== $posttypes ) {
|
||||
$posttypes = explode( ',', $posttypes );
|
||||
foreach ( $posttypes as $post_type ) {
|
||||
array_push( $pt, $post_type );
|
||||
}
|
||||
$query_args['post_type'] = $pt;
|
||||
}
|
||||
|
||||
// Narrow by categories
|
||||
if ( '' !== $categories ) {
|
||||
$categories = explode( ',', $categories );
|
||||
$gc = array();
|
||||
foreach ( $categories as $grid_cat ) {
|
||||
array_push( $gc, $grid_cat );
|
||||
}
|
||||
$gc = implode( ',', $gc );
|
||||
// http://snipplr.com/view/17434/wordpress-get-category-slug/
|
||||
$query_args['category_name'] = $gc;
|
||||
|
||||
$taxonomies = get_taxonomies( '', 'object' );
|
||||
$query_args['tax_query'] = array( 'relation' => 'OR' );
|
||||
foreach ( $taxonomies as $t ) {
|
||||
if ( in_array( $t->object_type[0], $pt ) ) {
|
||||
$query_args['tax_query'][] = array(
|
||||
'taxonomy' => $t->name,
|
||||
'terms' => $categories,
|
||||
'field' => 'slug',
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Order posts
|
||||
if ( null !== $orderby ) {
|
||||
$query_args['orderby'] = $orderby;
|
||||
}
|
||||
$query_args['order'] = $order;
|
||||
|
||||
// Run query
|
||||
$my_query = new WP_Query( $query_args );
|
||||
|
||||
$pretty_rel_random = ' data-rel="prettyPhoto[rel-' . get_the_ID() . '-' . rand() . ']"';
|
||||
if ( 'custom_link' === $link ) {
|
||||
$custom_links = explode( ',', vc_value_from_safe( $custom_links ) );
|
||||
}
|
||||
$teasers = '';
|
||||
$i = - 1;
|
||||
|
||||
while ( $my_query->have_posts() ) {
|
||||
$i ++;
|
||||
$my_query->the_post();
|
||||
$post_title = the_title( '', '', false );
|
||||
$post_id = $my_query->post->ID;
|
||||
if ( in_array( get_the_ID(), $vc_posts_grid_exclude_id ) ) {
|
||||
continue;
|
||||
}
|
||||
if ( 'teaser' === $slides_content ) {
|
||||
$content = apply_filters( 'the_excerpt', get_the_excerpt() );
|
||||
} else {
|
||||
$content = '';
|
||||
}
|
||||
$thumbnail = '';
|
||||
|
||||
// Thumbnail logic
|
||||
$post_thumbnail = $p_img_large = '';
|
||||
|
||||
$post_thumbnail = wpb_getImageBySize( array( 'post_id' => $post_id, 'thumb_size' => $thumb_size ) );
|
||||
$thumbnail = $post_thumbnail['thumbnail'];
|
||||
$p_img_large = $post_thumbnail['p_img_large'];
|
||||
|
||||
// Link logic
|
||||
if ( 'link_no' !== $link ) {
|
||||
if ( 'link_post' === $link ) {
|
||||
$link_image_start = '<a class="link_image" href="' . get_permalink( $post_id ) . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'js_composer' ), the_title_attribute( 'echo=0' ) ) . '">';
|
||||
} elseif ( 'link_image' === $link ) {
|
||||
$p_video = get_post_meta( $post_id, '_p_video', true );
|
||||
//
|
||||
if ( '' !== $p_video ) {
|
||||
$p_link = $p_video;
|
||||
} else {
|
||||
$p_link = $p_img_large[0];
|
||||
}
|
||||
$link_image_start = '<a class="link_image prettyphoto" href="' . $p_link . '" ' . $pretty_rel_random . ' title="' . the_title_attribute( 'echo=0' ) . '" >';
|
||||
} elseif ( 'custom_link' === $link ) {
|
||||
if ( isset( $custom_links[ $i ] ) ) {
|
||||
$slide_custom_link = $custom_links[ $i ];
|
||||
} else {
|
||||
$slide_custom_link = $custom_links[0];
|
||||
}
|
||||
$link_image_start = '<a class="link_image" href="' . $slide_custom_link . '">';
|
||||
}
|
||||
|
||||
$link_image_end = '</a>';
|
||||
} else {
|
||||
$link_image_start = '';
|
||||
$link_image_end = '';
|
||||
}
|
||||
|
||||
$description = '';
|
||||
if ( '' !== $slides_content && '' !== $content && ( ' wpb_flexslider flexslider_fade flexslider' === $type || ' wpb_flexslider flexslider_slide flexslider' === $type ) ) {
|
||||
$description = '<div class="flex-caption">';
|
||||
if ( $slides_title ) {
|
||||
$description .= '<h2 class="post-title">' . $link_image_start . $post_title . $link_image_end . '</h2>';
|
||||
}
|
||||
$description .= $content;
|
||||
$description .= '</div>';
|
||||
}
|
||||
|
||||
$teasers .= $el_start . $link_image_start . $thumbnail . $link_image_end . $description . $el_end;
|
||||
} // endwhile loop
|
||||
wp_reset_query();
|
||||
|
||||
if ( $teasers ) {
|
||||
$teasers = $slides_wrap_start . $teasers . $slides_wrap_end;
|
||||
} else {
|
||||
$teasers = __( 'Nothing found.', 'js_composer' );
|
||||
}
|
||||
|
||||
$class_to_filter = 'wpb_gallery wpb_posts_slider wpb_content_element';
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '
|
||||
<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>
|
||||
<div class="wpb_wrapper">
|
||||
' . wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_posts_slider_heading' ) ) . '
|
||||
<div class="wpb_gallery_slides' . $type . '" data-interval="' . $interval . '"' . $flex_fx . '>' . $teasers . '</div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $values
|
||||
* @var $units
|
||||
* @var $bgcolor
|
||||
* @var $custombgcolor
|
||||
* @var $customtxtcolor
|
||||
* @var $options
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $css
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Progress_Bar
|
||||
*/
|
||||
$title = $values = $units = $bgcolor = $css = $custombgcolor = $customtxtcolor = $options = $el_class = $el_id = $css_animation = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
$atts = $this->convertAttributesToNewProgressBar( $atts );
|
||||
|
||||
extract( $atts );
|
||||
wp_enqueue_script( 'waypoints' );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
|
||||
$bar_options = array();
|
||||
$options = explode( ',', $options );
|
||||
if ( in_array( 'animated', $options ) ) {
|
||||
$bar_options[] = 'animated';
|
||||
}
|
||||
if ( in_array( 'striped', $options ) ) {
|
||||
$bar_options[] = 'striped';
|
||||
}
|
||||
|
||||
if ( 'custom' === $bgcolor && '' !== $custombgcolor ) {
|
||||
$custombgcolor = ' style="' . vc_get_css_color( 'background-color', $custombgcolor ) . '"';
|
||||
if ( '' !== $customtxtcolor ) {
|
||||
$customtxtcolor = ' style="' . vc_get_css_color( 'color', $customtxtcolor ) . '"';
|
||||
}
|
||||
$bgcolor = '';
|
||||
} else {
|
||||
$custombgcolor = '';
|
||||
$customtxtcolor = '';
|
||||
$bgcolor = 'vc_progress-bar-color-' . esc_attr( $bgcolor );
|
||||
$el_class .= ' ' . $bgcolor;
|
||||
}
|
||||
|
||||
$class_to_filter = 'vc_progress_bar wpb_content_element';
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>';
|
||||
|
||||
$output .= wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_progress_bar_heading' ) );
|
||||
|
||||
$values = (array) vc_param_group_parse_atts( $values );
|
||||
$max_value = 0.0;
|
||||
$graph_lines_data = array();
|
||||
foreach ( $values as $data ) {
|
||||
$new_line = $data;
|
||||
$new_line['value'] = isset( $data['value'] ) ? $data['value'] : 0;
|
||||
$new_line['label'] = isset( $data['label'] ) ? $data['label'] : '';
|
||||
$new_line['bgcolor'] = isset( $data['color'] ) && 'custom' !== $data['color'] ? '' : $custombgcolor;
|
||||
$new_line['txtcolor'] = isset( $data['color'] ) && 'custom' !== $data['color'] ? '' : $customtxtcolor;
|
||||
if ( isset( $data['customcolor'] ) && ( ! isset( $data['color'] ) || 'custom' === $data['color'] ) ) {
|
||||
$new_line['bgcolor'] = ' style="background-color: ' . esc_attr( $data['customcolor'] ) . ';"';
|
||||
}
|
||||
if ( isset( $data['customtxtcolor'] ) && ( ! isset( $data['color'] ) || 'custom' === $data['color'] ) ) {
|
||||
$new_line['txtcolor'] = ' style="color: ' . esc_attr( $data['customtxtcolor'] ) . ';"';
|
||||
}
|
||||
|
||||
if ( $max_value < (float) $new_line['value'] ) {
|
||||
$max_value = $new_line['value'];
|
||||
}
|
||||
$graph_lines_data[] = $new_line;
|
||||
}
|
||||
|
||||
foreach ( $graph_lines_data as $line ) {
|
||||
$unit = ( '' !== $units ) ? ' <span class="vc_label_units">' . $line['value'] . $units . '</span>' : '';
|
||||
$output .= '<div class="vc_general vc_single_bar' . ( ( isset( $line['color'] ) && 'custom' !== $line['color'] ) ?
|
||||
' vc_progress-bar-color-' . $line['color'] : '' )
|
||||
. '">';
|
||||
$output .= '<small class="vc_label"' . $line['txtcolor'] . '>' . $line['label'] . $unit . '</small>';
|
||||
if ( $max_value > 100.00 ) {
|
||||
$percentage_value = (float) $line['value'] > 0 && $max_value > 100.00 ? round( (float) $line['value'] / $max_value * 100, 4 ) : 0;
|
||||
} else {
|
||||
$percentage_value = $line['value'];
|
||||
}
|
||||
$output .= '<span class="vc_bar ' . esc_attr( implode( ' ', $bar_options ) ) . '" data-percentage-value="' . esc_attr( $percentage_value ) . '" data-value="' . esc_attr( $line['value'] ) . '"' . $line['bgcolor'] . '></span>';
|
||||
$output .= '</div>';
|
||||
}
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $content - shortcode content
|
||||
* @var $css
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Raw_html
|
||||
*/
|
||||
$el_class = $el_id = $css = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$content = rawurldecode( base64_decode( strip_tags( $content ) ) );
|
||||
$content = wpb_js_remove_wpautop( apply_filters( 'vc_raw_html_module_content', $content ) );
|
||||
|
||||
// template is also used by 'Raw JS' shortcode which doesn't have Design Options
|
||||
if ( ! isset( $css ) ) {
|
||||
$css = '';
|
||||
}
|
||||
|
||||
$class_to_filter = 'wpb_raw_code ' . ( ( 'vc_raw_html' === $this->settings['base'] ) ? 'wpb_content_element wpb_raw_html' : 'wpb_raw_js' );
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '
|
||||
<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>
|
||||
<div class="wpb_wrapper">
|
||||
' . $content . '
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,189 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $title
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $type
|
||||
* @var $style
|
||||
* @var $legend
|
||||
* @var $animation
|
||||
* @var $tooltips
|
||||
* @var $stroke_color
|
||||
* @var $custom_stroke_color
|
||||
* @var $stroke_width
|
||||
* @var $values
|
||||
* @var $css
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_Vc_Round_Chart
|
||||
*/
|
||||
$el_class = $el_id = $title = $type = $style = $legend = $animation = $tooltips = $stroke_color = $stroke_width = $values = $css = $css_animation = $custom_stroke_color = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$base_colors = array(
|
||||
'normal' => array(
|
||||
'blue' => '#5472d2',
|
||||
'turquoise' => '#00c1cf',
|
||||
'pink' => '#fe6c61',
|
||||
'violet' => '#8d6dc4',
|
||||
'peacoc' => '#4cadc9',
|
||||
'chino' => '#cec2ab',
|
||||
'mulled-wine' => '#50485b',
|
||||
'vista-blue' => '#75d69c',
|
||||
'orange' => '#f7be68',
|
||||
'sky' => '#5aa1e3',
|
||||
'green' => '#6dab3c',
|
||||
'juicy-pink' => '#f4524d',
|
||||
'sandy-brown' => '#f79468',
|
||||
'purple' => '#b97ebb',
|
||||
'black' => '#2a2a2a',
|
||||
'grey' => '#ebebeb',
|
||||
'white' => '#ffffff',
|
||||
'default' => '#f7f7f7',
|
||||
'primary' => '#0088cc',
|
||||
'info' => '#58b9da',
|
||||
'success' => '#6ab165',
|
||||
'warning' => '#ff9900',
|
||||
'danger' => '#ff675b',
|
||||
'inverse' => '#555555',
|
||||
),
|
||||
'active' => array(
|
||||
'blue' => '#3c5ecc',
|
||||
'turquoise' => '#00a4b0',
|
||||
'pink' => '#fe5043',
|
||||
'violet' => '#7c57bb',
|
||||
'peacoc' => '#39a0bd',
|
||||
'chino' => '#c3b498',
|
||||
'mulled-wine' => '#413a4a',
|
||||
'vista-blue' => '#5dcf8b',
|
||||
'orange' => '#f5b14b',
|
||||
'sky' => '#4092df',
|
||||
'green' => '#5f9434',
|
||||
'juicy-pink' => '#f23630',
|
||||
'sandy-brown' => '#f57f4b',
|
||||
'purple' => '#ae6ab0',
|
||||
'black' => '#1b1b1b',
|
||||
'grey' => '#dcdcdc',
|
||||
'white' => '#f0f0f0',
|
||||
'default' => '#e8e8e8',
|
||||
'primary' => '#0074ad',
|
||||
'info' => '#3fafd4',
|
||||
'success' => '#59a453',
|
||||
'warning' => '#e08700',
|
||||
'danger' => '#ff4b3c',
|
||||
'inverse' => '#464646',
|
||||
),
|
||||
);
|
||||
$colors = array(
|
||||
'flat' => array(
|
||||
'normal' => $base_colors['normal'],
|
||||
'active' => $base_colors['active'],
|
||||
),
|
||||
);
|
||||
foreach ( $base_colors['normal'] as $name => $color ) {
|
||||
$colors['modern']['normal'][ $name ] = array( vc_colorCreator( $color, 7 ), $color );
|
||||
}
|
||||
foreach ( $base_colors['active'] as $name => $color ) {
|
||||
$colors['modern']['active'][ $name ] = array( vc_colorCreator( $color, 7 ), $color );
|
||||
}
|
||||
|
||||
wp_enqueue_script( 'vc_round_chart' );
|
||||
|
||||
$class_to_filter = 'vc_chart vc_round-chart wpb_content_element';
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
$options = array();
|
||||
|
||||
if ( ! empty( $legend ) ) {
|
||||
$options[] = 'data-vc-legend="1"';
|
||||
}
|
||||
|
||||
if ( ! empty( $tooltips ) ) {
|
||||
$options[] = 'data-vc-tooltips="1"';
|
||||
}
|
||||
|
||||
if ( ! empty( $animation ) ) {
|
||||
$options[] = 'data-vc-animation="' . esc_attr( str_replace( 'easein', 'easeIn', $animation ) ) . '"';
|
||||
}
|
||||
|
||||
if ( ! empty( $stroke_color ) ) {
|
||||
if ( 'custom' === $stroke_color ) {
|
||||
if ( $custom_stroke_color ) {
|
||||
$color = $custom_stroke_color;
|
||||
} else {
|
||||
$color = $base_colors['normal']['white'];
|
||||
}
|
||||
} else {
|
||||
$color = $base_colors['normal'][ $stroke_color ];
|
||||
}
|
||||
|
||||
$options[] = 'data-vc-stroke-color="' . esc_attr( $color ) . '"';
|
||||
}
|
||||
|
||||
if ( ! empty( $stroke_width ) ) {
|
||||
$options[] = 'data-vc-stroke-width="' . esc_attr( $stroke_width ) . '"';
|
||||
}
|
||||
|
||||
$values = (array) vc_param_group_parse_atts( $values );
|
||||
$data = array();
|
||||
|
||||
foreach ( $values as $k => $v ) {
|
||||
|
||||
if ( 'custom' === $style ) {
|
||||
if ( ! empty( $v['custom_color'] ) ) {
|
||||
$color = $v['custom_color'];
|
||||
$highlight = vc_colorCreator( $v['custom_color'], - 10 ); //10% darker
|
||||
} else {
|
||||
$color = $base_colors['normal']['grey'];
|
||||
$highlight = $base_colors['active']['grey'];
|
||||
}
|
||||
} else {
|
||||
$color = isset( $colors[ $style ]['normal'][ $v['color'] ] ) ? $colors[ $style ]['normal'][ $v['color'] ] : $v['normal']['color'];
|
||||
$highlight = isset( $colors[ $style ]['active'][ $v['color'] ] ) ? $colors[ $style ]['active'][ $v['color'] ] : $v['active']['color'];
|
||||
}
|
||||
|
||||
$data[] = array(
|
||||
'value' => intval( isset( $v['value'] ) ? $v['value'] : 0 ),
|
||||
'color' => $color,
|
||||
'highlight' => $highlight,
|
||||
'label' => isset( $v['title'] ) ? $v['title'] : '',
|
||||
);
|
||||
}
|
||||
|
||||
$options[] = 'data-vc-type="' . esc_attr( $type ) . '"';
|
||||
$options[] = 'data-vc-values="' . esc_attr( json_encode( $data ) ) . '"';
|
||||
|
||||
if ( '' !== $title ) {
|
||||
$title = '<h2 class="wpb_heading">' . $title . '</h4>';
|
||||
}
|
||||
|
||||
$canvas_html = '<canvas class="vc_round-chart-canvas" width="1" height="1"></canvas>';
|
||||
$legend_html = '';
|
||||
if ( $legend ) {
|
||||
foreach ( $data as $v ) {
|
||||
$color = is_array( $v['color'] ) ? current( $v['color'] ) : $v['color'];
|
||||
$legend_html .= '<li><span style="background-color:' . $color . '"></span>' . $v['label'] . '</li>';
|
||||
}
|
||||
$legend_html = '<ul class="vc_chart-legend">' . $legend_html . '</ul>';
|
||||
$canvas_html = '<div class="vc_chart-with-legend">' . $canvas_html . '</div>';
|
||||
}
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$options[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '
|
||||
<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $options ) . '>
|
||||
' . $title . '
|
||||
<div class="wpb_wrapper">
|
||||
' . $canvas_html . $legend_html . '
|
||||
</div>' . '
|
||||
</div>' . '
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,160 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $full_width
|
||||
* @var $full_height
|
||||
* @var $equal_height
|
||||
* @var $columns_placement
|
||||
* @var $content_placement
|
||||
* @var $parallax
|
||||
* @var $parallax_image
|
||||
* @var $css
|
||||
* @var $el_id
|
||||
* @var $video_bg
|
||||
* @var $video_bg_url
|
||||
* @var $video_bg_parallax
|
||||
* @var $parallax_speed_bg
|
||||
* @var $parallax_speed_video
|
||||
* @var $content - shortcode content
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Row
|
||||
*/
|
||||
$el_class = $full_height = $parallax_speed_bg = $parallax_speed_video = $full_width = $equal_height = $flex_row = $columns_placement = $content_placement = $parallax = $parallax_image = $css = $el_id = $video_bg = $video_bg_url = $video_bg_parallax = $css_animation = '';
|
||||
$disable_element = '';
|
||||
$output = $after_output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
wp_enqueue_script( 'wpb_composer_front_js' );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
|
||||
$css_classes = array(
|
||||
'vc_row',
|
||||
'wpb_row',
|
||||
//deprecated
|
||||
'vc_row-fluid',
|
||||
$el_class,
|
||||
vc_shortcode_custom_css_class( $css ),
|
||||
);
|
||||
|
||||
if ( 'yes' === $disable_element ) {
|
||||
if ( vc_is_page_editable() ) {
|
||||
$css_classes[] = 'vc_hidden-lg vc_hidden-xs vc_hidden-sm vc_hidden-md';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
if ( vc_shortcode_custom_css_has_property( $css, array(
|
||||
'border',
|
||||
'background',
|
||||
) ) || $video_bg || $parallax
|
||||
) {
|
||||
$css_classes[] = 'vc_row-has-fill';
|
||||
}
|
||||
|
||||
if ( ! empty( $atts['gap'] ) ) {
|
||||
$css_classes[] = 'vc_column-gap-' . $atts['gap'];
|
||||
}
|
||||
|
||||
if ( ! empty( $atts['rtl_reverse'] ) ) {
|
||||
$css_classes[] = 'vc_rtl-columns-reverse';
|
||||
}
|
||||
|
||||
$wrapper_attributes = array();
|
||||
// build attributes for wrapper
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
if ( ! empty( $full_width ) ) {
|
||||
$wrapper_attributes[] = 'data-vc-full-width="true"';
|
||||
$wrapper_attributes[] = 'data-vc-full-width-init="false"';
|
||||
if ( 'stretch_row_content' === $full_width ) {
|
||||
$wrapper_attributes[] = 'data-vc-stretch-content="true"';
|
||||
} elseif ( 'stretch_row_content_no_spaces' === $full_width ) {
|
||||
$wrapper_attributes[] = 'data-vc-stretch-content="true"';
|
||||
$css_classes[] = 'vc_row-no-padding';
|
||||
}
|
||||
$after_output .= '<div class="vc_row-full-width vc_clearfix"></div>';
|
||||
}
|
||||
|
||||
if ( ! empty( $full_height ) ) {
|
||||
$css_classes[] = 'vc_row-o-full-height';
|
||||
if ( ! empty( $columns_placement ) ) {
|
||||
$flex_row = true;
|
||||
$css_classes[] = 'vc_row-o-columns-' . $columns_placement;
|
||||
if ( 'stretch' === $columns_placement ) {
|
||||
$css_classes[] = 'vc_row-o-equal-height';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $equal_height ) ) {
|
||||
$flex_row = true;
|
||||
$css_classes[] = 'vc_row-o-equal-height';
|
||||
}
|
||||
|
||||
if ( ! empty( $content_placement ) ) {
|
||||
$flex_row = true;
|
||||
$css_classes[] = 'vc_row-o-content-' . $content_placement;
|
||||
}
|
||||
|
||||
if ( ! empty( $flex_row ) ) {
|
||||
$css_classes[] = 'vc_row-flex';
|
||||
}
|
||||
|
||||
$has_video_bg = ( ! empty( $video_bg ) && ! empty( $video_bg_url ) && vc_extract_youtube_id( $video_bg_url ) );
|
||||
|
||||
$parallax_speed = $parallax_speed_bg;
|
||||
if ( $has_video_bg ) {
|
||||
$parallax = $video_bg_parallax;
|
||||
$parallax_speed = $parallax_speed_video;
|
||||
$parallax_image = $video_bg_url;
|
||||
$css_classes[] = 'vc_video-bg-container';
|
||||
wp_enqueue_script( 'vc_youtube_iframe_api_js' );
|
||||
}
|
||||
|
||||
if ( ! empty( $parallax ) ) {
|
||||
wp_enqueue_script( 'vc_jquery_skrollr_js' );
|
||||
$wrapper_attributes[] = 'data-vc-parallax="' . esc_attr( $parallax_speed ) . '"'; // parallax speed
|
||||
$css_classes[] = 'vc_general vc_parallax vc_parallax-' . $parallax;
|
||||
if ( false !== strpos( $parallax, 'fade' ) ) {
|
||||
$css_classes[] = 'js-vc_parallax-o-fade';
|
||||
$wrapper_attributes[] = 'data-vc-parallax-o-fade="on"';
|
||||
} elseif ( false !== strpos( $parallax, 'fixed' ) ) {
|
||||
$css_classes[] = 'js-vc_parallax-o-fixed';
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $parallax_image ) ) {
|
||||
if ( $has_video_bg ) {
|
||||
$parallax_image_src = $parallax_image;
|
||||
} else {
|
||||
$parallax_image_id = preg_replace( '/[^\d]/', '', $parallax_image );
|
||||
$parallax_image_src = wp_get_attachment_image_src( $parallax_image_id, 'full' );
|
||||
if ( ! empty( $parallax_image_src[0] ) ) {
|
||||
$parallax_image_src = $parallax_image_src[0];
|
||||
}
|
||||
}
|
||||
$wrapper_attributes[] = 'data-vc-parallax-image="' . esc_attr( $parallax_image_src ) . '"';
|
||||
}
|
||||
if ( ! $parallax && $has_video_bg ) {
|
||||
$wrapper_attributes[] = 'data-vc-video-bg="' . esc_attr( $video_bg_url ) . '"';
|
||||
}
|
||||
$css_class = preg_replace( '/\s+/', ' ', apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode( ' ', array_filter( array_unique( $css_classes ) ) ), $this->settings['base'], $atts ) );
|
||||
$wrapper_attributes[] = 'class="' . esc_attr( trim( $css_class ) ) . '"';
|
||||
|
||||
$output .= '<div ' . implode( ' ', $wrapper_attributes ) . '>';
|
||||
$output .= wpb_js_remove_wpautop( $content );
|
||||
$output .= '</div>';
|
||||
$output .= $after_output;
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $css
|
||||
* @var $el_id
|
||||
* @var $equal_height
|
||||
* @var $content_placement
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Row_Inner
|
||||
*/
|
||||
$el_class = $equal_height = $content_placement = $css = $el_id = '';
|
||||
$disable_element = '';
|
||||
$output = $after_output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$css_classes = array(
|
||||
'vc_row',
|
||||
'wpb_row',
|
||||
//deprecated
|
||||
'vc_inner',
|
||||
'vc_row-fluid',
|
||||
$el_class,
|
||||
vc_shortcode_custom_css_class( $css ),
|
||||
);
|
||||
if ( 'yes' === $disable_element ) {
|
||||
if ( vc_is_page_editable() ) {
|
||||
$css_classes[] = 'vc_hidden-lg vc_hidden-xs vc_hidden-sm vc_hidden-md';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
if ( vc_shortcode_custom_css_has_property( $css, array(
|
||||
'border',
|
||||
'background',
|
||||
) ) ) {
|
||||
$css_classes[] = 'vc_row-has-fill';
|
||||
}
|
||||
|
||||
if ( ! empty( $atts['gap'] ) ) {
|
||||
$css_classes[] = 'vc_column-gap-' . $atts['gap'];
|
||||
}
|
||||
|
||||
if ( ! empty( $equal_height ) ) {
|
||||
$flex_row = true;
|
||||
$css_classes[] = 'vc_row-o-equal-height';
|
||||
}
|
||||
|
||||
if ( ! empty( $atts['rtl_reverse'] ) ) {
|
||||
$css_classes[] = 'vc_rtl-columns-reverse';
|
||||
}
|
||||
|
||||
if ( ! empty( $content_placement ) ) {
|
||||
$flex_row = true;
|
||||
$css_classes[] = 'vc_row-o-content-' . $content_placement;
|
||||
}
|
||||
|
||||
if ( ! empty( $flex_row ) ) {
|
||||
$css_classes[] = 'vc_row-flex';
|
||||
}
|
||||
|
||||
$wrapper_attributes = array();
|
||||
// build attributes for wrapper
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
|
||||
$css_class = preg_replace( '/\s+/', ' ', apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode( ' ', array_filter( array_unique( $css_classes ) ) ), $this->settings['base'], $atts ) );
|
||||
$wrapper_attributes[] = 'class="' . esc_attr( trim( $css_class ) ) . '"';
|
||||
|
||||
$output .= '<div ' . implode( ' ', $wrapper_attributes ) . '>';
|
||||
$output .= wpb_js_remove_wpautop( $content );
|
||||
$output .= '</div>';
|
||||
$output .= $after_output;
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,134 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $full_width
|
||||
* @var $full_height
|
||||
* @var $columns_placement
|
||||
* @var $content_placement
|
||||
* @var $parallax
|
||||
* @var $parallax_image
|
||||
* @var $css
|
||||
* @var $el_id
|
||||
* @var $video_bg
|
||||
* @var $video_bg_url
|
||||
* @var $video_bg_parallax
|
||||
* @var $parallax_speed_bg
|
||||
* @var $parallax_speed_video
|
||||
* @var $content - shortcode content
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Row
|
||||
*/
|
||||
$el_class = $full_height = $parallax_speed_bg = $parallax_speed_video = $full_width = $flex_row = $columns_placement = $content_placement = $parallax = $parallax_image = $css = $el_id = $video_bg = $video_bg_url = $video_bg_parallax = $css_animation = '';
|
||||
$disable_element = '';
|
||||
$output = $after_output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
wp_enqueue_script( 'wpb_composer_front_js' );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
|
||||
$css_classes = array(
|
||||
'vc_section',
|
||||
$el_class,
|
||||
vc_shortcode_custom_css_class( $css ),
|
||||
);
|
||||
|
||||
if ( 'yes' === $disable_element ) {
|
||||
if ( vc_is_page_editable() ) {
|
||||
$css_classes[] = 'vc_hidden-lg vc_hidden-xs vc_hidden-sm vc_hidden-md';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
if ( vc_shortcode_custom_css_has_property( $css, array(
|
||||
'border',
|
||||
'background',
|
||||
) ) || $video_bg || $parallax
|
||||
) {
|
||||
$css_classes[] = 'vc_section-has-fill';
|
||||
}
|
||||
|
||||
|
||||
$wrapper_attributes = array();
|
||||
// build attributes for wrapper
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
if ( ! empty( $full_width ) ) {
|
||||
$wrapper_attributes[] = 'data-vc-full-width="true"';
|
||||
$wrapper_attributes[] = 'data-vc-full-width-init="false"';
|
||||
if ( 'stretch_row_content' === $full_width ) {
|
||||
$wrapper_attributes[] = 'data-vc-stretch-content="true"';
|
||||
}
|
||||
$after_output .= '<div class="vc_row-full-width vc_clearfix"></div>';
|
||||
}
|
||||
|
||||
if ( ! empty( $full_height ) ) {
|
||||
$css_classes[] = 'vc_row-o-full-height';
|
||||
}
|
||||
|
||||
if ( ! empty( $content_placement ) ) {
|
||||
$flex_row = true;
|
||||
$css_classes[] = 'vc_section-o-content-' . $content_placement;
|
||||
}
|
||||
|
||||
if ( ! empty( $flex_row ) ) {
|
||||
$css_classes[] = 'vc_section-flex';
|
||||
}
|
||||
|
||||
$has_video_bg = ( ! empty( $video_bg ) && ! empty( $video_bg_url ) && vc_extract_youtube_id( $video_bg_url ) );
|
||||
|
||||
$parallax_speed = $parallax_speed_bg;
|
||||
if ( $has_video_bg ) {
|
||||
$parallax = $video_bg_parallax;
|
||||
$parallax_speed = $parallax_speed_video;
|
||||
$parallax_image = $video_bg_url;
|
||||
$css_classes[] = 'vc_video-bg-container';
|
||||
wp_enqueue_script( 'vc_youtube_iframe_api_js' );
|
||||
}
|
||||
|
||||
if ( ! empty( $parallax ) ) {
|
||||
wp_enqueue_script( 'vc_jquery_skrollr_js' );
|
||||
$wrapper_attributes[] = 'data-vc-parallax="' . esc_attr( $parallax_speed ) . '"'; // parallax speed
|
||||
$css_classes[] = 'vc_general vc_parallax vc_parallax-' . $parallax;
|
||||
if ( false !== strpos( $parallax, 'fade' ) ) {
|
||||
$css_classes[] = 'js-vc_parallax-o-fade';
|
||||
$wrapper_attributes[] = 'data-vc-parallax-o-fade="on"';
|
||||
} elseif ( false !== strpos( $parallax, 'fixed' ) ) {
|
||||
$css_classes[] = 'js-vc_parallax-o-fixed';
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $parallax_image ) ) {
|
||||
if ( $has_video_bg ) {
|
||||
$parallax_image_src = $parallax_image;
|
||||
} else {
|
||||
$parallax_image_id = preg_replace( '/[^\d]/', '', $parallax_image );
|
||||
$parallax_image_src = wp_get_attachment_image_src( $parallax_image_id, 'full' );
|
||||
if ( ! empty( $parallax_image_src[0] ) ) {
|
||||
$parallax_image_src = $parallax_image_src[0];
|
||||
}
|
||||
}
|
||||
$wrapper_attributes[] = 'data-vc-parallax-image="' . esc_attr( $parallax_image_src ) . '"';
|
||||
}
|
||||
if ( ! $parallax && $has_video_bg ) {
|
||||
$wrapper_attributes[] = 'data-vc-video-bg="' . esc_attr( $video_bg_url ) . '"';
|
||||
}
|
||||
$css_class = preg_replace( '/\s+/', ' ', apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode( ' ', array_filter( array_unique( $css_classes ) ) ), $this->settings['base'], $atts ) );
|
||||
$wrapper_attributes[] = 'class="' . esc_attr( trim( $css_class ) ) . '"';
|
||||
|
||||
$output .= '<section ' . implode( ' ', $wrapper_attributes ) . '>';
|
||||
$output .= wpb_js_remove_wpautop( $content );
|
||||
$output .= '</section>';
|
||||
$output .= $after_output;
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var string $el_width
|
||||
* @var string $style
|
||||
* @var string $color
|
||||
* @var string $border_width
|
||||
* @var string $accent_color
|
||||
* @var string $el_class
|
||||
* @var string $el_id
|
||||
* @var string $align
|
||||
* @var string $css
|
||||
* @var string $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Separator
|
||||
*/
|
||||
$el_width = $style = $color = $border_width = $accent_color = $el_class = $el_id = $align = $css = $css_animation = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$class_to_filter = '';
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
$vc_text_separator = visual_composer()->getShortCode( 'vc_text_separator' );
|
||||
$atts['el_class'] = $css_class;
|
||||
$atts['layout'] = 'separator_no_text';
|
||||
if ( is_object( $vc_text_separator ) ) {
|
||||
echo $vc_text_separator->render( $atts );
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $source
|
||||
* @var $image
|
||||
* @var $custom_src
|
||||
* @var $onclick
|
||||
* @var $img_size
|
||||
* @var $external_img_size
|
||||
* @var $caption
|
||||
* @var $img_link_large
|
||||
* @var $link
|
||||
* @var $img_link_target
|
||||
* @var $alignment
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $css_animation
|
||||
* @var $style
|
||||
* @var $external_style
|
||||
* @var $border_color
|
||||
* @var $css
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Single_image
|
||||
*/
|
||||
$title = $source = $image = $custom_src = $onclick = $img_size = $external_img_size =
|
||||
$caption = $img_link_large = $link = $img_link_target = $alignment = $el_class = $el_id = $css_animation = $style = $external_style = $border_color = $css = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$default_src = vc_asset_url( 'vc/no_image.png' );
|
||||
|
||||
// backward compatibility. since 4.6
|
||||
if ( empty( $onclick ) && isset( $img_link_large ) && 'yes' === $img_link_large ) {
|
||||
$onclick = 'img_link_large';
|
||||
} elseif ( empty( $atts['onclick'] ) && ( ! isset( $atts['img_link_large'] ) || 'yes' !== $atts['img_link_large'] ) ) {
|
||||
$onclick = 'custom_link';
|
||||
}
|
||||
|
||||
if ( 'external_link' === $source ) {
|
||||
$style = $external_style;
|
||||
$border_color = $external_border_color;
|
||||
}
|
||||
|
||||
$border_color = ( '' !== $border_color ) ? ' vc_box_border_' . $border_color : '';
|
||||
|
||||
$img = false;
|
||||
|
||||
switch ( $source ) {
|
||||
case 'media_library':
|
||||
case 'featured_image':
|
||||
|
||||
if ( 'featured_image' === $source ) {
|
||||
$post_id = get_the_ID();
|
||||
if ( $post_id && has_post_thumbnail( $post_id ) ) {
|
||||
$img_id = get_post_thumbnail_id( $post_id );
|
||||
} else {
|
||||
$img_id = 0;
|
||||
}
|
||||
} else {
|
||||
$img_id = preg_replace( '/[^\d]/', '', $image );
|
||||
}
|
||||
|
||||
// set rectangular
|
||||
if ( preg_match( '/_circle_2$/', $style ) ) {
|
||||
$style = preg_replace( '/_circle_2$/', '_circle', $style );
|
||||
$img_size = $this->getImageSquareSize( $img_id, $img_size );
|
||||
}
|
||||
|
||||
if ( ! $img_size ) {
|
||||
$img_size = 'medium';
|
||||
}
|
||||
|
||||
$img = wpb_getImageBySize( array(
|
||||
'attach_id' => $img_id,
|
||||
'thumb_size' => $img_size,
|
||||
'class' => 'vc_single_image-img',
|
||||
) );
|
||||
|
||||
// don't show placeholder in public version if post doesn't have featured image
|
||||
if ( 'featured_image' === $source ) {
|
||||
if ( ! $img && 'page' === vc_manager()->mode() ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'external_link':
|
||||
$dimensions = vcExtractDimensions( $external_img_size );
|
||||
$hwstring = $dimensions ? image_hwstring( $dimensions[0], $dimensions[1] ) : '';
|
||||
|
||||
$custom_src = $custom_src ? esc_attr( $custom_src ) : $default_src;
|
||||
|
||||
$img = array(
|
||||
'thumbnail' => '<img class="vc_single_image-img" ' . $hwstring . ' src="' . $custom_src . '" />',
|
||||
);
|
||||
break;
|
||||
|
||||
default:
|
||||
$img = false;
|
||||
}
|
||||
|
||||
if ( ! $img ) {
|
||||
$img['thumbnail'] = '<img class="vc_img-placeholder vc_single_image-img" src="' . $default_src . '" />';
|
||||
}
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
|
||||
// backward compatibility
|
||||
if ( vc_has_class( 'prettyphoto', $el_class ) ) {
|
||||
$onclick = 'link_image';
|
||||
}
|
||||
|
||||
// backward compatibility. will be removed in 4.7+
|
||||
if ( ! empty( $atts['img_link'] ) ) {
|
||||
$link = $atts['img_link'];
|
||||
if ( ! preg_match( '/^(https?\:\/\/|\/\/)/', $link ) ) {
|
||||
$link = 'http://' . $link;
|
||||
}
|
||||
}
|
||||
|
||||
// backward compatibility
|
||||
if ( in_array( $link, array( 'none', 'link_no' ) ) ) {
|
||||
$link = '';
|
||||
}
|
||||
|
||||
$a_attrs = array();
|
||||
|
||||
switch ( $onclick ) {
|
||||
case 'img_link_large':
|
||||
|
||||
if ( 'external_link' === $source ) {
|
||||
$link = $custom_src;
|
||||
} else {
|
||||
$link = wp_get_attachment_image_src( $img_id, 'large' );
|
||||
$link = $link[0];
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'link_image':
|
||||
wp_enqueue_script( 'prettyphoto' );
|
||||
wp_enqueue_style( 'prettyphoto' );
|
||||
|
||||
$a_attrs['class'] = 'prettyphoto';
|
||||
$a_attrs['data-rel'] = 'prettyPhoto[rel-' . get_the_ID() . '-' . rand() . ']';
|
||||
|
||||
// backward compatibility
|
||||
if ( vc_has_class( 'prettyphoto', $el_class ) ) {
|
||||
// $link is already defined
|
||||
} elseif ( 'external_link' === $source ) {
|
||||
$link = $custom_src;
|
||||
} else {
|
||||
$link = wp_get_attachment_image_src( $img_id, 'large' );
|
||||
$link = $link[0];
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'custom_link':
|
||||
// $link is already defined
|
||||
break;
|
||||
|
||||
case 'zoom':
|
||||
wp_enqueue_script( 'vc_image_zoom' );
|
||||
|
||||
if ( 'external_link' === $source ) {
|
||||
$large_img_src = $custom_src;
|
||||
} else {
|
||||
$large_img_src = wp_get_attachment_image_src( $img_id, 'large' );
|
||||
if ( $large_img_src ) {
|
||||
$large_img_src = $large_img_src[0];
|
||||
}
|
||||
}
|
||||
|
||||
$img['thumbnail'] = str_replace( '<img ', '<img data-vc-zoom="' . $large_img_src . '" ', $img['thumbnail'] );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// backward compatibility
|
||||
if ( vc_has_class( 'prettyphoto', $el_class ) ) {
|
||||
$el_class = vc_remove_class( 'prettyphoto', $el_class );
|
||||
}
|
||||
|
||||
$wrapperClass = 'vc_single_image-wrapper ' . $style . ' ' . $border_color;
|
||||
|
||||
if ( $link ) {
|
||||
$a_attrs['href'] = $link;
|
||||
$a_attrs['target'] = $img_link_target;
|
||||
if ( ! empty( $a_attrs['class'] ) ) {
|
||||
$wrapperClass .= ' ' . $a_attrs['class'];
|
||||
unset( $a_attrs['class'] );
|
||||
}
|
||||
$html = '<a ' . vc_stringify_attributes( $a_attrs ) . ' class="' . $wrapperClass . '">' . $img['thumbnail'] . '</a>';
|
||||
} else {
|
||||
$html = '<div class="' . $wrapperClass . '">' . $img['thumbnail'] . '</div>';
|
||||
}
|
||||
|
||||
$class_to_filter = 'wpb_single_image wpb_content_element vc_align_' . $alignment . ' ' . $this->getCSSAnimation( $css_animation );
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
if ( in_array( $source, array( 'media_library', 'featured_image' ) ) && 'yes' === $add_caption ) {
|
||||
$img_id = apply_filters( 'wpml_object_id', $img_id, 'attachment' );
|
||||
$post = get_post( $img_id );
|
||||
$caption = $post->post_excerpt;
|
||||
} else {
|
||||
if ( 'external_link' === $source ) {
|
||||
$add_caption = 'yes';
|
||||
}
|
||||
}
|
||||
|
||||
if ( 'yes' === $add_caption && '' !== $caption ) {
|
||||
$html .= '<figcaption class="vc_figure-caption">' . esc_html( $caption ) . '</figcaption>';
|
||||
}
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '
|
||||
<div ' . implode( ' ', $wrapper_attributes ) . ' class="' . esc_attr( trim( $css_class ) ) . '">
|
||||
' . wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_singleimage_heading' ) ) . '
|
||||
<figure class="wpb_wrapper vc_figure">
|
||||
' . $html . '
|
||||
</figure>
|
||||
</div>
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $tab_id
|
||||
* @var $title
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Tab
|
||||
*/
|
||||
$tab_id = $title = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
wp_enqueue_script( 'jquery_ui_tabs_rotate' );
|
||||
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_tab ui-tabs-panel wpb_ui-tabs-hide vc_clearfix', $this->settings['base'], $atts );
|
||||
|
||||
$output = '
|
||||
<div id="tab-' . ( empty( $tab_id ) ? sanitize_title( $title ) : esc_attr( $tab_id ) ) . '" class="' . esc_attr( $css_class ) . '">
|
||||
' . ( ( '' === trim( $content ) ) ? __( 'Empty tab. Edit page to add content here.', 'js_composer' ) : wpb_js_remove_wpautop( $content ) ) . '
|
||||
</div>
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $interval
|
||||
* @var $el_class
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Tabs
|
||||
*/
|
||||
$title = $interval = $el_class = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
wp_enqueue_script( 'jquery-ui-tabs' );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
|
||||
$element = 'wpb_tabs';
|
||||
if ( 'vc_tour' === $this->shortcode ) {
|
||||
$element = 'wpb_tour';
|
||||
}
|
||||
|
||||
// Extract tab titles
|
||||
preg_match_all( '/vc_tab([^\]]+)/i', $content, $matches, PREG_OFFSET_CAPTURE );
|
||||
$tab_titles = array();
|
||||
/**
|
||||
* vc_tabs
|
||||
*
|
||||
*/
|
||||
if ( isset( $matches[1] ) ) {
|
||||
$tab_titles = $matches[1];
|
||||
}
|
||||
$tabs_nav = '';
|
||||
$tabs_nav .= '<ul class="wpb_tabs_nav ui-tabs-nav vc_clearfix">';
|
||||
foreach ( $tab_titles as $tab ) {
|
||||
$tab_atts = shortcode_parse_atts( $tab[0] );
|
||||
if ( isset( $tab_atts['title'] ) ) {
|
||||
$tabs_nav .= '<li><a href="#tab-' . ( isset( $tab_atts['tab_id'] ) ? $tab_atts['tab_id'] : sanitize_title( $tab_atts['title'] ) ) . '">' . $tab_atts['title'] . '</a></li>';
|
||||
}
|
||||
}
|
||||
$tabs_nav .= '</ul>';
|
||||
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, trim( $element . ' wpb_content_element ' . $el_class ), $this->settings['base'], $atts );
|
||||
|
||||
if ( 'vc_tour' === $this->shortcode ) {
|
||||
$next_prev_nav = '<div class="wpb_tour_next_prev_nav vc_clearfix"> <span class="wpb_prev_slide"><a href="#prev" title="' . __( 'Previous tab', 'js_composer' ) . '">' . __( 'Previous tab', 'js_composer' ) . '</a></span> <span class="wpb_next_slide"><a href="#next" title="' . __( 'Next tab', 'js_composer' ) . '">' . __( 'Next tab', 'js_composer' ) . '</a></span></div>';
|
||||
} else {
|
||||
$next_prev_nav = '';
|
||||
}
|
||||
|
||||
$output = '
|
||||
<div class="' . $css_class . '" data-interval="' . $interval . '">
|
||||
<div class="wpb_wrapper wpb_tour_tabs_wrapper ui-tabs vc_clearfix">
|
||||
' . wpb_widget_title( array( 'title' => $title, 'extraclass' => $element . '_heading' ) )
|
||||
. $tabs_nav
|
||||
. wpb_js_remove_wpautop( $content )
|
||||
. $next_prev_nav . '
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title_align
|
||||
* @var $el_width
|
||||
* @var $style
|
||||
* @var $title
|
||||
* @var $align
|
||||
* @var $color
|
||||
* @var $accent_color
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $layout
|
||||
* @var $css
|
||||
* @var $border_width
|
||||
* @var $add_icon
|
||||
* Icons:
|
||||
* @var $i_type
|
||||
* @var $i_icon_fontawesome
|
||||
* @var $i_icon_openiconic
|
||||
* @var $i_icon_typicons
|
||||
* @var $i_icon_entypo
|
||||
* @var $i_icon_linecons
|
||||
* @var $i_color
|
||||
* @var $i_custom_color
|
||||
* @var $i_background_style
|
||||
* @var $i_background_color
|
||||
* @var $i_custom_background_color
|
||||
* @var $i_size
|
||||
* @var $i_css_animation
|
||||
* @var $css_animation
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortcode_Vc_Text_Separator
|
||||
*/
|
||||
|
||||
$title_align = $el_width = $style = $title = $align = $color = $accent_color = $el_class = $el_id = $layout = $css = $border_width = $add_icon = $i_type = $i_icon_fontawesome = $i_icon_openiconic = $i_icon_typicons = $i_icon_entypo = $i_icon_linecons = $i_color = $i_custom_color = $i_background_style = $i_background_color = $i_custom_background_color = $i_size = $i_css_animation = $css_animation = '';
|
||||
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$class = 'vc_separator wpb_content_element';
|
||||
|
||||
$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 .= ( 'separator_no_text' === $layout ) ? ' vc_separator_no_text' : '';
|
||||
if ( '' !== $color && 'custom' !== $color ) {
|
||||
$class .= ' vc_sep_color_' . $color;
|
||||
}
|
||||
$inline_css = ( 'custom' === $color && '' !== $accent_color ) ? ' style="' . vc_get_css_color( 'border-color', $accent_color ) . '"' : '';
|
||||
|
||||
$class_to_filter = $class;
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
$css_class = esc_attr( trim( $css_class ) );
|
||||
$icon = '';
|
||||
if ( 'true' === $add_icon ) {
|
||||
vc_icon_element_fonts_enqueue( $i_type );
|
||||
$icon = $this->getVcIcon( $atts );
|
||||
}
|
||||
|
||||
$content = '';
|
||||
if ( $icon ) {
|
||||
$content = $icon;
|
||||
}
|
||||
if ( '' !== $title && 'separator_no_text' !== $layout ) {
|
||||
$css_class .= ' vc_separator-has-text';
|
||||
$content .= '<h4>' . $title . '</h4>';
|
||||
}
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$wrapper_attributes_html = implode( ' ', $wrapper_attributes );
|
||||
$separatorHtml = <<<TEMPLATE
|
||||
<div class="$css_class" $wrapper_attributes_html><span class="vc_sep_holder vc_sep_holder_l"><span $inline_css class="vc_sep_line"></span></span>$content<span class="vc_sep_holder vc_sep_holder_r"><span $inline_css class="vc_sep_line"></span></span>
|
||||
</div>
|
||||
TEMPLATE;
|
||||
echo $separatorHtml;
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $el_class
|
||||
* @var $style
|
||||
* @var $color
|
||||
* @var $size
|
||||
* @var $open
|
||||
* @var $css_animation
|
||||
* @var $el_id
|
||||
* @var $content - shortcode content
|
||||
* @var $css
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Toggle
|
||||
*/
|
||||
$title = $el_class = $style = $color = $size = $open = $css_animation = $css = $el_id = '';
|
||||
$output = '';
|
||||
|
||||
$inverted = false;
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
// checking is color inverted
|
||||
$style = str_replace( '_outline', '', $style, $inverted );
|
||||
/**
|
||||
* @since 4.4
|
||||
*/
|
||||
$elementClass = array(
|
||||
'base' => apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_toggle', $this->settings['base'], $atts ),
|
||||
// TODO: check this code, don't know how to get base class names from params
|
||||
'style' => 'vc_toggle_' . $style,
|
||||
'color' => ( $color ) ? 'vc_toggle_color_' . $color : '',
|
||||
'inverted' => ( $inverted ) ? 'vc_toggle_color_inverted' : '',
|
||||
'size' => ( $size ) ? 'vc_toggle_size_' . $size : '',
|
||||
'open' => ( 'true' === $open ) ? 'vc_toggle_active' : '',
|
||||
'extra' => $this->getExtraClass( $el_class ),
|
||||
'css_animation' => $this->getCSSAnimation( $css_animation ), // TODO: remove getCssAnimation as function in helpers
|
||||
);
|
||||
|
||||
$class_to_filter = trim( implode( ' ', $elementClass ) );
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
?>
|
||||
<div <?php echo isset( $el_id ) && ! empty( $el_id ) ? 'id="' . esc_attr( $el_id ) . '"' : ''; ?> class="<?php echo esc_attr( $css_class ); ?>">
|
||||
<div class="vc_toggle_title"><?php echo apply_filters( 'wpb_toggle_heading', $this->getHeading( $atts ), array(
|
||||
'title' => $title,
|
||||
'open' => $open,
|
||||
) ); ?><i class="vc_toggle_icon"></i></div>
|
||||
<div class="vc_toggle_content"><?php echo wpb_js_remove_wpautop( apply_filters( 'the_content', $content ), true ); ?></div>
|
||||
</div>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $content - shortcode content
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $this WPBakeryShortCode_VC_Tta_Accordion|WPBakeryShortCode_VC_Tta_Tabs|WPBakeryShortCode_VC_Tta_Tour|WPBakeryShortCode_VC_Tta_Pageable
|
||||
*/
|
||||
$el_class = $css = $css_animation = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
$this->resetVariables( $atts, $content );
|
||||
extract( $atts );
|
||||
|
||||
$this->setGlobalTtaInfo();
|
||||
|
||||
$this->enqueueTtaStyles();
|
||||
$this->enqueueTtaScript();
|
||||
|
||||
// It is required to be before tabs-list-top/left/bottom/right for tabs/tours
|
||||
$prepareContent = $this->getTemplateVariable( 'content' );
|
||||
|
||||
$class_to_filter = $this->getTtaGeneralClasses();
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getCSSAnimation( $css_animation );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
|
||||
$output = '<div ' . $this->getWrapperAttributes() . '>';
|
||||
$output .= $this->getTemplateVariable( 'title' );
|
||||
$output .= '<div class="' . esc_attr( $css_class ) . '">';
|
||||
$output .= $this->getTemplateVariable( 'tabs-list-top' );
|
||||
$output .= $this->getTemplateVariable( 'tabs-list-left' );
|
||||
$output .= '<div class="vc_tta-panels-container">';
|
||||
$output .= $this->getTemplateVariable( 'pagination-top' );
|
||||
$output .= '<div class="vc_tta-panels">';
|
||||
$output .= $prepareContent;
|
||||
$output .= '</div>';
|
||||
$output .= $this->getTemplateVariable( 'pagination-bottom' );
|
||||
$output .= '</div>';
|
||||
$output .= $this->getTemplateVariable( 'tabs-list-bottom' );
|
||||
$output .= $this->getTemplateVariable( 'tabs-list-right' );
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_id
|
||||
* @var $el_class
|
||||
* @var $content - shortcode content
|
||||
* @var $this WPBakeryShortCode_VC_Tta_Section
|
||||
*/
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
$this->resetVariables( $atts, $content );
|
||||
WPBakeryShortCode_VC_Tta_Section::$self_count ++;
|
||||
WPBakeryShortCode_VC_Tta_Section::$section_info[] = $atts;
|
||||
$isPageEditable = vc_is_page_editable();
|
||||
|
||||
$output = '';
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $atts['el_id'] ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $atts['el_id'] ) . '"';
|
||||
}
|
||||
$output .= '<div ' . implode( ' ', $wrapper_attributes ) . ' class="' . esc_attr( $this->getElementClasses() ) . '"';
|
||||
$output .= ' id="' . esc_attr( $this->getTemplateVariable( 'tab_id' ) ) . '"';
|
||||
$output .= ' data-vc-content=".vc_tta-panel-body">';
|
||||
$output .= '<div class="vc_tta-panel-body">';
|
||||
if ( $isPageEditable ) {
|
||||
$output .= '<div data-js-panel-body>'; // fix for fe - shortcodes container, not required in b.e.
|
||||
}
|
||||
$output .= $this->getTemplateVariable( 'basic-heading' );
|
||||
$output .= $this->getTemplateVariable( 'content' );
|
||||
if ( $isPageEditable ) {
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $content - shortcode content
|
||||
* @var $this WPBakeryShortCode_VC_Tta_Section
|
||||
*/
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
$this->resetVariables( $atts, $content );
|
||||
WPBakeryShortCode_VC_Tta_Section::$self_count ++;
|
||||
WPBakeryShortCode_VC_Tta_Section::$section_info[] = $atts;
|
||||
$isPageEditable = vc_is_page_editable();
|
||||
|
||||
$output = '';
|
||||
|
||||
$output .= '<div class="' . esc_attr( $this->getElementClasses() ) . '"';
|
||||
$output .= ' id="' . esc_attr( $this->getTemplateVariable( 'tab_id' ) ) . '"';
|
||||
$output .= ' data-vc-content=".vc_tta-panel-body">';
|
||||
$output .= '<div class="vc_tta-panel-heading">';
|
||||
$output .= $this->getTemplateVariable( 'heading' );
|
||||
$output .= '</div>';
|
||||
$output .= '<div class="vc_tta-panel-body">';
|
||||
if ( $isPageEditable ) {
|
||||
$output .= '<div data-js-panel-body>'; // fix for fe - shortcodes container, not required in b.e.
|
||||
}
|
||||
$output .= $this->getTemplateVariable( 'content' );
|
||||
if ( $isPageEditable ) {
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_TweetMeMe
|
||||
*/
|
||||
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
|
||||
$tweet_btn_text = '';
|
||||
$type = $atts['type'];
|
||||
|
||||
switch ( $type ) {
|
||||
case 'follow':
|
||||
$tweet_btn_text = __( 'Follow', 'js_composer' );
|
||||
break;
|
||||
|
||||
case 'mention':
|
||||
$tweet_btn_text = __( 'Tweet to', 'js_composer' );
|
||||
break;
|
||||
|
||||
case 'share':
|
||||
case 'hashtag':
|
||||
$tweet_btn_text = __( 'Tweet', 'js_composer' );
|
||||
break;
|
||||
default:
|
||||
$type = 'share';
|
||||
$tweet_btn_text = __( 'Tweet', 'js_composer' );
|
||||
break;
|
||||
}
|
||||
$data = array();
|
||||
$classes = array();
|
||||
$class_to_filter = 'vc_tweetmeme-element' . vc_shortcode_custom_css_class( $atts['css'], ' ' ) . $this->getCSSAnimation( $atts['css_animation'] ) . $this->getExtraClass( $atts['el_class'] );
|
||||
$el_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->getShortcode(), $atts );
|
||||
if ( ! empty( $atts['large_button'] ) ) {
|
||||
$data['data-size'] = 'large';
|
||||
}
|
||||
|
||||
$url = 'https://twitter.com/';
|
||||
if ( 'share' === $type ) {
|
||||
$url = 'https://twitter.com/share';
|
||||
$classes[] = 'twitter-share-button';
|
||||
|
||||
if ( 'page_url' !== $atts['share_use_page_url'] ) {
|
||||
$data['data-url'] = $atts['share_use_custom_url'];
|
||||
}
|
||||
if ( 'page_title' !== $atts['share_text_page_title'] ) {
|
||||
$data['data-text'] = $atts['share_text_custom_text'];
|
||||
}
|
||||
if ( ! empty( $atts['share_via'] ) ) {
|
||||
$data['data-via'] = $atts['share_via'];
|
||||
}
|
||||
if ( ! empty( $atts['share_recommend'] ) ) {
|
||||
$data['data-related'] = $atts['share_recommend'];
|
||||
}
|
||||
if ( ! empty( $atts['share_hashtag'] ) ) {
|
||||
$data['data-hashtags'] = $atts['share_hashtag'];
|
||||
}
|
||||
} else if ( 'follow' === $type ) {
|
||||
$url = 'https://twitter.com/';
|
||||
$classes[] = 'twitter-follow-button';
|
||||
if ( ! empty( $atts['follow_user'] ) ) {
|
||||
$url .= esc_attr( $atts['follow_user'] );
|
||||
$tweet_btn_text .= ' @' . esc_attr( $atts['follow_user'] );
|
||||
}
|
||||
if ( 'yes' != $atts['follow_show_username'] ) {
|
||||
$data['data-show-screen-name'] = 'false';
|
||||
}
|
||||
$data['data-show-count'] = ( ! ! $atts['show_followers_count'] ) ? 'true' : 'false';
|
||||
|
||||
} else if ( 'hashtag' === $type ) {
|
||||
$url = 'https://twitter.com/intent/tweet?';
|
||||
$classes[] = 'twitter-hashtag-button';
|
||||
$url_atts = array();
|
||||
if ( ! empty( $atts['hashtag_hash'] ) ) {
|
||||
$url_atts[] = 'button_hashtag=' . esc_attr( $atts['hashtag_hash'] );
|
||||
$tweet_btn_text .= ' #' . esc_attr( $atts['hashtag_hash'] );
|
||||
}
|
||||
if ( 'yes' !== $atts['hashtag_no_default'] ) {
|
||||
$url_atts[] = 'text=' . esc_attr( $atts['hashtag_custom_tweet_text'] );
|
||||
}
|
||||
$url .= implode( '&', $url_atts );
|
||||
|
||||
$rel = array();
|
||||
if ( ! empty( $atts['hashtag_recommend_1'] ) ) {
|
||||
$rel[] = $atts['hashtag_recommend_1'];
|
||||
}
|
||||
if ( ! empty( $atts['hashtag_recommend_1'] ) ) {
|
||||
$rel[] = $atts['hashtag_recommend_2'];
|
||||
}
|
||||
if ( ! empty( $rel ) ) {
|
||||
$data['data-related'] = implode( ',', $rel );
|
||||
}
|
||||
if ( 'yes' !== $atts['hashtag_no_url'] ) {
|
||||
$data['data-url'] = $atts['hashtag_custom_tweet_url'];
|
||||
}
|
||||
} else if ( 'mention' === $type ) {
|
||||
$url = 'https://twitter.com/intent/tweet?';
|
||||
$classes[] = 'twitter-mention-button';
|
||||
$url_atts = array();
|
||||
if ( ! empty( $atts['mention_tweet_to'] ) ) {
|
||||
$url_atts[] = 'screen_name=' . esc_attr( $atts['mention_tweet_to'] );
|
||||
$tweet_btn_text .= ' @' . esc_attr( $atts['mention_tweet_to'] );
|
||||
}
|
||||
if ( 'yes' !== $atts['mention_no_default'] ) {
|
||||
$url_atts[] = 'text=' . esc_attr( $atts['mention_custom_tweet_text'] );
|
||||
}
|
||||
$url .= implode( '&', $url_atts );
|
||||
|
||||
$rel = array();
|
||||
if ( ! empty( $atts['mention_recommend_1'] ) ) {
|
||||
$rel[] = $atts['mention_recommend_1'];
|
||||
}
|
||||
if ( ! empty( $atts['mention_recommend_1'] ) ) {
|
||||
$rel[] = $atts['mention_recommend_1'];
|
||||
}
|
||||
if ( ! empty( $rel ) ) {
|
||||
$data['data-related'] = implode( ',', $rel );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $atts['lang'] ) ) {
|
||||
$data['data-lang'] = $atts['lang'];
|
||||
}
|
||||
$data_imploded = array();
|
||||
foreach ( $data as $k => $v ) {
|
||||
$data_imploded[] = $k . '="' . esc_attr( $v ) . '"';
|
||||
}
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $atts['el_id'] ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $atts['el_id'] ) . '"';
|
||||
}
|
||||
$wrapper = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="' . esc_attr( $el_class ) . '">';
|
||||
$template = '<a href="' . esc_url( $url ) . '" class="' . esc_attr( implode( ' ', $classes ) ) . '" ' . implode( ' ', $data_imploded ) . '>' . $tweet_btn_text . '</a>';
|
||||
$template .= '<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?\'http\':\'https\';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+\'://platform.twitter.com/widgets.js\';fjs.parentNode.insertBefore(js,fjs);}}(document, \'script\', \'twitter-wjs\');</script>';
|
||||
$wrapper .= $template;
|
||||
$wrapper .= '</div>';
|
||||
echo $wrapper;
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $link
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $css
|
||||
* @var $css_animation
|
||||
* @var $el_width
|
||||
* @var $el_aspect
|
||||
* @var $align
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Video
|
||||
*/
|
||||
$title = $link = $el_class = $el_id = $css = $css_animation = $el_width = $el_aspect = $align = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
if ( '' === $link ) {
|
||||
return null;
|
||||
}
|
||||
$el_class = $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
|
||||
|
||||
$video_w = 500;
|
||||
$video_h = $video_w / 1.61; //1.61 golden ratio
|
||||
/** @var WP_Embed $wp_embed */
|
||||
global $wp_embed;
|
||||
$embed = '';
|
||||
if ( is_object( $wp_embed ) ) {
|
||||
$embed = $wp_embed->run_shortcode( '[embed width="' . $video_w . '"' . $video_h . ']' . $link . '[/embed]' );
|
||||
}
|
||||
$el_classes = array(
|
||||
'wpb_video_widget',
|
||||
'wpb_content_element',
|
||||
'vc_clearfix',
|
||||
$el_class,
|
||||
vc_shortcode_custom_css_class( $css, ' ' ),
|
||||
'vc_video-aspect-ratio-' . esc_attr( $el_aspect ),
|
||||
'vc_video-el-width-' . esc_attr( $el_width ),
|
||||
'vc_video-align-' . esc_attr( $align ),
|
||||
);
|
||||
$css_class = implode( ' ', $el_classes );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $css_class, $this->getShortcode(), $atts );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '
|
||||
<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>
|
||||
<div class="wpb_wrapper">
|
||||
' . wpb_widget_title( array(
|
||||
'title' => $title,
|
||||
'extraclass' => 'wpb_video_heading',
|
||||
) ) . '
|
||||
<div class="wpb_video_wrapper">' . $embed . '</div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $sidebar_id
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Widget_sidebar
|
||||
*/
|
||||
$title = $el_class = $el_id = $sidebar_id = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
if ( '' === $sidebar_id ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
|
||||
ob_start();
|
||||
dynamic_sidebar( $sidebar_id );
|
||||
$sidebar_value = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$sidebar_value = trim( $sidebar_value );
|
||||
$sidebar_value = ( '<li' === substr( $sidebar_value, 0, 3 ) ) ? '<ul>' . $sidebar_value . '</ul>' : $sidebar_value;
|
||||
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_widgetised_column wpb_content_element' . $el_class, $this->settings['base'], $atts );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="' . esc_attr( $css_class ) . '">
|
||||
<div class="wpb_wrapper">
|
||||
' . wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_widgetised_column_heading' ) ) . '
|
||||
' . $sidebar_value . '
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $options
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Wp_Archives
|
||||
*/
|
||||
$title = $el_class = $el_id = $options = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$options = explode( ',', $options );
|
||||
if ( in_array( 'dropdown', $options ) ) {
|
||||
$atts['dropdown'] = true;
|
||||
}
|
||||
if ( in_array( 'count', $options ) ) {
|
||||
$atts['count'] = true;
|
||||
}
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="vc_wp_archives wpb_content_element' . esc_attr( $el_class ) . '">';
|
||||
$type = 'WP_Widget_Archives';
|
||||
$args = array();
|
||||
global $wp_widget_factory;
|
||||
// to avoid unwanted warnings let's check before using widget
|
||||
if ( is_object( $wp_widget_factory ) && isset( $wp_widget_factory->widgets, $wp_widget_factory->widgets[ $type ] ) ) {
|
||||
ob_start();
|
||||
the_widget( $type, $atts, $args );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Wp_Calendar
|
||||
*/
|
||||
$title = $el_class = $el_id = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="vc_wp_calendar wpb_content_element' . esc_attr( $el_class ) . '">';
|
||||
$type = 'WP_Widget_Calendar';
|
||||
$args = array();
|
||||
global $wp_widget_factory;
|
||||
// to avoid unwanted warnings let's check before using widget
|
||||
if ( is_object( $wp_widget_factory ) && isset( $wp_widget_factory->widgets, $wp_widget_factory->widgets[ $type ] ) ) {
|
||||
ob_start();
|
||||
the_widget( $type, $atts, $args );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $options
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Wp_Categories
|
||||
*/
|
||||
$title = $options = $el_class = $el_id = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$options = explode( ',', $options );
|
||||
if ( in_array( 'dropdown', $options ) ) {
|
||||
$atts['dropdown'] = true;
|
||||
}
|
||||
if ( in_array( 'count', $options ) ) {
|
||||
$atts['count'] = true;
|
||||
}
|
||||
if ( in_array( 'hierarchical', $options ) ) {
|
||||
$atts['hierarchical'] = true;
|
||||
}
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="vc_wp_categories wpb_content_element' . esc_attr( $el_class ) . '">';
|
||||
$type = 'WP_Widget_Categories';
|
||||
$args = array();
|
||||
global $wp_widget_factory;
|
||||
// to avoid unwanted warnings let's check before using widget
|
||||
if ( is_object( $wp_widget_factory ) && isset( $wp_widget_factory->widgets, $wp_widget_factory->widgets[ $type ] ) ) {
|
||||
ob_start();
|
||||
the_widget( $type, $atts, $args );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $nav_menu
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Wp_Custommenu
|
||||
*/
|
||||
$title = $nav_menu = $el_class = $el_id = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="vc_wp_custommenu wpb_content_element' . esc_attr( $el_class ) . '">';
|
||||
$type = 'WP_Nav_Menu_Widget';
|
||||
$args = array();
|
||||
global $wp_widget_factory;
|
||||
// to avoid unwanted warnings let's check before using widget
|
||||
if ( is_object( $wp_widget_factory ) && isset( $wp_widget_factory->widgets, $wp_widget_factory->widgets[ $type ] ) ) {
|
||||
ob_start();
|
||||
the_widget( $type, $atts, $args );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $category
|
||||
* @var $orderby
|
||||
* @var $options
|
||||
* @var $limit
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Wp_Links
|
||||
*/
|
||||
$category = $options = $orderby = $limit = $el_class = $el_id = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$options = explode( ',', $options );
|
||||
if ( in_array( 'images', $options ) ) {
|
||||
$atts['images'] = true;
|
||||
}
|
||||
if ( in_array( 'name', $options ) ) {
|
||||
$atts['name'] = true;
|
||||
}
|
||||
if ( in_array( 'description', $options ) ) {
|
||||
$atts['description'] = true;
|
||||
}
|
||||
if ( in_array( 'rating', $options ) ) {
|
||||
$atts['rating'] = true;
|
||||
}
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="vc_wp_links wpb_content_element' . esc_attr( $el_class ) . '">';
|
||||
$type = 'WP_Widget_Links';
|
||||
$args = array();
|
||||
global $wp_widget_factory;
|
||||
// to avoid unwanted warnings let's check before using widget
|
||||
if ( is_object( $wp_widget_factory ) && isset( $wp_widget_factory->widgets, $wp_widget_factory->widgets[ $type ] ) ) {
|
||||
ob_start();
|
||||
the_widget( $type, $atts, $args );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Wp_Meta
|
||||
*/
|
||||
$title = $el_class = $el_id = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="vc_wp_meta wpb_content_element' . esc_attr( $el_class ) . '">';
|
||||
$type = 'WP_Widget_Meta';
|
||||
$args = array();
|
||||
global $wp_widget_factory;
|
||||
// to avoid unwanted warnings let's check before using widget
|
||||
if ( is_object( $wp_widget_factory ) && isset( $wp_widget_factory->widgets, $wp_widget_factory->widgets[ $type ] ) ) {
|
||||
ob_start();
|
||||
the_widget( $type, $atts, $args );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $sortby
|
||||
* @var $exclude
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Wp_Pages
|
||||
*/
|
||||
$title = $sortby = $exclude = $el_class = $el_id = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="vc_wp_pages wpb_content_element' . esc_attr( $el_class ) . '">';
|
||||
$type = 'WP_Widget_Pages';
|
||||
$args = array();
|
||||
global $wp_widget_factory;
|
||||
// to avoid unwanted warnings let's check before using widget
|
||||
if ( is_object( $wp_widget_factory ) && isset( $wp_widget_factory->widgets, $wp_widget_factory->widgets[ $type ] ) ) {
|
||||
ob_start();
|
||||
the_widget( $type, $atts, $args );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $number
|
||||
* @var $show_date
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Wp_Posts
|
||||
*/
|
||||
$title = $number = $show_date = $el_class = $el_id = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="vc_wp_posts wpb_content_element' . esc_attr( $el_class ) . '">';
|
||||
$type = 'WP_Widget_Recent_Posts';
|
||||
$args = array();
|
||||
global $wp_widget_factory;
|
||||
// to avoid unwanted warnings let's check before using widget
|
||||
if ( is_object( $wp_widget_factory ) && isset( $wp_widget_factory->widgets, $wp_widget_factory->widgets[ $type ] ) ) {
|
||||
ob_start();
|
||||
the_widget( $type, $atts, $args );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $number
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Wp_Recentcomments
|
||||
*/
|
||||
$title = $number = $el_class = $el_id = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="vc_wp_recentcomments wpb_content_element' . esc_attr( $el_class ) . '">';
|
||||
$type = 'WP_Widget_Recent_Comments';
|
||||
$args = array();
|
||||
global $wp_widget_factory;
|
||||
// to avoid unwanted warnings let's check before using widget
|
||||
if ( is_object( $wp_widget_factory ) && isset( $wp_widget_factory->widgets, $wp_widget_factory->widgets[ $type ] ) ) {
|
||||
ob_start();
|
||||
the_widget( $type, $atts, $args );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $url
|
||||
* @var $items
|
||||
* @var $options
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Wp_Rss
|
||||
*/
|
||||
$title = $url = $items = $options = $el_class = $el_id = '';
|
||||
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
$atts['url'] = html_entity_decode( $atts['url'], ENT_QUOTES ); // fix #2034
|
||||
extract( $atts );
|
||||
|
||||
if ( '' === $url ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$options = explode( ',', $options );
|
||||
if ( in_array( 'show_summary', $options ) ) {
|
||||
$atts['show_summary'] = true;
|
||||
}
|
||||
if ( in_array( 'show_author', $options ) ) {
|
||||
$atts['show_author'] = true;
|
||||
}
|
||||
if ( in_array( 'show_date', $options ) ) {
|
||||
$atts['show_date'] = true;
|
||||
}
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="vc_wp_rss wpb_content_element' . esc_attr( $el_class ) . '">';
|
||||
$type = 'WP_Widget_RSS';
|
||||
$args = array();
|
||||
global $wp_widget_factory;
|
||||
// to avoid unwanted warnings let's check before using widget
|
||||
if ( is_object( $wp_widget_factory ) && isset( $wp_widget_factory->widgets, $wp_widget_factory->widgets[ $type ] ) ) {
|
||||
ob_start();
|
||||
the_widget( $type, $atts, $args );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Wp_Search
|
||||
*/
|
||||
$title = $el_class = $el_id = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="vc_wp_search wpb_content_element' . esc_attr( $el_class ) . '">';
|
||||
$type = 'WP_Widget_Search';
|
||||
$args = array();
|
||||
global $wp_widget_factory;
|
||||
// to avoid unwanted warnings let's check before using widget
|
||||
if ( is_object( $wp_widget_factory ) && isset( $wp_widget_factory->widgets, $wp_widget_factory->widgets[ $type ] ) ) {
|
||||
ob_start();
|
||||
the_widget( $type, $atts, $args );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $taxonomy
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Wp_Tagcloud
|
||||
*/
|
||||
$title = $taxonomy = $el_class = $el_id = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="vc_wp_tagcloud wpb_content_element' . esc_attr( $el_class ) . '">';
|
||||
$type = 'WP_Widget_Tag_Cloud';
|
||||
$args = array();
|
||||
global $wp_widget_factory;
|
||||
// to avoid unwanted warnings let's check before using widget
|
||||
if ( is_object( $wp_widget_factory ) && isset( $wp_widget_factory->widgets, $wp_widget_factory->widgets[ $type ] ) ) {
|
||||
ob_start();
|
||||
the_widget( $type, $atts, $args );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var $this WPBakeryShortCode_VC_Wp_Text
|
||||
*/
|
||||
$el_class = $el_id = '';
|
||||
$output = '';
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
$atts['filter'] = true; //Hack to make sure that <p> added
|
||||
extract( $atts );
|
||||
|
||||
$el_class = $this->getExtraClass( $el_class );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $el_id ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
|
||||
}
|
||||
$output = '<div ' . implode( ' ', $wrapper_attributes ) . ' class="vc_wp_text wpb_content_element' . esc_attr( $el_class ) . '">';
|
||||
$type = 'WP_Widget_Text';
|
||||
$args = array();
|
||||
$content = apply_filters( 'vc_wp_text_widget_shortcode', $content );
|
||||
if ( strlen( $content ) > 0 ) {
|
||||
$atts['text'] = $content;
|
||||
}
|
||||
global $wp_widget_factory;
|
||||
// to avoid unwanted warnings let's check before using widget
|
||||
if ( is_object( $wp_widget_factory ) && isset( $wp_widget_factory->widgets, $wp_widget_factory->widgets[ $type ] ) ) {
|
||||
ob_start();
|
||||
the_widget( $type, $atts, $args );
|
||||
$output .= ob_get_clean();
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/** @var array $atts */
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
|
||||
$class_to_filter = 'vc-zigzag-wrapper';
|
||||
$class_to_filter .= vc_shortcode_custom_css_class( $atts['css'], ' ' ) . $this->getExtraClass( $atts['el_class'] ) . $this->getCSSAnimation( $atts['css_animation'] );
|
||||
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
|
||||
$wrapper_attributes = array();
|
||||
if ( ! empty( $atts['align'] ) ) {
|
||||
$class_to_filter .= ' vc-zigzag-align-' . esc_attr( $atts['align'] );
|
||||
}
|
||||
if ( ! empty( $atts['el_id'] ) ) {
|
||||
$wrapper_attributes[] = 'id="' . esc_attr( $atts['el_id'] ) . '"';
|
||||
}
|
||||
|
||||
$color = '';
|
||||
if ( 'custom' !== $atts['color'] ) {
|
||||
$color = vc_convert_vc_color( $atts['color'] );
|
||||
} else {
|
||||
$color = esc_attr( $atts['custom_color'] );
|
||||
}
|
||||
$width = '100%';
|
||||
if ( ! empty( $atts['el_width'] ) ) {
|
||||
$width = esc_attr( $atts['el_width'] ) . '%';
|
||||
}
|
||||
$border_width = '10';
|
||||
if ( ! empty( $atts['el_border_width'] ) ) {
|
||||
$border_width = esc_attr( $atts['el_border_width'] );
|
||||
}
|
||||
$minheight = 2 + intval( $border_width );
|
||||
$svg = '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="' . ( intval( $border_width ) + 2 ) . 'px' . '" height="' . intval( $border_width ) . 'px' . '" viewBox="0 0 18 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon id="Combined-Shape" fill="' . esc_attr( $color ) . '" points="8.98762301 0 0 9.12771969 0 14.519983 9 5.40479869 18 14.519983 18 9.12771969"></polygon></svg>';
|
||||
|
||||
?>
|
||||
<div class="<?php echo esc_attr( $class_to_filter ); ?>" <?php echo implode( ' ', $wrapper_attributes ); ?>>
|
||||
<div class="vc-zigzag-inner"
|
||||
style="<?php echo esc_attr( 'width: ' . esc_attr( $width ) . ';min-height: ' . $minheight . 'px;background: 0 repeat-x url(\'data:image/svg+xml;utf-8,' . rawurlencode( $svg ) . '\');' ); ?>">
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user