first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1 @@
<?php

View File

@@ -0,0 +1,38 @@
<?php
/**
* kc_accordion shortcode
**/
$css = $title = '';
extract( $atts );
$output = '';
$element_attributes = array();
$css_classes = apply_filters('kc-el-class', $atts);
$css_classes[] = 'kc_accordion_wrapper';
if (isset($class))
array_push($css_classes, $class);
if (isset($atts['open_all']) && $atts['open_all'] == 'yes')
$element_attributes[] = 'data-allowopenall="true"';
if (isset($atts['close_all']) && $atts['close_all'] == 'yes')
$element_attributes[] = 'data-closeall="true"';
$css_class = implode(' ', $css_classes);
$element_attributes[] = 'class="' . esc_attr( trim( $css_class ) ) . '"';
?>
<div <?php echo implode( ' ', $element_attributes ) ;?>>
<?php
if( !empty($title) ):
?>
<h3 class="kc-accordion-title"><?php echo esc_html($title);?></h3>
<?php
endif;
echo do_shortcode( str_replace( 'kc_accordion#', 'kc_accordion', $content ) );
?>
</div>

View File

@@ -0,0 +1,32 @@
<?php
/**
* kc_accordion_tab shortcode
**/
$css_class = apply_filters( 'kc-el-class', $atts );
$css_class[] = 'kc_accordion_section';
$css_class[] = 'group';
$title = 'Title';
if( isset( $atts['title'] ) )
$title = $atts['title'];
if( isset( $atts['icon'] ) )
$title = '<i class="'.esc_attr( $atts['icon'] ).'"></i> '.$title;
if( isset( $atts['class'] ) )
array_push( $css_class, $atts['class'] );
$output = '<div class="'.esc_attr( implode(' ',$css_class) ).'"><h3 class="kc_accordion_header ui-accordion-header">'.
'<span class="ui-accordion-header-icon ui-icon"></span>'.
'<a href="#' . sanitize_title( $title ) . '" data-prevent="scroll">' . $title . '</a>'.
'</h3>'.
'<div class="kc_accordion_content ui-accordion-content kc_clearfix">'.
'<div class="kc-panel-body">'.
( ( '' === trim( $content ) )
? __( 'Empty section. Edit page to add content here.', 'kingcomposer' )
: do_shortcode( str_replace('kc_accordion_tab#', 'kc_accordion_tab', $content ) ) ).
'</div>'.
'</div>'.
'</div>';
echo $output;

View File

@@ -0,0 +1,490 @@
<?php
$items = $number_item = $words = $show_date = $custom_class = $data_owl = $image_size = $force_image = $socials = $post_type = $image_align = '';
$layout = $i = 1;
$size_array = array('full', 'medium', 'large', 'thumbnail');
$show_readmore = true;
$readmore_text = __('Read more', 'kingcomposer');
extract( $atts );
if( $image_align == '')
$image_align = 'both';
$post_taxonomy_data = explode( ',', $tax_term );
$taxonomy_term = array();
$post_type = 'post';
if( isset($post_taxonomy_data) ){
$post_taxonomy_tmp = explode( ':', $post_taxonomy_data[0] );
if( count($post_taxonomy_tmp) > 1 || !isset($post_taxonomy_tmp[1]))
$post_type = $post_taxonomy_tmp[0];
if( $post_type == 'post'){
$atts['post_type'] = 'post';
$atts['taxonomy'] = 'category';
$atts['amount'] = $atts['items'];
$atts['tax_term'] = str_replace( array('post:','post'), array('',''), $tax_term);
$list_posts = kc_tools::get_posts( $atts );
}else{
foreach( $post_taxonomy_data as $post_taxonomy ){
$post_taxonomy_tmp = explode( ':', $post_taxonomy );
if( isset($post_taxonomy_tmp[1]) ){
$taxonomy_term[] = $post_taxonomy_tmp[1];
}
}
$taxonomy_objects = get_object_taxonomies( $post_type, 'objects' );
$taxonomy = key( $taxonomy_objects );
if( $atts['items'] == 0 ){
$atts['items'] = -1;
}
$args = array(
'post_type' => $post_type,
'posts_per_page' => $atts['items'],
'order' => $atts['order'],
);
if( count($taxonomy_term) )
{
$tax_query = array(
'relation' => 'OR'
);
foreach( $taxonomy_term as $term ){
$tax_query[] = array(
'taxonomy' => $taxonomy,
'field' => 'slug',
'terms' => $term,
);
}
$args['tax_query'] = $tax_query;
}
$the_query = new WP_Query( $args );
$list_posts = $the_query->posts;
}
}
$css_class = apply_filters( 'kc-el-class', $atts );
//fix from version 2.6.10
if( !isset( $atts['show_author'] )) $atts['show_author'] = 'yes';
if( !isset( $atts['show_category'] )) $atts['show_category'] = 'yes';
$meta_data = ($atts['show_date'] == 'yes' || $atts['show_author'] == 'yes' || $atts['show_category'] == 'yes')? 'yes' : 'no';
$css_class[] = 'kc-blog-posts kc-blog-posts-' . $layout;
if ( !empty( $custom_class ) )
$css_class[] = $custom_class;
switch ( $layout ) {
case '1':
$css_class[] = 'owl-carousel';
$data_owl = ' data-owl-options=\'{"autoplay": "yes", "pagination": "yes", "items": "1", "tablet":1, "mobile":1}\'';
break;
case '3':
$css_class[] = 'kc-blog-grid kc_blog_masonry';
break;
case '4':
$css_class[] = 'owl-carousel';
$data_owl = ' data-owl-options=\'{"autoplay": "yes", "pagination": "yes", "items": "3", "tablet":3, "mobile":1}\'';
break;
default:
break;
}
$css_class[] = 'kc-image-align-' . $image_align;
?>
<div class="<?php echo esc_attr( implode( ' ', $css_class ) ) ;?>"<?php echo $data_owl; ?>>
<?php if( count( $list_posts ) ): ?>
<?php switch ( $layout ) {
case '2':
$i = 0;
foreach ( $list_posts as $item ) :
$img_url = '';
//$item->post_content = $item->post_content;
if ( has_post_thumbnail( $item->ID ) ) {
$image_id = get_post_thumbnail_id( $item->ID );
$image_size = ! empty( $image_size ) ? $image_size : '543x304xct';
if ( in_array( $image_size, $size_array ) ) {
$image_data = wp_get_attachment_image_src( $image_id, $image_size );
$img_url = $image_data[0];
} else {
$image_full_width = wp_get_attachment_image_src( $image_id, 'full' );
$img_url = kc_tools::createImageSize( $image_full_width[0], $image_size );
}
}else{
if( $force_image == 'yes'){
$img = kc_first_image( $item->post_content );
if( $img != false ) $img_url = $img;
}
}
if($image_align == 'left')
$i=1;
?>
<div class="kc-list-item-2">
<?php if ( $i % 2 == 1 ): ?>
<?php if ( ! empty( $img_url ) ) : ?>
<div class="post-item-left">
<figure>
<img src="<?php echo esc_url( $img_url ); ?>"
alt="<?php echo strip_tags(get_the_title( $item )); ?>">
</figure>
</div>
<?php endif; ?>
<div class="post-item-right">
<div class="post_details">
<h2 class="post-title-alt"><a
href="<?php echo esc_url( get_permalink( $item->ID ) ); ?>"
title="<?php echo strip_tags(get_the_title( $item )); ?>"><?php echo get_the_title( $item ); ?></a>
</h2>
<?php if ( $meta_data == 'yes'): ?>
<div class="post-meta">
<?php if( $atts['show_author'] == 'yes' ): ?>
<span class="kc-post-author"><i class="fa fa-user"></i> <a
href="<?php echo get_author_posts_url( $item->post_author ); ?>"
title="<?php esc_html_e( 'Posts by ', 'kingcomposer' );
echo get_the_author_meta( 'display_name', $item->post_author ); ?>"
rel="author"><?php echo get_the_author_meta( 'display_name', $item->post_author ); ?></a></span>
<?php endif;?>
<?php if( $atts['show_date'] == 'yes' ): ?>
<span class="post-date"><i class="fa fa-clock-o"></i> <a
href="<?php echo get_month_link( get_the_time( 'Y', $item->ID ), get_the_time( 'm', $item->ID ) ); ?>"><?php echo get_the_date( 'F j Y', $item->ID ); ?></a> </span>
<?php endif;?>
<?php if( $atts['show_category'] == 'yes' ): ?>
<?php if ( get_the_category( $item->ID ) ): ?>
<span class="post-cats"><i class="fa fa-folder-o"
aria-hidden="true"></i> <?php the_category( ', ', '', $item->ID ); ?></span>
<?php endif;?>
<?php endif ?>
</div>
<?php endif ?>
</div>
<?php if ( $words > 0 ): ?>
<p><?php echo wp_trim_words( $item->post_content, $words ); ?></p>
<?php endif;
if($show_readmore):
?>
<a href="<?php echo esc_url( get_permalink( $item->ID ) ); ?>"
class="kc-post-2-button"><?php esc_html_e( $readmore_text, 'kingcomposer' ); ?> <i
class="fa fa-angle-right" aria-hidden="true"></i></a>
<?php endif;?>
</div>
<?php else: ?>
<div class="post-item-left">
<div class="post_details">
<h2 class="post-title-alt"><a
href="<?php echo esc_url( get_permalink( $item->ID ) ); ?>"
title="<?php echo strip_tags(get_the_title( $item )); ?>"><?php echo get_the_title( $item ); ?></a>
</h2>
<?php if ( $meta_data == 'yes'): ?>
<div class="post-meta">
<?php if ( $show_author == 'yes' ): ?>
<span class="kc-post-author"><i class="fa fa-user"></i> <a
href="<?php echo get_author_posts_url( $item->post_author ); ?>"
title="<?php esc_html_e( 'Posts by ', 'kingcomposer' );
echo get_the_author_meta( 'display_name', $item->post_author ); ?>"
rel="author"><?php echo get_the_author_meta( 'display_name', $item->post_author ); ?></a></span>
<?php endif;?>
<?php if ( $show_date == 'yes' ): ?>
<span class="post-date"><i class="fa fa-clock-o"></i> <a
href="<?php echo get_month_link( get_the_time( 'Y', $item->ID ), get_the_time( 'm', $item->ID ) ); ?>"><?php echo get_the_date( 'F j Y', $item->ID ); ?></a> </span>
<?php endif;?>
<?php if ( $show_category == 'yes' ): ?>
<?php if ( get_the_category( $item->ID ) ): ?>
<span class="post-cats"><i class="fa fa-folder-o"
aria-hidden="true"></i> <?php the_category( ', ', '', $item->ID ); ?></span>
<?php endif ?>
<?php endif ?>
</div>
<?php endif ?>
</div>
<?php if ( $words > 0 ): ?>
<p><?php echo wp_trim_words( $item->post_content, $words ); ?></p>
<?php endif;
if($show_readmore):
?>
<a href="<?php echo esc_url( get_permalink( $item->ID ) ); ?>"
class="kc-post-2-button"><?php esc_html_e( $readmore_text, 'kingcomposer' ); ?> <i
class="fa fa-angle-right" aria-hidden="true"></i></a>
<?php endif;?>
</div>
<div class="post-item-right">
<figure>
<img src="<?php echo esc_url( $img_url ); ?>"
alt="<?php echo strip_tags(get_the_title( $item )); ?>">
</figure>
</div>
<?php endif ?>
</div>
<?php
if($image_align == 'both')
$i ++;
endforeach;
break;
case '3':
kc_js_callback( 'kc_front.blog.masonry' );
foreach ( $list_posts as $post ):
//if edit by KC just run filter to set true content
$meta = get_post_meta($post->ID, 'kc_data', true);
if (isset($meta['mode']) && $meta['mode'] == 'kc')
$post_content = $post->post_content = apply_filters('the_content', $post->post_content );
else
$post_content = $post->post_content;
$img_url = '';
if ( has_post_thumbnail( $post->ID ) ) {
$image_id = get_post_thumbnail_id( $post->ID );
$image_size = ! empty( $image_size ) ? $image_size : 'full';
if ( in_array( $image_size, $size_array ) ) {
$image_data = wp_get_attachment_image_src( $image_id, $image_size );
$img_url = $image_data[0];
} else {
$image_full_width = wp_get_attachment_image_src( $image_id, 'full' );
$image_full = $image_full_width[0];
$img_url = kc_tools::createImageSize( $image_full, $image_size );
}
}else{
if( $force_image == 'yes'){
$img = kc_first_image( $post->post_content );
if( $img != false ) $img_url = $img;
}
}
?>
<div class="post-grid grid-<?php echo $number_item; ?>">
<div class="kc-list-item-3">
<?php if ( ! empty( $img_url ) ) : ?>
<a href="<?php echo esc_url( get_permalink( $post->ID ) ); ?>" class="entry-thumb-link">
<div class="entry-thumb-wrapper">
<img src="<?php echo esc_url( $img_url ); ?>"
alt="<?php echo strip_tags(get_the_title( $post )); ?>"/>
<div class="entry-thumb-overlay"></div>
</div>
</a>
<?php endif; ?>
<div class="content">
<h2 class="post-title-alt"><a
href="<?php echo esc_url( get_permalink( $post->ID ) ); ?>"><?php echo get_the_title( $post ); ?></a>
</h2>
<?php if ( $meta_data == 'yes'): ?>
<div class="entry-meta">
<?php if ( $show_author == 'yes' ): ?>
<span class="kc-post-author"><a
href="<?php echo get_author_posts_url( $post->post_author ); ?>"
title="<?php esc_html_e( 'Posts by ', 'kingcomposer' );
echo get_the_author_meta( 'display_name', $post->post_author ); ?>"
rel="author"><?php echo get_the_author_meta( 'display_name', $post->post_author ); ?></a></span>
<?php endif;?>
<?php if ( $show_date == 'yes' ): ?>
<span class="entry-date"><a
href="<?php echo esc_url( get_permalink( $post->ID ) ); ?>"><?php echo get_the_date( 'F d, Y', $post->ID ); ?></a></span>
<?php endif;?>
<?php if ( $show_category == 'yes' ): ?>
<?php if ( get_the_category( $post->ID ) ): ?>
<span class="entry-cats"><?php the_category( ', ', '', $post->ID ); ?></span>
<?php endif ?>
<?php endif ?>
</div>
<?php endif ?>
<?php if ( $words > 0 ): ?>
<div class="entry-excerpt">
<p><?php echo wp_trim_words( $post_content, $words ); ?></p>
</div>
<?php endif;
if($show_readmore):
?>
<a href="<?php echo esc_url( get_permalink( $post->ID ) ); ?>"
class="kc-post-2-button"><?php esc_html_e( $readmore_text, 'kingcomposer' ); ?> <i
class="fa fa-angle-right" aria-hidden="true"></i></a>
<?php endif;?>
</div>
</div>
</div>
<?php
endforeach;
break;
case '4':
foreach ( $list_posts as $item ) :
//if edit by KC just run filter to set true content
$meta = get_post_meta($item->ID, 'kc_data', true);
if (isset($mode['mode']) && $meta['mode'] == 'kc')
$item->post_content = apply_filters('the_content', $item->post_content );
else
$item->post_content = $item->post_content;
$img_url = '';
if ( has_post_thumbnail( $item->ID ) ) {
$image_id = get_post_thumbnail_id( $item->ID );
$image_size = ! empty( $image_size ) ? $image_size : '500x500xct';
if ( in_array( $image_size, $size_array ) ) {
$image_data = wp_get_attachment_image_src( $image_id, $image_size );
$img_url = $image_data[0];
} else {
$image_full_width = wp_get_attachment_image_src( $image_id, 'full' );
$img_url = kc_tools::createImageSize( $image_full_width[0], $image_size );
}
}else{
if( $force_image == 'yes'){
$img = kc_first_image( $item->post_content );
if( $img != false ) $img_url = $img;
}
}
?>
<div class="item">
<div class="kc-list-item-4">
<div class="kc-post-header">
<?php if ( ! empty( $img_url ) ): ?>
<a href="<?php echo esc_url( get_permalink( $item->ID ) ); ?>">
<img src="<?php echo esc_url( $img_url ); ?>" alt="<?php echo strip_tags(get_the_title( $item )); ?>">
</a>
<?php endif; ?>
<div class="meta-title">
<?php if ( $meta_data == 'yes' ): ?>
<div class="post-meta">
<?php if ( $show_category == 'yes' ): ?>
<?php if ( get_the_category( $item->ID ) ): ?>
<?php the_category( ', ', '', $item->ID ); ?>
<?php endif ?>
<?php endif ?>
<?php if ( $show_date == 'yes' ): ?>
<a href="<?php echo get_month_link( get_the_time( 'Y', $item->ID ), get_the_time( 'm', $item->ID ) ); ?>"
class="date-link"><?php echo get_the_date( 'd.F.Y', $item->ID ); ?></a>
<?php endif ?>
</div>
<?php endif ?>
<h2 class="post-title-alt">
<a href="<?php echo esc_url( get_permalink( $item->ID ) ); ?>" class="post-title-link"
title="<?php echo strip_tags(get_the_title( $item )); ?>"><?php echo get_the_title( $item ); ?></a>
</h2>
</div>
</div>
</div>
</div>
<?php
endforeach;
break;
default:
foreach( $list_posts as $item ) :
$item->post_content = apply_filters('the_content', $item->post_content );
$img_url = '';
if( has_post_thumbnail( $item->ID ) ){
$image_id = get_post_thumbnail_id( $item->ID );
$image_size = !empty( $image_size ) ? $image_size : '1140x550xct';
if( in_array( $image_size, $size_array ) ){
$image_data = wp_get_attachment_image_src( $image_id, $image_size );
$img_url = $image_data[0];
}else{
$image_full_width = wp_get_attachment_image_src( $image_id, 'full' );
$img_url = kc_tools::createImageSize( $image_full_width[0], $image_size );
}
}else{
if( $force_image == 'yes'){
$img = kc_first_image( $item->post_content );
if( $img != false ) $img_url = $img;
}
}
?>
<div class="item kc-list-item-1">
<figure>
<?php if( !empty( $img_url ) ):?>
<img src="<?php echo esc_url( $img_url ); ?>" alt="">
<?php endif;?>
</figure>
<div class="post-details">
<h2 class="post-title-alt">
<a href="<?php echo esc_url( get_permalink( $item->ID ) ); ?>" title="<?php echo strip_tags(get_the_title( $item )); ?>"><?php echo get_the_title( $item ); ?></a>
</h2>
<?php if ( $meta_data == 'yes' ): ?>
<div class="post-date">
<?php if ( $show_author == 'yes' ): ?>
<span class="kc-post-author"><?php esc_html_e( 'by', 'kingcomposer' ); ?> <a href="<?php echo get_author_posts_url( $item->post_author ); ?>" title="<?php esc_html_e( 'Posts by ', 'kingcomposer' ); echo get_the_author_meta( 'display_name', $item->post_author ); ?>" rel="author"><?php echo get_the_author_meta( 'display_name', $item->post_author ); ?></a></span>
<?php endif;?>
<?php if ( $show_date == 'yes' ): ?>
<?php echo get_the_date( 'F j Y', $item->ID ); ?>
<?php endif ?>
<?php if ( $show_category == 'yes' ): ?>
<?php if ( get_the_category( $item->ID ) ): ?>
<span class="post-cats"><?php the_category( ', ', '', $item->ID ); ?></span>
<?php endif ?>
<?php endif ?>
</div>
<?php endif ?>
<?php
if($show_readmore):
?>
<a href="<?php echo esc_url( get_permalink( $item->ID ) ); ?>"
class="kc-post-2-button"><?php esc_html_e( $readmore_text, 'kingcomposer' ); ?> <i
class="fa fa-angle-right" aria-hidden="true"></i></a>
<?php endif;?>
</div>
</div>
<?php
endforeach;
break;
} ?>
<?php else: ?>
<h3><?php echo __( 'Blog Post: Nothing not found.', 'kingcomposer' ); ?></h3>
<?php endif ?>
</div>
<?php
wp_reset_postdata();
?>

View File

@@ -0,0 +1,29 @@
<?php
$custom_class = $css = '';
$el_classes = apply_filters( 'kc-el-class', $atts );
extract($atts);
$element_attributes = array();
$el_classes[] = 'kc_box_wrap';
$el_classes[] = $custom_class;
if ($css != '')
$el_classes[] = $css;
$element_attributes[] = 'class="'. esc_attr(implode(' ', $el_classes)) .'"';
echo '<div '. implode(' ', $element_attributes ) .'>';
$data = kc_images_filter(base64_decode($atts['data']));
if( $data = json_decode( $data ) )
{
echo kc_loop_box( $data );
}
else
{
echo 'KC Box: Error content structure';
}
echo '</div>';

View File

@@ -0,0 +1,27 @@
<?php
$title = $icon = $show_button = $class = '';
extract( $atts );
$custom_style = '';
$wrap_class = apply_filters( 'kc-el-class', $atts );
if ( !empty( $class ) )
$wrap_class[] = $class;
?>
<div class="message-boxes <?php echo esc_attr( implode(' ', $wrap_class) ); ?>">
<div class="message-box-wrap">
<?php
if ( !empty( $icon ) ) {
echo '<i class="'. $icon .'"></i>';
}
if ( $show_button == 'yes' ) {
echo '<button class="kc-close-but">'. esc_html__( 'close', 'kingcomposer' ) .'</button>';
}
echo $title;
?>
</div>
</div>

View File

@@ -0,0 +1,64 @@
<?php
$text_title = $textbutton = $show_icon = $icon = $icon_position = $ex_class = $wrap_class = '';
$icon_position = 'right';
$wrapper_class = apply_filters( 'kc-el-class', $atts );
$button_attr = array();
extract( $atts );
$link = ( '||' === $link ) ? '' : $link;
$link = kc_parse_link($link);
if ( strlen( $link['url'] ) > 0 ) {
$a_href = $link['url'];
$a_title = $link['title'];
$a_target = strlen( $link['target'] ) > 0 ? $link['target'] : '_self';
}
if( !isset( $a_href ) )
$a_href = "#";
if ( !empty( $wrap_class ) )
$wrapper_class[] = $wrap_class;
$el_class = array( 'kc_button');
if ( !empty( $ex_class ) )
$el_class[] = $ex_class;
if( isset( $el_class ) )
$button_attr[] = 'class="'. esc_attr( implode(' ', $el_class ) ) .'"';
if( isset( $a_href ) )
$button_attr[] = 'href="'. esc_attr($a_href) .'"';
if( isset( $a_target ) )
$button_attr[] = 'target="'. esc_attr($a_target) .'"';
if( isset( $a_title ) )
$button_attr[] = 'title="'. esc_attr($a_title) .'"';
if( isset( $onclick ) )
$button_attr[] = 'onclick="'. $onclick .'"';
?>
<div class="<?php echo implode( " ", $wrapper_class ); ?>">
<a <?php echo implode(' ', $button_attr); ?>>
<?php
if ( $show_icon == 'yes' ) {
if ( $icon_position == 'left' ) {
echo '<i class="'. esc_attr( $icon ).'"></i> '. esc_html( $text_title ) ;
} else {
echo esc_html( $text_title ) . ' <i class="'. esc_attr( $icon ) .'"></i>';
}
} else {
if ( !empty( $text_title ) )
echo esc_html( $text_title );
}
?>
</a>
</div>

View File

@@ -0,0 +1,77 @@
<?php
$title = $desc = $button_show = $button_text = $button_link = $link_url = $link_title = $link_target = $icon_show = $icon = $custom_class = $data_text = $data_button = '';
$layout = 2;
$main_class = apply_filters( 'kc-el-class', $atts );
extract( $atts );
$main_class[] = 'kc-call-to-action';
$main_class[] = 'kc-cta-' . $layout;
if ( $button_show == 'yes' )
$main_class[] = 'kc-is-button';
if ( !empty( $custom_class ) )
$main_class[] = $custom_class;
if ( !empty( $title ) || !empty( $desc ) ) {
$data_text .= '<div class="kc-cta-desc">';
if ( !empty( $title ) ) {
$data_text .= '<h2>'. $title .'</h2>';
}
if ( !empty( $desc ) ) {
$data_text .= '<div class="kc-cta-text">'. $desc .'</div>';
}
$data_text .= '</div>';
}
if ( $button_show == 'yes' && !empty( $button_text ) ) {
if ( !empty( $button_link ) ) {
$link_arr = explode( "|", $button_link );
if ( !empty( $link_arr[0] ) ) {
$link_url = $link_arr[0];
} else {
$link_url = '#';
}
if ( !empty( $link_arr[1] ) )
$link_title = $link_arr[1];
if ( !empty( $link_arr[2] ) )
$link_target = $link_arr[2];
} else {
$link_url = '#';
}
if ( $icon_show == 'yes' ) {
$button_text .= ' <span class="kc-cta-icon"><i class="'. $icon .'"></i></span>';
}
$button_attr = array();
$button_attr[] = 'href="'. esc_url( $link_url ) .'"';
if ( !empty( $link_title ) )
$button_attr[] = 'title="'. esc_attr( $link_title ) .'"';
if ( !empty( $link_target ) )
$button_attr[] = 'target="'. esc_attr( $link_target ) .'"';
$data_button .= '<div class="kc-cta-button">';
$data_button .= '<a '. implode( ' ', $button_attr ) .'>'. $button_text .'</a>';
$data_button .= '</div>';
}
?>
<div class="<?php echo implode( " ", $main_class ); ?>">
<?php
echo $data_text;
echo $data_button;
?>
</div>

View File

@@ -0,0 +1,158 @@
<?php
$output = $thumb_data = $speed = $items_tablet = $mobile = '';
$img_size = 'full';
$onclick = 'none';
$wrp_class = apply_filters( 'kc-el-class', $atts );
extract( $atts );
$items_number = ( !empty( $items_number ) ) ? $items_number : 4;
$tablet = ( !empty( $tablet ) ) ? $tablet : 2;
$mobile = ( !empty( $mobile ) ) ? $mobile : 1;
if( !empty( $images ) )
$images = explode( ',', $images );
if ( is_array( $images ) && !empty( $images ) ) {
foreach( $images as $image_id ){
$attachment_data[] = wp_get_attachment_image_src( $image_id, $img_size );
$attachment_data_full[] = wp_get_attachment_image_src( $image_id, 'full' );
}
}else{
echo '<div class="kc-carousel_images align-center" style="border:1px dashed #ccc;"><br /><h3>Carousel Images: '.__( 'No images upload', 'kingcomposer' ).'</h3></div>';
return;
}
$element_attribute = array();
$el_classes = array(
'kc-carousel-images',
'owl-carousel-images',
'kc-sync1',
$wrap_class
);
if( isset($atts['nav_style']) && $nav_style !='' ){
$el_classes[] = 'owl-nav-' . $nav_style;
}
$owl_option = array(
'items' => $items_number,
'tablet' => $tablet,
'mobile' => $mobile,
'speed' => $speed,
'navigation' => $navigation,
'pagination' => $pagination,
'autoheight' => $auto_height,
'progressbar' => $progress_bar,
'delay' => $delay,
'autoplay' => $auto_play,
'showthumb' => $show_thumb,
'num_thumb' => $num_thumb,
);
$owl_option = json_encode( $owl_option );
$element_attribute[] = 'class="'. esc_attr( implode( ' ', $el_classes ) ) .'"';
$element_attribute[] = "data-owl-i-options='$owl_option'";
if( 'custom_link' === $onclick && !empty( $custom_links ) ){
$custom_links = preg_replace( '/\n$/', '', preg_replace('/^\n/','',preg_replace('/[\r\n]+/',"\n", $custom_links)) );
$custom_links_arr = explode("\n", $custom_links );
}
kc_js_callback( 'kc_front.owl_slider' );
?>
<div class="<?php echo implode( ' ', $wrp_class );?>">
<div class="kc-carousel_images <?php echo implode( ' ', $wrp_class );?>">
<div <?php echo implode( ' ', $element_attribute ); ?>>
<?php
$i = 0;
foreach( $attachment_data as $i => $image ):
$alttext = '';
if( $alt_text == 'yes')
$alttext = get_post_meta( $images[$i], '_wp_attachment_image_alt', true);
?>
<div class="item">
<?php
if( 'none' === $onclick ){
?>
<img src="<?php echo $image[0]; ?>" alt="<?php echo esc_attr( $alttext );?>"/>
<?php
} else {
switch( $onclick ){
case 'lightbox':
echo '<a class="kc-image-link kc-pretty-photo" data-lightbox="kc-lightbox" rel="prettyPhoto['. esc_attr($atts['_id']) .']" href="'. esc_attr( $attachment_data_full[$i][0] ) .'">'
.'<img src="'. esc_attr( $image[0] ) .'" alt="'. $alttext .'" /></a>';
break;
case 'custom_link':
if( isset( $custom_links_arr[$i] ) ){
echo '<a href="'. esc_attr( strip_tags( $custom_links_arr[$i] ) ) .'" target="'. esc_attr( $custom_links_target ) .'">'
.'<img src="'. esc_attr( $image[0] ) .'" alt="'. esc_attr( $alttext ) .'" /></a>';
}else{
echo '<img src="'. esc_attr( $image[0] ) .'" alt="'. esc_attr( $alttext ) .'" />';
}
break;
}
}
?>
</div>
<?php
$i++;
endforeach;
?>
</div>
<?php
if( !empty( $show_thumb ) && 'yes' === $show_thumb ){
?>
<div class="kc-sync2 owl-carousel">
<?php foreach( $attachment_data as $image ): ?>
<div class="item">
<img src="<?php echo $image[0]; ?>" alt="" />
</div>
<?php endforeach; ?>
</div>
<?php
} //end if show thumb
?>
</div>
</div>

View File

@@ -0,0 +1,173 @@
<?php
$output = $title = $wrap_class = $taxonomy = $thumbnail = $show_button = $css = '';
$readmore_text = __('Read more', 'kingcomposer');
$image_size = 'full';
$wrp_el_classes = apply_filters( 'kc-el-class', $atts );
extract($atts);
$orderby = isset( $order_by ) ? $order_by : 'ID';
$order = isset( $order_list ) ? $order_list : 'ASC';
$post_taxonomy_data = explode( ',', $post_taxonomy );
$taxonomy_term = array();
$post_type = 'post';
if( isset($post_taxonomy_data) ){
foreach( $post_taxonomy_data as $post_taxonomy ){
$post_taxonomy_tmp = explode( ':', $post_taxonomy );
$post_type = $post_taxonomy_tmp[0];
if( isset( $post_taxonomy_tmp[1] ) )
$taxonomy_term[] = $post_taxonomy_tmp[1];
}
}
$taxonomy_objects = get_object_taxonomies( $post_type, 'objects' );
$taxonomy = key( $taxonomy_objects );
$args = array(
'post_type' => $post_type,
'posts_per_page' => $number_post,
'orderby' => $orderby,
'order' => $order,
);
if( count( $taxonomy_term ) )
{
$tax_query = array(
'relation' => 'OR'
);
foreach( $taxonomy_term as $term ){
$tax_query[] = array(
'taxonomy' => $taxonomy,
'field' => 'slug',
'terms' => $term,
);
}
$args['tax_query'] = $tax_query;
}
$the_query = new WP_Query( $args );
$element_attribute = array();
$el_classess = array(
'kc-owl-post-carousel',
'owl-carousel',
'list-'. $post_type,
$taxonomy,
$wrap_class
);
if( isset($atts['nav_style']) && $nav_style !='' ){
$el_classess[] = 'owl-nav-' . $nav_style;
}
$owl_option = array(
'items' => $items_number,
'mobile' => $mobile,
'tablet' => $tablet,
'speed' => intval( $speed ),
'navigation' => $navigation,
'pagination' => $pagination,
'autoheight' => $auto_height,
'autoplay' => $auto_play
);
$owl_option = strtolower( json_encode( $owl_option ) );
$element_attribute[] = 'class="'. esc_attr( implode(' ', $el_classess) ) .'"';
$element_attribute[] = "data-owl-options='$owl_option'";
ob_start();
if ( $the_query->have_posts() ) {
global $post;
if( !empty($title) )
echo '<h3 class="list-post-title">'. $title .'</h3>';
echo '<div '. implode(' ', $element_attribute) .'>';
while ( $the_query->have_posts() ) {
$the_query->the_post();
?>
<div class="item list-item post-<?php echo esc_attr( $post->ID ); ?>">
<div class="post-content">
<?php
$post_content = apply_filters('the_content', get_the_content() );
if ( has_post_thumbnail($post->ID) && 'yes' === strtolower($thumbnail) ) {
echo '<div class="image">';
echo get_the_post_thumbnail($post->ID, $image_size);
echo '<h3 class="caption"><a href="'. esc_attr( get_permalink( $post->ID ) ). '">'. get_the_title() .'</a></h3>';
echo '</div>';
}else{
echo '<h3 class="title"><a href="'. esc_attr( get_permalink( $post->ID ) ). '">'. get_the_title() .'</a></h3>';
}
?>
<?php
if ( has_post_format( array( 'chat', 'status' ) ) )
$format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' );
else
$format_prefix = '%2$s';
$date = sprintf( '<span class="date"><time class="entry-date" datetime="%1$s">%2$s</time></span>',
esc_attr( get_the_date( 'c' ) ),
esc_html( sprintf( $format_prefix, get_post_format_string( get_post_format() ), get_the_date() ) )
);
if( !empty( $show_date ) && strtolower( $show_date ) == 'yes' )
echo '<div class="kc-entry_meta">'. $date.'</div>';
?>
<div class="in-post-content"><?php echo wp_trim_words( $post_content, 25, ' ...' ); ?></div>
<?php if( !empty($show_button) && strtolower($show_button) == 'yes' ): ?>
<div class="footer-button">
<a class="kc-read-more" href="<?php echo esc_attr( get_permalink( $post->ID ) ); ?>"><?php echo esc_html( $readmore_text ); ?></a>
</div>
<?php endif; ?>
</div>
</div>
<?php
}
echo '</div>';
} else {
echo __('Carousel Post: No posts found', 'kingcomposer');
}
wp_reset_postdata();
$output = ob_get_clean();
echo '<div class="kc-carousel-post '. esc_attr( implode(' ', $wrp_el_classes) ) .'">'. $output .'</div>';
kc_js_callback( 'kc_front.owl_slider' );

View File

@@ -0,0 +1,58 @@
<?php
$width = $css = $output = $col_class = $col_container_class = $col_id = $css_data = '';
extract( $atts );
$attributes = array();
$style = array();
$classes = apply_filters( 'kc-el-class', $atts );
$classes[] = 'kc_column';
$classes[] = @kc_column_width_class( $width );
if( !empty( $col_class ) )
$classes[] = $col_class;
if( !empty( $col_id ) )
$attributes[] = 'id="'. $col_id .'"';
if( count($style) > 0 )
$attributes[] = 'style="'.implode(';', $style).'"';
$col_container_class = !empty( $col_container_class ) ? $col_container_class.' kc-col-container' : 'kc-col-container';
/**
*Check video background
*/
if( $atts['video_bg'] === 'yes' )
{
$video_bg_url = $atts['video_bg_url'];
$video_mute = $atts['video_mute'];
if( empty($video_bg_url)) $video_bg_url = 'https://www.youtube.com/watch?v=dOWFVKb2JqM';
$has_video_bg = kc_youtube_id_from_url( $video_bg_url );
if( !empty( $has_video_bg ) )
{
$classes[] = 'kc-video-bg';
$attributes[] = 'data-kc-video-bg="' . esc_attr( $video_bg_url ) . '"';
$attributes[] = 'data-kc-video-mute="' . esc_attr( $video_mute ) . '"';
$css_data .= 'position: relative;';
}
}
$attributes[] = 'class="' . esc_attr( trim( implode(' ', $classes) ) ) . '"';
$output = '<div ' . implode( ' ', $attributes ) . '>'
. '<div class="'.esc_attr( $col_container_class ).'">'
. do_shortcode( str_replace('kc_column#', 'kc_column', $content ) )
. '</div>'
. '</div>';
echo $output;

View File

@@ -0,0 +1,33 @@
<?php
$output = $width = $col_in_class = $col_in_class_container = $css = $col_id = '';
$attributes = array();
extract( $atts );
$classes = apply_filters( 'kc-el-class', $atts );
$classes[] = 'kc_column_inner';
$classes[] = @kc_column_width_class( $width );
if( !empty( $col_in_class ) )
$classes[] = $col_in_class;
if( !empty( $css ) )
$classes[] = $css;
$col_in_class_container = !empty($col_in_class_container)?$col_in_class_container.' kc_wrapper kc-col-inner-container':'kc_wrapper kc-col-inner-container';
if( !empty( $col_id ) )
$attributes[] = 'id="'. $col_id .'"';
$attributes[] = 'class="' . esc_attr( trim( implode(' ', $classes) ) ) . '"';
$output .= '<div ' . implode( ' ', $attributes ) . '>'
. '<div class="'.trim( esc_attr( $col_in_class_container ) ).'">'
. do_shortcode( str_replace('kc_column_inner#', 'kc_column_inner', $content ) )
. '</div>'
. '</div>';
echo $output;

View File

@@ -0,0 +1,18 @@
<?php
$class = $css = '';
extract( $atts );
$output = '';
$el_class = apply_filters( 'kc-el-class', $atts );
$el_class[] = 'kc_text_block';
if( $class != '' )$el_class[] = $class;
if( $css != '' )$el_class[] = $css;
$content = apply_filters('kc_column_text', $content );
echo '<div class="'.esc_attr( implode(' ', $el_class) ).'">';
echo wpautop( do_shortcode( $content ) );
echo '</div>';

View File

@@ -0,0 +1,25 @@
<?php
global $wpdb;
$title = $slug = $class = '';
extract( $atts );
$wrp_el_classes = apply_filters( 'kc-el-class', $atts );
if( !empty( $class ) )
$wrp_el_classes[] = $class;
$form = $wpdb->get_results("SELECT `ID` FROM `".$wpdb->posts."` WHERE `post_type` = 'wpcf7_contact_form' AND `post_name` = '".esc_attr(sanitize_title($slug))."' LIMIT 1");
if( !empty( $form ) ){
echo '<div class="kc-contact-form7 '. esc_attr( implode(' ', $wrp_el_classes) ) .'">';
if ( !empty( $title ) ) {
echo '<h2>'. $title .'</h2>';
}
echo do_shortcode('[contact-form-7 id="'.$form[0]->ID.'" title="'.esc_attr($title).'"]');
echo '</div>';
}else{
echo __('Please select one of contact form 7 for display.', 'kingcomposer');
}

View File

@@ -0,0 +1,84 @@
<?php
$output = $template = $custom_css = $css = '';
$timer_style = 1;
$element_attribute = array();
$wrp_class = apply_filters( 'kc-el-class', $atts );
extract($atts);
wp_enqueue_script( 'countdown-timer' );
switch ( $timer_style ) {
case '1':
case '2':
$template = '<span class="countdown-style'. esc_attr( $timer_style ) .'">
<span class="group">
<span class="timer days">%D</span>
<span class="unit">days</span>
</span>
<span class="group">
<span class="timer seconds">%H</span>
<span class="unit">hours</span>
</span>
<span class="group">
<span class="timer seconds">%M</span>
<span class="unit">minutes</span>
</span>
<span class="group">
<span class="timer seconds">%S</span>
<span class="unit">seconds</span>
</span>
</span>';
break;
case '3':
if( !empty( $custom_template ) ){
$template = $custom_template;
}else{
$template = '%D days %H:%M:%S';
}
break;
}
$el_class = array(
'kc-countdown-timer',
$wrap_class,
);
$datetime = (!empty($datetime) && $datetime !== '__empty__')?$datetime:date("D M d Y", strtotime("+1 week"));
$datetime = date("Y/m/d", strtotime($datetime));
$countdown_data = array(
'date' => $datetime,
'template' => trim( preg_replace( '/\s\s+/', ' ', $template ))
);
$element_attribute[] = 'class="'. esc_attr( implode(' ', $el_class ) ) .'"';
$element_attribute[] = 'data-countdown=\''.json_encode($countdown_data).'\'';
?>
<div class="<?php echo implode(' ', $wrp_class );?>">
<?php
if( !empty( $title ) ){
?>
<h3><?php echo esc_attr( $title ) ;?></h3>
<?php
}
?>
<div <?php echo implode(' ', $element_attribute ) ;?>></div>
</div>

View File

@@ -0,0 +1,41 @@
<?php
$_before_number = $_after_number = $icon_show = $wrap_class = '';
$el_classess = apply_filters( 'kc-el-class', $atts );
$atts = kc_remove_empty_code( $atts );
$el_classess[] = 'kc_counter_box';
extract( $atts );
if ( !empty( $wrap_class ) )
$el_classess[] = $wrap_class;
$label = ( !empty($label) ) ? '<h4>'. esc_html( $label ) .'</h4>' : '';
if( $icon_show == 'yes' ) {
$icon = !empty( $icon ) ? $icon : 'fa-leaf';
$icon = ( !empty( $icon ) ) ? '<i class="'. esc_html($icon).' element-icon"></i>' : '';
} else {
$icon = '';
}
if( !empty( $label_above ) && 'yes' === $label_above ){
$_before_number = $icon . $label;
} else {
$_before_number = $icon;
$_after_number = $label;
}
?>
<div class="<?php echo esc_attr( implode( " ", $el_classess ) ) ?>">
<?php echo $_before_number; ?>
<span class="counterup"><?php echo esc_html( $number ); ?></span>
<?php echo $_after_number; ?>
</div>

View File

@@ -0,0 +1,59 @@
<?php
$style = $title = $icon_show = $icon = $icon_txt = $icon_float = $link = $link_url = $link_title = $link_target = $custom_class = '';
$main_class = apply_filters( 'kc-el-class', $atts );
extract( $atts );
$main_class[] = 'kc-pro-button';
$main_class[] = 'kc-button-' . $style;
if ( !empty( $custom_class ) ) {
$main_class[] = $custom_class;
}
if ( !empty( $link ) ) {
$link_arr = explode( "|", $link );
if ( !empty( $link_arr[0] ) ) {
$link_url = $link_arr[0];
} else {
$link_url = '#';
}
if ( !empty( $link_arr[1] ) )
$link_title = $link_arr[1];
if ( !empty( $link_arr[2] ) )
$link_target = $link_arr[2];
} else {
$link_url = '#';
}
$button_attr = array();
$button_attr[] = 'href="'. esc_url( $link_url ) .'"';
if ( !empty( $link_title ) )
$button_attr[] = 'title="'. esc_attr( $link_title ) .'"';
if ( !empty( $link_target ) )
$button_attr[] = 'target="'. esc_attr( $link_target ) .'"';
if ( $icon_show == 'yes' ) {
$icon_txt = ' <i class="'. $icon .'"></i> ';
}
?>
<div class="<?php echo esc_attr( implode( " ", $main_class ) ); ?>">
<a <?php echo implode( ' ', $button_attr ); ?>>
<?php
if ( $icon_show == 'yes' && $icon_float == 'before' )
echo '<span class="creative_icon creative_icon_left">'. $icon_txt .' </span>';
echo '<span class="creative_title">'. esc_html( $title ) .'</span>';
if ( $icon_show == 'yes' && $icon_float == 'after' )
echo ' <span class="creative_icon creative_icon_right">'. $icon_txt .'</span>';
?>
</a>
</div>

View File

@@ -0,0 +1,32 @@
<?php
$style = $icon = $line_text = $class = '';
extract( $atts );
$wrap_class = apply_filters( 'kc-el-class', $atts );
$wrap_class[] = 'divider_line';
if( $class != '')
$wrap_class[] = $class;
?>
<div class="<?php echo esc_attr( implode(' ', $wrap_class ) );?>">
<div class="divider_inner <?php echo 'divider_line' . $style;?>">
<?php
switch ( $style ) {
case '2':
if ( !empty( $icon ) )
echo '<i class="'.esc_attr( $icon ).'"></i>';
break;
case '3':
if ( !empty( $line_text ) )
echo '<span class="line_text">'.$line_text.'</span>';
break;
default:
# code...
break;
}
?>
</div>
</div>

View File

@@ -0,0 +1,28 @@
<?php
$desc = $custom_class = '';
$wrap_class = apply_filters( 'kc-el-class', $atts );
extract( $atts );
$wrap_class[] = 'kc-dropcaps';
if ( !empty( $custom_class ) )
$wrap_class[] = $custom_class;
$check = trim(strip_tags($desc));
if( !empty( $check ) ){
$ch = mb_substr($check, 0,1);
$pos = strpos($desc, $ch);
$str_re = '<span class="dropcaps-text">' . $ch .'</span>';
$desc = substr_replace($desc, $str_re, $pos, $pos+1);
}
else
$desc = __('Dropcap: Text not found', 'kingcomposer');
?>
<div class="<?php echo esc_attr( implode( " ", $wrap_class) ); ?>">
<?php echo $desc; ?>
</div>

View File

@@ -0,0 +1,64 @@
<?php
$output = $wrap_class = '';
extract($atts);
$num_post_show = ( !empty($number_post_show) ) ? $number_post_show : 5;
$btn_text = !empty( $follow_text )? esc_html( $follow_text ) : 'Go to <strong>'. $fb_page_id .'</strong> fan page';
$max_height = !empty( $max_height ) ? intval( $max_height ) : '300';
$el_classes = apply_filters( 'kc-el-class', $atts );
$el_classes = array_merge(
$el_classes,
array(
'kc_shortcode',
'kc_facebook_recent_post',
$wrap_class
)
);
global $kc;
if( isset($atts['fb_app_id']) && !empty($atts['fb_app_id']) )
$atts['fb_app_id'] = $kc->secrect_storage( $atts['fb_app_id'], 'encrypt' );
if( isset($atts['fb_app_secret']) && !empty($atts['fb_app_secret']) )
$atts['fb_app_secret'] = $kc->secrect_storage( $atts['fb_app_secret'], 'encrypt' );
$elm_attrs = array();
$elm_attrs[] = 'class="'. esc_attr( implode(' ', $el_classes ) ) .'"';
$elm_attrs[] = 'data-cfg="'. base64_encode( json_encode( $atts ) ) .'"';
kc_js_callback( 'kc_front.ajax_action' );
?>
<div <?php echo implode(' ', $elm_attrs ) ;?>>
<ul class="list-posts">
<?php
for( $i=1; $i <= $num_post_show; $i++){
?>
<li class="fb_mark_cls"></li>
<?php
}
?>
</ul>
<?php
if( !empty( $show_profile_button ) && 'yes' === $show_profile_button ){
$fb_page_id = !empty( $fb_page_id )? $fb_page_id : 'kingcomposer';
$page_url = 'https://www.facebook.com/' . $fb_page_id;
?>
<a class="fb-button-profile" href="<?php echo esc_url( $page_url ) ;?>" target="_blank">
<?php echo $btn_text ;?>
</a>
<?php
}
?>
</div>

View File

@@ -0,0 +1,111 @@
<?php
$title = $desc = $icon = $image = $position = $show_button = $button_text = $button_title = $button_target = $button_href = $button_link = $custom_class = $data_img = $data_icon = $data_title = $data_desc = $data_position = $data_button = '';
$layout = 1;
$wrap_class = apply_filters( 'kc-el-class', $atts );
extract( $atts );
$wrap_class[] = 'kc-feature-boxes';
$wrap_class[] = 'kc-fb-layout-' . $layout;
if ( !empty( $custom_class ) )
$wrap_class[] = $custom_class;
if ( !empty( $image ) ) {
$img_link = wp_get_attachment_image_src( $image, 'full' );
$alttext = get_post_meta( $image, '_wp_attachment_image_alt', true);
$data_img .= '<figure class="content-image">';
$data_img .= '<img src="'. $img_link[0] .'" alt="'. $alttext .'">';
$data_img .= '</figure>';
}
if ( !empty( $title ) ) {
$data_title .= '<div class="content-title">';
$data_title .= $title;
$data_title .= '</div>';
}
if ( !empty( $desc ) ) {
$data_desc .= '<div class="content-desc">';
$data_desc .= $desc;
$data_desc .= '</div>';
}
if ( !empty( $position ) ) {
$data_position .= '<div class="content-position">';
$data_position .= $position;
$data_position .= '</div>';
}
if( empty($icon) || $icon == '__empty__')
$icon = 'et-envelope';
$data_icon .= '<div class="content-icon">';
$data_icon .= '<i class="'. $icon .'"></i>';
$data_icon .= '</div>';
if ( $show_button == 'yes' ) {
$button_link = ( '||' === $button_link ) ? '' : $button_link;
$button_link = kc_parse_link($button_link);
if ( strlen( $button_link['url'] ) > 0 ) {
$button_href = $button_link['url'];
$button_title = $button_link['title'];
$button_target = strlen( $button_link['target'] ) > 0 ? $button_link['target'] : '_self';
}
$data_button .= '<div class="content-button">';
$data_button .= '<a href="'. esc_url( $button_href ) .'" target="'. $button_target .'" title="'. $button_title .'">'. $button_text .'</a>';
$data_button .= '</div>';
}
?>
<div class="<?php echo implode( ' ', $wrap_class ); ?>">
<?php switch ( $layout ) {
case '2':
echo $data_img;
echo $data_title;
echo $data_desc;
echo $data_button;
break;
case '3':
echo $data_icon;
echo '<div class="box-right">';
echo $data_title;
echo $data_desc;
echo '</div>';
break;
case '4':
echo $data_img;
echo '<div class="box-right">';
echo $data_position;
echo $data_title;
echo $data_desc;
echo $data_button;
echo '</div>';
break;
case '5':
echo $data_position;
echo $data_title;
echo $data_desc;
echo $data_button;
break;
default:
echo $data_icon;
echo $data_title;
echo $data_desc;
echo $data_button;
break;
} ?>
</div>

View File

@@ -0,0 +1,77 @@
<?php
$front_data = $back_data = $show_icon = $icon = $title = $description = $show_button = $text_on_button = $link = $direction = $wrap_class = $b_show_icon = $b_icon = $b_title = $b_description = $b_show_button = $b_text_on_button = $b_link = $button_href = $button_target = $button_title = '';
$element_atttribute = array();
$el_classess = apply_filters( 'kc-el-class', $atts );
extract( $atts );
$el_classess = array_merge( $el_classess, array(
'kc-flipbox',
'kc-flip-container'
));
if ( !empty( $wrap_class ) )
$el_classess[] = $wrap_class;
if( isset( $direction ) && $direction == 'vertical' )
$el_classess[] = 'flip-' . $direction;
$element_atttribute[] = 'class="'. esc_attr( implode(' ', $el_classess ) ) .'"';
$element_atttribute[] = 'ontouchstart="this.classList.toggle(\'hover\');"';
// Front Side Data
if( $show_icon == 'yes' && !empty( $icon ) )
$front_data .= '<div class="wrap-icon"><i class="'. esc_attr( $icon ) .'"></i></div>';
if( !empty( $title ) )
$front_data .= '<h3>'. esc_html( $title ) .'</h3>';
if(!empty($description))
$front_data .= '<p>'. do_shortcode( $description ) .'</p>';
// Back Side Data
if( $b_show_icon == 'yes' && !empty( $b_icon ) )
$back_data .= '<div class="wrap-icon"><i class="'. esc_attr( $b_icon ) .'"></i></div>';
if( !empty( $b_title ) )
$back_data .= '<h3>'. esc_html( $b_title ) .'</h3>';
if(!empty($b_description))
$back_data .= '<p>'. do_shortcode( $b_description ) .'</p>';
if( $b_show_button == 'yes' ){
if ( empty( $b_text_on_button ) )
$b_text_on_button = __( 'Read more', 'kingcomposer' );
$b_link = ( '||' === $b_link ) ? '' : $b_link;
$button_link = kc_parse_link($b_link);
if ( strlen( $button_link['url'] ) > 0 ) {
$button_href = $button_link['url'];
$button_title = $button_link['title'];
$button_target = strlen( $button_link['target'] ) > 0 ? $button_link['target'] : '_self';
}
$back_data .= '<a class="button" href="'. esc_url( $button_href ) .'" target="'. $button_target .'" title="'. $button_title .'">'. $b_text_on_button .'</a>';
}
?>
<div <?php echo implode( ' ', $element_atttribute ); ?>>
<div class="flipper">
<div class="front">
<div class="front-content">
<?php echo $front_data; ?>
</div>
</div>
<div class="back">
<div class="des">
<?php echo $back_data; ?>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,67 @@
<?php
/*
* Google maps shortcode template
*/
$output = $title = $wrap_class = $contact_form = $disable_wheel_mouse = '';
$map_width = '100%';
$map_height = '350px';
$contact_area_position = 'left';
$google_maps_info = array();
extract( $atts );
$css_classes = apply_filters( 'kc-el-class', $atts );
$element_attributes = array();
$map_attributes = array();
$css_classes = array_merge($css_classes, array(
'kc_google_maps',
'kc_shortcode'
));
if ( !empty( $wrap_class ) )
$css_classes[] = $wrap_class;
$element_attributes[] = 'class="'. esc_attr( implode( ' ', $css_classes ) ) .'"';
if( !empty( $title ) ){
$output .= '<h3 class="map_title">'. esc_html( $title ) .'</h3>';
}
//Contact form on maps
if( !empty($show_ocf) && 'yes' === $show_ocf ){
if(!empty( $contact_form_sc )){
$contact_form = '<div class="map_popup_contact_form '. $contact_area_position .'">';
$contact_form .= '<a class="close" href="javascript:;"><i class="sl-close"></i></a>';
$contact_form .= do_shortcode( $contact_form_sc );
$contact_form .= '</div>';
$contact_form .= '<a class="show_contact_form" href="javascript:;"><i class="fa fa-bars"></i></a>';
}
}
$map_attributes[] = 'style="height: '. esc_attr( $map_height ) .'px"';
$map_attributes[] = 'class="kc-google-maps"';
if( !empty( $disable_wheel_mouse ) ){
$element_attributes[] = 'data-wheel="disable"';
}
$map_location = preg_replace( array('/width="\d+"/i', '/height="\d+"/i'), array(
sprintf('width="%s"', $map_width ),
sprintf('height="%d"', intval( $map_height ))
),
$map_location );
if( isset( $_GET['kc_action'] ) && $_GET['kc_action'] === 'live-editor' ){
$map_location = '<div style="width: 100%;height:'.$map_height.'px;" class="disable-view-element"><h3>For best perfomance, the map has been disabled in this editing mode.</h3></div>';
}
$output .= '<div '. implode( ' ', $element_attributes ) .'>'. $contact_form .'<div '. implode( ' ', $map_attributes ) .'>'. $map_location .'</div></div>';
echo $output;

View File

@@ -0,0 +1,45 @@
<?php
$output = $icon = $class = $icon_wrap_class = $link = $use_link = '';
$has_link = false;
extract( $atts );
$css_class = apply_filters( 'kc-el-class', $atts );
$css_class[] = 'kc-icon-wrapper';
if ( !empty( $icon_wrap_class ) )
$css_class[] = $icon_wrap_class;
if( empty( $icon ) )
$icon = 'fa-leaf';
$class_icon = array( $icon );
if ( !empty( $class ) )
$class_icon[] = $class;
if( $use_link == 'yes') {
$link = ( '||' === $link ) ? '' : $link;
$link = kc_parse_link( $link );
$link_att = array();
if ( strlen( $link['url'] ) > 0 ) {
$has_link = true;
$a_target = strlen( $link['target'] ) > 0 ? $link['target'] : '_self';
$link_att[] = 'href="' . esc_attr( $link['url'] ) . '"';
$link_att[] = 'target="' . esc_attr( $a_target ) . '"';
$link_att[] = 'title="' . esc_attr( $link['title'] ) . '"';
}
}
?>
<div class="<?php echo esc_attr( implode( " ", $css_class ) ); ?>">
<?php if( $has_link ) :?>
<a <?php echo implode(' ', $link_att); ?>>
<?php endif;?>
<i class="<?php echo esc_attr( implode( " ", $class_icon ) ) ?>"></i>
<?php if( $has_link ) :?>
</a>
<?php endif;?>
</div>

View File

@@ -0,0 +1,71 @@
<?php
$title = $images = $transition = $delay = $force_size = $width = $height = $position = $wrap_class = '';
$wrapper_class = apply_filters( 'kc-el-class', $atts );
extract( $atts );
$_images = array();
$classes = array( 'image_fadein' );
$attributes = array();
foreach( explode( ',', $images ) as $id ){
$image = wp_get_attachment_image_src( $id, 'full' );
if( isset( $image[0] ) && !empty( $image[0] ) ){
if( isset( $force_size ) && $force_size == 'yes' ){
$atts = array( '250', '250', 'c' );
if( isset( $width ) && !empty( $width ) )
$atts[0] = $width;
if( isset( $height ) && !empty( $height ) )
$atts[1] = $height;
if( isset( $position ) && !empty( $position ) )
$atts[2] = $position;
$_images[] = kc_tools::createImageSize( $image[0], implode( 'x', $atts ) );
}else $_images[] = $image[0];
}
}
if( isset( $transition ) && !empty( $transition ) ){
$classes[] = esc_attr( $transition );
}
if( isset( $delay ) && !empty( $delay ) ){
$attributes[] = 'data-delay="'.esc_attr( $delay ).'"';
}
$attributes[] = 'class="'.implode( ' ', $classes ).'"';
$attributes[] = 'data-images="'. $images .'"';
?>
<div class="image_fadein_slider <?php echo implode(' ', $wrapper_class );?>">
<?php
if( !empty( $title ) )
echo '<h3>'.esc_html( $title ).'</h3>';
?>
<div <?php echo implode( ' ', $attributes ); ?>>
<?php
if( !isset( $_images[0] ) || empty( $_images[0] ) ){
echo '<h3>'. __('Images Gallery: No images found', 'kingcomposer' ) .'</h3>';
} else {
foreach( $_images as $image ){
echo '<img src="'. esc_url( $image ) .'" />';
}
}
?>
</div>
</div>

View File

@@ -0,0 +1,121 @@
<?php
$output = $custom_links = $title = $type_class = $overlay = $icon = $slider_item_start = $slider_item_end = $ul_start = $ul_end = '';
$slider_width = $navigation = $pagination = $image_masonry = $columns = '';
$size_array = array('full', 'medium', 'large', 'thumbnail');
extract( $atts );
$wrp_class = apply_filters( 'kc-el-class', $atts );
$type_class = 'kc-grid';
if( !empty( $custom_links) && 'custom_link' === $click_action ) {
$custom_links = preg_replace('/\n$/','',preg_replace('/^\n/','',preg_replace('/[\r\n]+/',"\n", $custom_links)));
$custom_links_arr = explode("\n", $custom_links);
}
$el_classess = array(
'kc_image_gallery',
'kc-carousel-image',
$type_class,
$wrap_class
);
$images = explode( ',', $images );
$element_attribute = array();
$element_attribute[] = 'class="'. esc_attr( implode( ' ', $el_classess ) ) .'"';
if( $type == 'image_masonry' )
$element_attribute[] = 'data-image_masonry="yes"';
$attachment_data = $attachment_data_full = array();
foreach($images as $image_id){
$img_full = wp_get_attachment_image_src( $image_id, 'full' );
if( in_array( $image_size, $size_array )){
$attachment_data[] = wp_get_attachment_image_src( $image_id, $image_size );
}else{
$img_link = kc_tools::createImageSize( $img_full[0], $image_size );
$attachment_data[] = array( $img_link );
}
$attachment_data_full[] = $img_full;
}
ob_start();
if(!empty($title))
echo '<h3 class="kc-title image-gallery-title">'. esc_html($title) .'</h3>';
$html = '';
if( !empty( $overlay ) ){
$html = '<div class="kc-image-overlay">';
if( !empty( $icon ) )
$html .= '<i class="' . $icon . '"></i>';
$html .= '</div>';
}
?>
<div <?php echo implode(' ', $element_attribute ); ?>>
<?php
if( !isset( $attachment_data[0] ) || empty( $attachment_data[0] ) ){
echo '<h3 class="kc-image-gallery-title">Images Gallery: No images found</h3>';
}else{
$pretty_id = rand(434,43463453);
echo $ul_start;
foreach($attachment_data as $i => $image){
$alttext = '';
if( isset($atts['alt_text']) && $alt_text == 'yes')
$alttext = get_post_meta( $images[$i], '_wp_attachment_image_alt', true);
switch( $click_action ){
case 'none':
echo '<div class="item-grid grid-'. $columns .'"><img src="'. esc_attr($image[0]) .'" alt="' . $alttext .'"/>'. $html .'</div>';
break;
case 'large_image':
echo '<div class="item-grid grid-'. $columns .'"><a href="'. esc_attr( $attachment_data_full[$i][0] ) .'" target="_blank">'
.'<img src="'. esc_attr($image[0]) .'" alt="' . $alttext .'"/>'. $html .'</a></div>';
break;
case 'lightbox':
echo '<div class="item-grid grid-'. $columns .'"><a class="kc-image-link kc-pretty-photo" data-lightbox="kc-lightbox" rel="kc-pretty-photo['.$pretty_id.']" href="'. esc_attr( esc_attr( $attachment_data_full[$i][0] ) ) .'">'
.'<img src="'. esc_attr($image[0]) .'" alt="' . $alttext .'"/>'. $html .'</a></div>';
break;
case 'custom_link':
if(isset($custom_links_arr[$i])){
echo '<div class="item-grid grid-'. $columns .'"><a href="'. esc_attr( strip_tags($custom_links_arr[$i]) ) .'" target="_blank">'
.'<img src="'. esc_attr($image[0]) .'" alt="' . $alttext .'"/>'. $html .'</a></div>';
}else{
echo '<div class="item-grid grid-'. $columns .'"><img src="'. esc_attr($image[0]) .'" alt="' . $alttext .'"/>'. $html .'</div>';
}
break;
}
}
echo $ul_end;
}
?>
</div>
<?php
$output = ob_get_clean();
echo '<div class="kc-image-gallery '.implode(' ', $wrp_class).'">'.$output.'</div>';
if($type == 'image_masonry') kc_js_callback('kc_front.image_gallery.masonry');

View File

@@ -0,0 +1,148 @@
<?php
$image = $event_click = $custom_link = $title = $button_text = $button_link = $caption_animation = $icon = $custom_class = $img_url = $link_url = $link_title = $link_target = $before_url = $after_url = $data_img = $data_title = $data_desc = $data_button = '';
$img_size = '1170x700xct';
$layout = 1;
$wrap_class = apply_filters( 'kc-el-class', $atts );
extract( $atts );
$wrap_class[] = 'kc-image-hover-effects kc-img-effects-' . $layout . ' ' . esc_attr( $caption_animation );
if ( !empty( $custom_class ) )
$wrap_class[] = $custom_class;
if ( !empty( $image ) ) {
$img_link = wp_get_attachment_image_src( $image, 'full' );
$img_full = $img_link[0];
if ( $img_size == 'full' ) {
$img_link = $img_link[0];
} else {
$img_link = kc_tools::createImageSize( $img_link[0], $img_size );
}
} else {
$img_link = KC_URL."/assets/images/get_start_m.jpg";
$img_full = KC_URL."/assets/images/get_start_m.jpg";
}
if ( !empty( $custom_link ) ) {
$img_arr = explode( "|", $custom_link );
if ( !empty( $img_arr[0] ) ) {
$img_url = $img_arr[0];
} else {
$img_url = '#';
}
} else {
$img_url = '#';
}
if ( !empty( $button_link ) ) {
$link_arr = explode( "|", $button_link );
if ( !empty( $link_arr[0] ) ) {
$link_url = $link_arr[0];
} else {
$link_url = '#';
}
if ( !empty( $link_arr[1] ) )
$link_title = $link_arr[1];
if ( !empty( $link_arr[2] ) )
$link_target = $link_arr[2];
} else {
$link_url = '#';
}
$button_attr = array();
$button_attr[] = 'href="'. esc_url( $link_url ) .'"';
if ( !empty( $link_title ) )
$button_attr[] = 'title="'. esc_attr( $link_title ) .'"';
if ( !empty( $link_target ) )
$button_attr[] = 'target="'. esc_attr( $link_target ) .'"';
switch ( $event_click ) {
case 'none':
$data_img = '<figure><img src="'. esc_url( $img_link ) .'" alt=""/></figure>';
break;
case 'custom_link':
$data_img = '<a href="'. esc_url( $img_url ) .'"><img src="'. esc_url( $img_link ) .'" alt=""/></a>';
$before_url = '<a href="'. esc_url( $img_url ) .'">';
$after_url = '</a>';
break;
default:
$data_img = '<a href="'. esc_url( $img_full ) .'" rel="prettyPhoto" class="kc-pretty-photo"><img src="'. esc_url( $img_link ) .'" alt=""/></a>';
$before_url = '<a href="'. esc_url( $img_full ) .'" rel="prettyPhoto" class="kc-pretty-photo">';
$after_url = '</a>';
wp_enqueue_script('prettyPhoto');
wp_enqueue_style( 'prettyPhoto');
break;
}
if ( !empty( $title ) ) {
$data_title = '<div class="content-title">'. $title .'</div>';
}
if ( !empty( $desc ) ) {
$data_desc = '<div class="content-desc">'. $desc .'</div>';
}
if ( !empty( $button_text ) ) {
$data_button = '<div class="content-button"><a '. implode( ' ', $button_attr ) .'>'. $button_text .'</a></div>';
}
?>
<div class="<?php echo esc_attr( implode(' ', $wrap_class) ); ?>">
<?php switch ( $layout ) {
case '2':
echo $data_img;
echo $before_url;
echo '<div class="overlay-effects">';
echo $data_title;
echo $data_desc;
echo "</div>";
echo $after_url;
break;
case '3':
echo $data_img;
echo $before_url;
echo '<div class="overlay-effects">';
echo '<div class="overlay-content">';
echo $data_title;
echo $data_desc;
echo "</div>";
echo "</div>";
echo $after_url;
break;
case '4':
echo $data_img;
echo '<div class="overlay-effects">';
echo $data_title;
echo $data_desc;
echo $data_button;
echo "</div>";
break;
case '5':
echo $data_img;
echo $before_url;
echo '<div class="overlay-effects">';
echo '<i class='.$icon.'></i>';
echo "</div>";
echo $after_url;
break;
default:
echo $data_img;
echo $before_url;
echo '<div class="overlay-effects">';
echo $data_title;
echo "</div>";
echo $after_url;
break;
} ?>
</div>

View File

@@ -0,0 +1,66 @@
<?php
$output = $wrap_class = $css = '';
$count = 0;
extract( $atts );
$css_classes = apply_filters( 'kc-el-class', $atts );
$element_attributes = array();
$css_classes = array_merge($css_classes, array(
'kc_shortcode',
'kc_wrap_instagram',
$wrap_class
));
if( $css != '' )$css_classes[] = $css;
if ( !empty( $columns_style ) ) {
$css_classes[] = 'kc_ins_col_' . $columns_style;
}
$css_class = implode( ' ', $css_classes );
$element_attributes[] = 'class="' . esc_attr( $css_class ) . '"';
$image_size = (!empty($image_size)) ? $image_size : 'thumbnail';
$number_show = (!empty( $number_show )) ? $number_show : 8;
global $kc;
if( isset($atts['access_token']) && !empty($atts['access_token']) )
$atts['access_token'] = $kc->secrect_storage( $atts['access_token'], 'encrypt' );
$element_attributes[] = 'data-cfg="'. base64_encode( json_encode( $atts ) ).'"';
$output .= '<div '. implode( ' ', $element_attributes ) .'>';
if(!empty($title)){
$output .= '<h3 class="kc-widget-title">'. esc_html($title) .'</h3>';
}
$output .= '<ul>';
$mark_class = 'ins_mark_'.$image_size;
for($i=1; $i<=$number_show; $i++){
switch ($i%$columns_style) {
case '1':
$li_class = 'el-start';
break;
case '0':
$li_class = 'el-end';
break;
default:
$li_class = '';
break;
}
$output .= '<li class="'. esc_attr($mark_class .' '. $li_class) .'"></li>';
}
$output .= '</ul>';
$output .= '</div>';
echo $output;
kc_js_callback( 'kc_front.ajax_action' );

View File

@@ -0,0 +1,70 @@
<?php
$output = $class = $custom_class = $icons = '';
extract( $atts );
$css_class = apply_filters( 'kc-el-class', $atts );
$css_class[] = 'kc-multi-icons-wrapper';
if ( !empty( $custom_class ) )
$css_class[] = $custom_class;
?>
<div class="<?php echo esc_attr( implode( " ", $css_class ) ); ?>">
<?php
foreach( $icons as $item ):
$link_att = array();
$icon = $item->icon;
$label = $item->label;
$link = $item->link;
$color = isset($item->color) ? $item->color : '';
$bg_color = isset($item->bg_color) ? $item->bg_color : '';
if( empty( $icon ) )
$icon = 'fa-leaf';
$link = ( '||' === $link ) ? '' : $link;
$link = kc_parse_link( $link );
$link_att = array();
$icon_att = array();
$link_target = '_blank';
$link_url = '#';
$link_title = $label;
if ( strlen( $link['url'] ) > 0 ) {
$link_target = strlen( $link['target'] ) > 0 ? $link['target'] : '_self';
$link_url = esc_attr( $link['url'] );
$link_title = esc_attr( $link['title'] );
}
$link_att[] = 'href="' . esc_attr( $link_url ) . '"';
$link_att[] = 'target="' . esc_attr( $link_target ) . '"';
$link_att[] = 'title="' . esc_attr( $link_title ) . '"';
$link_att[] = 'class="multi-icons-link multi-icons' . $icon . '"';
$style = '';
if( !empty( $bg_color ))
$link_att[] = 'style="background-color:' . $bg_color .';"';
$class_icon = array( $icon );
$icon_att[] = 'class="' . esc_attr( implode( " ", $class_icon ) ) . '"';
if( !empty( $color ))
$icon_att[] = 'style="color:' . $color .';"';
?>
<a <?php echo implode(' ', $link_att); ?>>
<i <?php echo implode(' ', $icon_att); ?>></i>
</a>
<?php
endforeach;
?>
</div>

View File

@@ -0,0 +1,13 @@
<?php
$classes = apply_filters( 'kc-el-class', $atts );
// This is for adding master class, so the css system can be worked with this element
$output = '<div class="'.implode(' ', $classes).'">';
$output .= do_shortcode( str_replace('kc_nested#', 'kc_nested', $content ) );
// This to process its self nested
$output .= '</div>';
echo $output;
?>

View File

@@ -0,0 +1,54 @@
<?php
$output = $_class = $wrap_class = $auto_width = $percent = $size = $linewidth = $icon = '';
extract( $atts );
$custom_size = !empty($custom_size) ? $custom_size : 120;
$custom_size = intval($custom_size);
$barcolor = (!empty($barcolor)) ? $barcolor : '#39c14f';
$trackcolor = (!empty($trackcolor)) ? $trackcolor : '#e4e4e4';
$linewidth = (!empty($linewidth)) ? $linewidth : '10';
$size = ('custom' === $size && !empty( $size )) ? $custom_size : $size;
$element_attributes = array();
$custom_class = apply_filters( 'kc-el-class', $atts );
$custom_class[] = $wrap_class;
$custom_class = implode( ' ', $custom_class );
$css_classes = array( 'kc_shortcode', 'kc_piechart',);
if( empty( $size ) )
$size = $custom_size;
if( !empty( $auto_width ) )
{
$auto_width = 'yes';
$css_classes[] = 'auto_width';
$css_classes[] = 'auto_width';
}
$element_attributes[] = 'data-size="' .esc_attr(intval($size)). '"';
$element_attributes[] = 'data-percent="' .esc_attr( $percent ). '"';
$element_attributes[] = 'data-linecap="' .esc_attr( $rounded_corners_bar ). '"';
$element_attributes[] = 'data-barcolor="' .esc_attr( $barcolor ). '"';
$element_attributes[] = 'data-trackcolor="' .esc_attr( $trackcolor ). '"';
$element_attributes[] = 'data-autowidth="' .esc_attr( $auto_width ). '"';
$element_attributes[] = 'data-linewidth="' .esc_attr( $linewidth ). '"';
$css_class = implode(' ', $css_classes);
$element_attributes[] = 'class="' . esc_attr( trim( $css_class ) ) . '"';
?><div class="kc-pie-chart-wrapper <?php echo esc_attr( $custom_class ); ?>">
<div class="kc-pie-chart-holder">
<span <?php echo implode( ' ', $element_attributes ); ?>>
<span class="pie_chart_percent">
<?php if( $icon_option == 'yes' ): ?>
<i class="<?php echo $icon;?> pie_chart_icon"></i>
<?php endif;?>
<span class="percent"></span>
</span>
</span>
</div>
</div>

View File

@@ -0,0 +1,159 @@
<?php
$output = $title = $wrap_class = $taxonomy = $css = '';
extract($atts);
if( !isset( $atts['post_taxonomy']))
$post_taxonomy = 'post';
$el_classess = apply_filters( 'kc-el-class', $atts );
$orderby = isset($order_by) ? $order_by : 'ID';
$order = isset($order_list) ? $order_list : 'ASC';
$readmore_text = !empty($readmore_text)? $readmore_text : __('Read more', 'kingcomposer');
$post_taxonomy_data = explode( ',', $post_taxonomy );
$taxonomy_term = array();
$post_type = 'post';
if( isset($post_taxonomy_data) ){
foreach( $post_taxonomy_data as $post_taxonomy ){
$post_taxonomy_tmp = explode( ':', $post_taxonomy );
$post_type = $post_taxonomy_tmp[0];
if( isset($post_taxonomy_tmp[1]) ){
$taxonomy_term[] = $post_taxonomy_tmp[1];
}
}
}
$taxonomy_objects = get_object_taxonomies( $post_type, 'objects' );
$taxonomy = key( $taxonomy_objects );
$args = array(
'post_type' => $post_type,
'posts_per_page' => $number_post,
'orderby' => $orderby,
'order' => $order,
);
if($orderby == 'rand') unset($args['order']);
if( count($taxonomy_term) )
{
$tax_query = array(
'relation' => 'OR'
);
foreach( $taxonomy_term as $term ){
$tax_query[] = array(
'taxonomy' => $taxonomy,
'field' => 'slug',
'terms' => $term,
);
}
$args['tax_query'] = $tax_query;
}
$the_query = new WP_Query( $args );
$element_attribute = array();
$el_classess = array_merge($el_classess, array(
'list-post-type',
'list-'.$post_type,
$taxonomy,
$wrap_class
));
if( $css != '' )$el_classess[] = $css;
$element_attribute[] = 'class="'. esc_attr( implode(' ', $el_classess) ) .'"';
ob_start();
if ( $the_query->have_posts() ) {
global $post;
echo '<div '. implode(' ', $element_attribute) .'>';
if( !empty($title) ){
echo '<h3 class="list-post-title">'. esc_html($title) .'</h3>';
}
while ( $the_query->have_posts() ) {
$the_query->the_post();
?>
<div class="list-item post-<?php echo esc_attr( $post->ID ); ?>">
<div class="post-content">
<figure>
<?php
if ( has_post_thumbnail() && $thumbnail === 'yes' ) {
the_post_thumbnail($image_size);
}
?>
</figure>
<h3><a href="<?php echo esc_attr( get_permalink( $post->ID ) ); ?>"><?php the_title(); ?></a></h3>
<div class="kc-entry_meta">
<?php
if ( has_post_format( array( 'chat', 'status' ) ) )
$format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' );
else
$format_prefix = '%2$s';
$date = sprintf( '<span class="date"><i class="sl-clock"></i> <time class="entry-date" datetime="%1$s">%2$s</time></span>',
esc_attr( get_the_date( 'c' ) ),
esc_html( sprintf( $format_prefix, get_post_format_string( get_post_format() ), get_the_date() ) )
);
if( !empty($show_date) && $show_date === 'yes' ){
echo $date;
}
if ( 'post' == get_post_type() && $show_author == 'yes' ) {
printf( '<span class="author vcard"><i class="sl-user"></i> <a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'kingcomposer' ), get_the_author() ) ),
get_the_author()
);
}
$categories_list = get_the_category_list( __( ', ', 'kingcomposer' ) );
if ( $categories_list && $show_category == 'yes') {
echo '<span class="categories-links"><i class="sl-folder"></i> ' . $categories_list . '</span>';
}
$tag_list = get_the_tag_list( '', __( ', ', 'kingcomposer' ) );
if ( $tag_list && $show_tags == 'yes' ) {
echo '<span class="tags-links"><i class="sl-tag"></i> ' . $tag_list . '</span>';
}
?>
</div>
<div class="text">
<?php echo wp_trim_words( get_the_excerpt(), $number_word, ' ...' ); ?>
</div>
<?php if(!empty($show_button) && 'yes' === $show_button): ?>
<a class="kc-read-more" href="<?php echo esc_attr( get_permalink( $post->ID ) ); ?>"><?php echo $readmore_text; ?></a>
<?php endif; ?>
</div>
</div>
<?php
}
echo '</div>';
} else {
echo '<div '. implode(' ', $element_attribute) .'>';
echo __('No posts found', 'kingcomposer');
echo '</div>';
}
wp_reset_postdata();
$output = ob_get_clean();
echo $output;

View File

@@ -0,0 +1,159 @@
<?php
$show_icon_header = $icon_header = $title = $subtitle = $price = $currency = $show_on_top = $duration = $desc = $show_icon = $icon = $show_button = $button_text = $button_link = $custom_class = $data_icon_header = $data_title = $data_price = $data_currency = $data_duration = $data_desc = $data_button = '';
$layout = 1;
$wrap_class = apply_filters( 'kc-el-class', $atts );
extract( $atts );
$wrap_class[] = 'kc-pricing-tables';
$wrap_class[] = 'kc-pricing-layout-' . $layout;
if ( !empty( $custom_class ) )
$wrap_class[] = $custom_class;
if ( $show_on_top == 'yes' )
$wrap_class[] = 'kc-price-before-currency';
if ( $show_icon_header == 'yes' ) {
if( empty($icon_header) || $icon_header == '__empty__')
$icon_header = 'fa-rocket';
$data_icon_header .= '<div class="content-icon-header">' . '<i class="'. $icon_header .'"></i>' . '</div>';
}
if ( !empty( $title ) ) {
$data_title .= '<div class="content-title">';
if ( !empty( $subtitle ) ) {
$data_title .= '<div>' . $title . '</div>';
$data_title .= '<div class="content-sub-title">' . $subtitle . '</div>';
} else {
$data_title .= $title;
}
$data_title .= '</div>';
}
if ( !empty( $price ) ) {
$data_price .= '<span class="content-price">' . $price . '</span>';
}
if ( !empty( $currency ) ) {
$data_currency .= '<span class="content-currency">' . $currency . '</span>';
}
if ( !empty( $duration ) ) {
$data_duration .= '<span class="content-duration">' . $duration . '</span>';
}
if ( !empty( $desc ) ) {
$pros = explode( "\n", $desc );
if( count( $pros ) ) {
$data_desc .= '<ul class="content-desc">';
foreach( $pros as $pro ) {
if ( $show_icon == 'yes' ) {
$data_desc .= '<li><i class="'. $icon .'"></i> '. $pro .' </li>';
} else {
$data_desc .= '<li>'. $pro .' </li>';
}
}
$data_desc .= '</ul>';
}
}
if ( $show_button == 'yes' ) {
if ( !empty( $button_link ) ) {
$link_arr = explode( '|', $button_link );
if ( !empty( $link_arr[0] ) ) {
$link_url = $link_arr[0];
} else {
$link_url = '#';
}
} else {
$link_url = '#';
}
$data_button .= '<div class="content-button">';
$data_button .= '<a href="'. $link_url .'">'. $button_text .'</a>';
$data_button .= '</div>';
}
?>
<div class="<?php echo implode( ' ', $wrap_class ); ?>">
<?php switch ( $layout ) {
case '2':
echo '<div class="header-pricing">';
echo $data_title;
echo '<div class="kc-pricing-price">';
if ( $show_on_top == 'yes' ) {
echo $data_price.$data_currency.$data_duration;
} else {
echo $data_currency.$data_price.$data_duration;
}
echo '</div>';
echo '</div>';
echo $data_desc;
echo $data_button;
break;
case '3':
echo $data_title;
echo $data_desc;
echo '<div class="kc-pricing-price">';
if ( $show_on_top == 'yes' ) {
echo $data_price.$data_currency.$data_duration;
} else {
echo $data_currency.$data_price.$data_duration;
}
echo '</div>';
echo $data_button;
break;
case '4':
echo '<div class="header-pricing">';
echo $data_icon_header;
echo $data_title;
echo '<div class="kc-pricing-price">';
if ( $show_on_top == 'yes' ) {
echo $data_price.$data_currency.$data_duration;
} else {
echo $data_currency.$data_price.$data_duration;
}
echo '</div>';
echo '</div>';
echo $data_desc;
echo $data_button;
break;
default:
echo '<div class="header-pricing">';
echo $data_title;
echo $data_icon_header;
echo '<div class="kc-pricing-price">';
if ( $show_on_top == 'yes' ) {
echo $data_price.$data_currency.$data_duration;
} else {
echo $data_currency.$data_price.$data_duration;
}
echo '</div>';
echo '</div>';
echo $data_desc;
echo $data_button;
break;
} ?>
</div>

View File

@@ -0,0 +1,95 @@
<?php
$output = $_class = $css = $wrap_class = $value_color_style = $radius = $speed ='';
extract($atts);
$progress_bar_color_default = '#999999';
$element_attributes = array();
$el_classes = apply_filters( 'kc-el-class', $atts );
$el_classes = array_merge($el_classes, array(
'kc_shortcode',
'kc_progress_bars',
$wrap_class,
));
$style = isset($atts['style']) ? $atts['style'] : 1;
if( isset( $atts['speed'] ) && !empty( $atts['speed'] ) )
$speed = $atts['speed'];
else
$speed = 2000;
$options = $atts['options'];
$element_attributes[] = 'class="'. esc_attr( implode(' ', $el_classes ) ) .'"';
$element_attributes[] = 'data-style="'. esc_attr($style) .'"';
$output .= '<div '. implode(' ', $element_attributes) .'>';
if( isset( $options ) ){
foreach( $options as $option ){
$prob_style = '';
$value = !empty($option->value) ? $option->value : 50;
$label = !empty($option->label) ? $option->label : 'Label default';
$prob_color = !empty($option->prob_color) ? $option->prob_color : '';
if( $prob_color != '')
$prob_style = 'background-color: '.$prob_color.';';
$prob_style .= 'width: '.$value.'%';
$value_color_style = '';
if( !empty($option->value_color) ){
$value_color_style = ' style="color: '. esc_attr($option->value_color) .'"';
}
$prob_track_attributes = array();
$prob_attributes = array();
//Progress bars track attributes
$prob_track_css_classes = array(
'kc-ui-progress-bar',
'kc-ui-progress-bar'.$style,
'kc-progress-bar',
'kc-ui-container',
);
$prob_track_css_class = implode(' ', $prob_track_css_classes);
$prob_track_attributes[] = 'class="' . esc_attr( trim( $prob_track_css_class ) ) . '"';
//Progress bars attributes
$prob_css_classes = array(
'kc-ui-progress',
'kc-ui-progress'.$style
);
$prob_css_class = implode(' ', $prob_css_classes);
$prob_attributes[] = 'class="' . esc_attr( trim( $prob_css_class ) ) . '"';
$prob_attributes[] = 'style="'. esc_attr($prob_style) .'"';
$output .= '<div class="progress-item">';
$output .= '<span class="label">'. esc_html( $label ) .'</span>';
$output .= '<div '. implode( ' ', $prob_track_attributes ) .'>';
$output .= '<div '. implode( ' ', $prob_attributes ) .' data-value="'. esc_html( $value ) .'" data-speed="'. esc_html( $speed ) .'">';
$output .= '<div class="ui-label">
<span class="value"'. $value_color_style .'>'. esc_html( $value ) .'%</span>
</div>';
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
}
}
$output .= '</div>';
echo $output;

View File

@@ -0,0 +1,13 @@
<?php
$code = '';
extract($atts);
$classes = apply_filters( 'kc-el-class', $atts );
$classes[] = 'kc-raw-code';
echo '<div class="'.esc_attr( implode( ' ', $classes ) ).'">';
echo do_shortcode( $code );
echo '</div>';

View File

@@ -0,0 +1,3 @@
<?php
extract( $atts );
echo urldecode(base64_decode($code));

View File

@@ -0,0 +1,32 @@
<?php
$output = $title = $slider_id = $css = '';
extract( $atts );
$wrp_classes = apply_filters( 'kc-el-class', $atts );
$attributes = array();
$classes = array(
'kc_revslider',
$atts['class']
);
if( $css != '' )$classes[] = $css;
$attributes[] = 'class="' . esc_attr( implode(' ', $classes) ) . '"';
$output .= '<div '.implode( ' ', $wrp_classes ) . '>';
if ( !empty( $atts['title'] ) )
$output .= '<h3>' . $atts['title'] . '</h3>';
if ( !empty( $atts['slider_id'] ) ) {
$output .= '<div '.implode( ' ', $attributes ) . '>';
$output .= do_shortcode( '[rev_slider alias="' . $atts['slider_id'] . '"]' );
$output .= '</div>';
} else {
$output .= __( 'Please create and select slider.', 'kingcomposer' );
}
echo '</div>';
echo $output;

View File

@@ -0,0 +1,123 @@
<?php
$output = $css_data = $css = '';
$cont_class = array( 'kc-row-container' );
$element_attributes = array();
extract($atts);
$css_classes = apply_filters( 'kc-el-class', $atts );
$css_classes[] = 'kc_row';
if( $css != '' )
$css_classes[] = $css;
if( !empty( $atts['row_class'] ) )
$css_classes[] = $atts['row_class'];
if( !empty( $atts['full_height'] ) )
{
if( $atts['content_placement'] == 'middle' )
$element_attributes[] = 'data-kc-fullheight="middle-content"';
else $element_attributes[] = 'data-kc-fullheight="true"';
}
if( empty($atts['column_align']) )
$atts['column_align'] = 'center';
if( !empty( $atts['equal_height'] ) ){
$element_attributes[] = 'data-kc-equalheight="true"';
$element_attributes[] = 'data-kc-equalheight-align="'. esc_attr($atts['column_align']) .'"';
}
if( isset( $atts['use_container'] ) && $atts['use_container'] == 'yes' )
$cont_class[] = ' kc-container';
if( !empty( $atts['container_class'] ) )
$cont_class[] = ' '.esc_attr($atts['container_class']);
if( !empty( $atts['css'] ) )
$css_classes[] = $atts['css'];
/**
*Check video background
*/
if( $atts['video_bg'] === 'yes' )
{
$video_bg_url = $atts['video_bg_url'];
if( empty($video_bg_url)) $video_bg_url = 'https://www.youtube.com/watch?v=dOWFVKb2JqM';
$has_video_bg = kc_youtube_id_from_url( $video_bg_url );
if( !empty( $has_video_bg ) )
{
$css_classes[] = 'kc-video-bg';
$element_attributes[] = 'data-kc-video-bg="' . esc_attr( $video_bg_url ) . '"';
$css_data .= 'position: relative;';
if( isset( $atts['video_options'] ) && !empty( $video_options ) ){
$element_attributes[] = 'data-kc-video-options="' . esc_attr( trim( $video_options )) . '"';
}
if( isset( $atts['video_mute'] ) && !empty( $atts['video_mute'] ) )
$element_attributes[] = 'data-kc-video-mute="' . esc_attr( $atts['video_mute'] ) . '"';
}
}
if( !empty( $atts['row_id'] ) ){
$row_id = urlencode( $atts['row_id'] );
$element_attributes[] = 'id="' . esc_attr( $row_id ) . '"';
}
if( isset( $atts['force'] ) && $atts['force'] == 'yes' ){
if( isset( $atts['use_container'] ) && $atts['use_container'] == 'yes' )
$element_attributes[] = 'data-kc-fullwidth="row"';
else
$element_attributes[] = 'data-kc-fullwidth="content"';
}
if( empty( $has_video_bg ) )
{
if( !empty( $atts['parallax'] ) )
{
$element_attributes[] = 'data-kc-parallax="true"';
if( $atts['parallax'] == 'yes-new' )
{
$bg_image_id = $atts['parallax_image'];
$bg_image = wp_get_attachment_image_src( $bg_image_id, 'full' );
$css_data .= "background-image:url('".$bg_image[0]."');";
}
}
}
$css_class = implode(' ', $css_classes);
$element_attributes[] = 'class="' . esc_attr( trim( $css_class ) ) . '"';
if( !empty( $css_data ) )
$element_attributes[] = 'style="' . esc_attr( trim( $css_data ) ) . '"';
$output .= '<section ' . implode( ' ', $element_attributes ) . '>';
$output .= '<div class="' . esc_attr(implode( ' ', $cont_class)) . '">';
$output .= '<div class="kc-wrap-columns">'.do_shortcode( str_replace( 'kc_row#', 'kc_row', $content ) ).'</div>';
$output .= '</div>';
$output .= '</section>';
echo $output;

View File

@@ -0,0 +1,77 @@
<?php
$output = $row_class_container = $row_class = $row_id = $css = '';
extract( $atts );
$css_classes = apply_filters( 'kc-el-class', $atts );
$css_classes = array_merge( $css_classes, array(
'kc_row',
'kc_row_inner',
$row_class
));
if( $css != '' )
$css_classes[] = $css;
$attributes = array();
if ( ! empty( $row_id ) ) {
$attributes[] = 'id="' . esc_attr( $row_id ) . '"';
}
if( empty($atts['column_align']) )
$atts['column_align'] = 'center';
if( !empty( $atts['equal_height'] ) )
{
$attributes[] = 'data-kc-equalheight="true"';
$attributes[] = 'data-kc-row-action="true"';
$attributes[] = 'data-kc-equalheight-align="'. esc_attr($atts['column_align']) .'"';
}
/**
*Check video background
*/
if( isset( $atts['video_bg'] ) && $atts['video_bg'] === 'yes' )
{
$video_bg_url = $atts['video_bg_url'];
if( empty($video_bg_url)) $video_bg_url = 'https://www.youtube.com/watch?v=dOWFVKb2JqM';
$has_video_bg = kc_youtube_id_from_url( $video_bg_url );
if( !empty( $has_video_bg ) )
{
$css_classes[] = 'kc-video-bg';
$attributes[] = 'data-kc-video-bg="' . esc_attr( $video_bg_url ) . '"';
if( isset( $atts['video_options'] ) && !empty( $video_options ) ){
$element_attributes[] = 'data-kc-video-options="' . esc_attr( trim( $video_options )) . '"';
}
if( isset( $atts['video_mute'] ) && !empty( $atts['video_mute'] ) )
$element_attributes[] = 'data-kc-video-mute="' . esc_attr( $atts['video_mute'] ) . '"';
}
}
$attributes[] = 'class="' . esc_attr( trim( implode(' ', $css_classes) ) ) . '"';
$output .= '<div ' . implode( ' ', $attributes ) . '>';
if( !empty( $row_class_container ) )
$output .= '<div class="'.esc_attr( $row_class_container ).'">';
$output .= do_shortcode( str_replace('kc_row_inner#', 'kc_row_inner', $content ) );
if( !empty( $row_class_container ) )
$output .= '</div>';
$output .= '</div>';
echo $output;

View File

@@ -0,0 +1,161 @@
<?php
/*----------------------------------
* Single image shortcode
*--------------------------------*/
$output = $title_link = $alt = $image = $target = $overlay = $image_title = $image_source = $image_external_link = $image_size = $image_size_el = $caption = $on_click_action = $custom_link = $class = $ieclass = $image_full = $html = $css = '';
$size_array = array('full', 'medium', 'large', 'thumbnail');
$image_wrap = 'yes';
extract( $atts );
$css_classes = apply_filters( 'kc-el-class', $atts );
$default_src = kc_asset_url('images/get_start.jpg');
$image_source = $atts['image_source'];
$image_url = '';
$image_id = $atts['image'];
$image_size = $atts['image_size'];
$on_click_action = $atts['on_click_action'];
$data_lightbox = '';
$element_attributes = array();
$image_attributes = array();
$image_classes = array();
$css_classes = array_merge( $css_classes, array(
'kc_shortcode',
'kc_single_image'
));
if ( !empty( $class ) )
$css_classes[] = $class;
if ( !empty( $css ) )
$css_classes[] = $css;
if( !empty( $ieclass ) )
$image_classes[] = $ieclass;
if( $image_source == 'external_link' ) {
$image_full = $atts['image_external_link'];
$image_url = $image_full;
$size = $atts['image_size_el'];
if( !empty( $image_url ) )
$image_attributes[] = 'src="'.$image_url.'"';
else
$image_attributes[] = 'src="'.$default_src.'"';
if( empty( $image_full ) )
$image_full = $default_src;
if ( preg_match( '/(\d+)x(\d+)/', $size, $matches ) ) {
$width = $matches[1];
$height = $matches[2];
$image_attributes[] = 'width="'. $width .'"';
$image_attributes[] = 'height="'. $height .'"';
}
} else {
if( $image_source == 'media_library' ) {
//$image_id = preg_replace( '/[^\d]/', '', $image_id );
} else {
$post_id = get_the_ID();
if ( $post_id && has_post_thumbnail( $post_id ) ) {
$image_id = get_post_thumbnail_id( $post_id );
} else {
$image_id = 0;
}
}
$image_full_width = wp_get_attachment_image_src( $image_id, 'full' );
$image_full = $image_full_width[0];
if( in_array( $image_size, $size_array ) ){
$image_data = wp_get_attachment_image_src( $image_id, $image_size );
$image_url = $image_data[0];
}else{
$image_url = kc_tools::createImageSize( $image_full, $image_size );
}
if( !empty( $image_url ) ) {
$image_attributes[] = 'src="'.$image_url.'"';
} else {
$image_attributes[] = 'src="'.$default_src.'"';
$image_classes[] = 'kc_image_empty';
}
if( empty( $image_full ) )
$image_full = $default_src;
}
$image_attributes[] = 'class="'.implode( ' ', $image_classes ).'"';
if( !empty( $alt ) )
$image_attributes[] = 'alt="'. trim(esc_attr($alt)) .'"';
else
$image_attributes[] = 'alt=""';
$title_link = $alt;
if( $on_click_action == 'lightbox' )
{
$data_lightbox = 'rel="prettyPhoto" class="kc-pretty-photo"';
wp_enqueue_script('prettyPhoto');
wp_enqueue_style( 'prettyPhoto' );
}
else if( $on_click_action == 'open_custom_link' )
{
$custom_link = ( '||' === $custom_link ) ? '' : $custom_link;
$custom_link = kc_parse_link($custom_link);
if ( strlen( $custom_link['url'] ) > 0 ) {
$image_full = $custom_link['url'];
$title_link = $custom_link['title'];
$target = strlen( $custom_link['target'] ) > 0 ? $custom_link['target'] : '_self';
}
}
//overlay layer
if( !empty( $overlay ) ){
$html = '<div class="kc-image-overlay">';
if( !empty( $icon ) )
$html .= '<i class="' . $icon . '"></i>';
$html .= '</div>';
}
$css_class = implode(' ', $css_classes);
$element_attributes[] = 'class="' . esc_attr( trim( $css_class ) ) . '"';
?>
<div <?php echo implode( ' ', $element_attributes ) ;?>>
<?php
if( !empty($on_click_action) ) {
?>
<a <?php echo $data_lightbox ;?> href="<?php echo esc_attr( $image_full );?>" title="<?php echo strip_tags( $title_link ) ;?>" target="<?php echo esc_attr( $target );?>">
<img <?php echo implode( ' ', $image_attributes ) ;?> /><?php echo $html;?>
</a>
<?php
} else {
?>
<img <?php echo implode( ' ', $image_attributes ) ;?> /><?php echo $html; ?>
<?php
}
if( !empty( $caption ) ){
?>
<p class="scapt"><?php echo html_entity_decode( $caption );?></p>
<?php
}
?>
</div>

View File

@@ -0,0 +1,12 @@
<?php
$class = $css = '';
$height = 0;
extract($atts);
$css_classes = apply_filters( 'kc-el-class', $atts );
if ( !empty( $class ) )
$css_classes[] = $class;
echo '<div class="'. esc_attr( implode(' ', $css_classes) ) .'" style="height: '. esc_attr(intval($height)) .'px; clear: both; width:100%;"></div>';

View File

@@ -0,0 +1,28 @@
<?php
/**
* kc_tab shortcode
**/
$tab_id = $title = '';
extract( $atts );
$css_class = apply_filters( 'kc-el-class', $atts );
$css_class = array_merge($css_class, array( 'kc_tab', 'ui-tabs-panel', 'kc_ui-tabs-hide', 'kc_clearfix' ));
if( empty( $tab_id ) || (strpos( $tab_id,'%time%' ))){
$tab_id = sanitize_title( $title );
}else{
$tab_id = esc_attr( $tab_id );
}
if( isset( $class ) )
array_push( $css_class, $class );
$output = '<div id="' . $tab_id . '" class="' . esc_attr( implode( ' ', $css_class ) ) . '"><div class="kc_tab_content">'.
( ( '' === trim( $content ) )
? __( 'Empty tab. Edit page to add content here.', 'kingcomposer' )
: do_shortcode( str_replace('kc_tab#', 'kc_tab', $content ) ) ).
'</div></div>';
echo $output;

View File

@@ -0,0 +1,88 @@
<?php
$title = $interval = $open_mouseover = $class = $navigation = $auto_play = $auto_height = $auto_play = $tab_nav_class = $title_slider = '';
$speed = 4500; $pagination = 'yes'; $items = $items1 = $items2 = 1;
extract( $atts );
$css_class = apply_filters( 'kc-el-class', $atts );
$tabs_option = array(
'open-on-mouseover' => $open_mouseover,
'tab-active' => $active_section,
'effect-option' => $effect_option,
);
$tabs_option_data = array();
foreach( $tabs_option as $name => $value ){
array_push( $tabs_option_data, 'data-'.esc_attr( $name ).'="'.esc_attr( $value ).'"' );
}
$css_class = array_merge($css_class, array( 'kc_tabs', 'group' ));
if( isset( $css ) && !empty( $css ) )
$css_class[] = $css;
if( isset( $class ) && !empty( $class ) )
$css_class[] = $class;
if( $type == 'vertical_tabs' ){
$css_class[] = 'kc_vertical_tabs';
if( $vertical_tabs_position == 'right' )
array_push( $css_class, 'tabs_right' );
$tab_nav_class = '';
}
else if( $type == 'slider_tabs' ){
$css_class[] = 'kc-tabs-slider';
$owl_option = array(
"items" => intval($items)?intval($items):1,
"speed" => intval( $speed ),
"navigation" => $navigation,
"pagination" => $pagination,
"autoheight" => $autoheight,
"autoplay" => $autoplay,
"tablet" => intval($tablet)?intval($tablet):1,
"mobile" => intval($mobile)?intval($mobile):1
);
$owl_option = strtolower( json_encode( $owl_option ) );
echo '<div class="'.implode( ' ', $css_class ).'">';
if( $title_slider === 'yes' ){
echo '<ul class="kc-tabs-slider-nav kc_clearfix">';
preg_replace_callback( '/kc_tab\s([^\]\#]+)/i', 'kc_process_tab_title' , $content );
echo '</ul>';
}
echo '<div class="owl-carousel" data-owl-options=\''. $owl_option .'\'>';
echo do_shortcode( str_replace('kc_tabs#', 'kc_tabs', $content ) );
echo '</div>';
echo '</div>';
return;
}
else{
$tab_nav_class = 'kc_tabs_nav';
}
$tabs_option_data[] = 'class="'. esc_attr( implode(' ', $css_class) ) .'"';
?>
<div <?php echo implode( ' ', $tabs_option_data ); ?>>
<div class="kc_wrapper ui-tabs kc_clearfix">
<ul class="<?php echo esc_attr( $tab_nav_class ); ?> ui-tabs-nav kc_clearfix">
<?php preg_replace_callback( '/kc_tab\s([^\]\#]+)/i', 'kc_process_tab_title' , $content ); ?>
</ul>
<?php echo do_shortcode( str_replace('kc_tabs#', 'kc_tabs', $content ) ); ?>
</div>
</div>

View File

@@ -0,0 +1,136 @@
<?php
$title = $subtitle = $desc = $image = $custom_class = $data_img = $data_title = $data_desc = $data_subtitle = $img_size = $data_socials = $socials = $data_button = '';
$layout = 1;
$size_array = array('full', 'medium', 'large', 'thumbnail');
$wrap_class = apply_filters( 'kc-el-class', $atts );
extract( $atts );
$wrap_class[] = 'kc-team';
$wrap_class[] = 'kc-team-' . $layout;
if ( $custom_class != '' )
$wrap_class[] = $custom_class;
if ( !empty( $image ) ) {
if( in_array( $img_size, $size_array ) ){
$image_data = wp_get_attachment_image_src( $image, $img_size );
$img_link = $image_data[0];
}else{
$image_full_width = wp_get_attachment_image_src( $image, 'full' );
$img_link = kc_tools::createImageSize( $image_full_width[0], $img_size );
}
$data_img .= '<figure class="content-image">';
$data_img .= '<img src="'. $img_link .'" alt="">';
$data_img .= '</figure>';
}
if ( !empty( $title ) ) {
$data_title .= '<div class="content-title">';
$data_title .= $title;
$data_title .= '</div>';
}
if ( !empty( $desc ) ) {
$data_desc .= '<div class="content-desc">';
$data_desc .= $desc;
$data_desc .= '</div>';
}
if ( !empty( $subtitle ) ) {
$data_subtitle .= '<div class="content-subtitle">';
$data_subtitle .= $subtitle;
$data_subtitle .= '</div>';
}
if ( $show_button == 'yes' ) {
if ( !empty( $button_link ) ) {
$button_link_text = explode( '|', $button_link );
$button_link = $button_link_text[0];
}
if( empty($button_text) )
$button_text = __( 'Readmore', 'kingcomposer' );
$data_button .= '<div class="content-button">';
$data_button .= '<a href="'. $button_link .'">'. $button_text .'</a>';
$data_button .= '</div>';
}
$social_list = array(
'facebook' => 'facebook-f',
'twitter' => 'twitter',
'google_plus' => 'google_plus-g',
'linkedin' => 'linkedin-in',
'pinterest' => 'pinterest',
'flickr' => 'flickr',
'instagram' => 'instagram',
'dribbble' => 'dribbble',
'reddit' => 'reddit-square',
'email' => 'envelope',
);
foreach( $social_list as $acc => $icon ){
if( !empty( $atts[$acc]) && $atts[$acc] != '__empty__' ){
$icon = str_replace( array('_', 'email') , array( '-', 'envelope') , $icon);
if ($icon == 'envelope')
$data_socials .= '<a href="' . $atts[$acc] . '" target="_blank"><i class="fa-' . $icon . '"></i></a>';
else
$data_socials .= '<a href="' . $atts[$acc] . '" target="_blank"><i class="fab-' . $icon . '"></i></a>';
}
}
if( !empty( $data_socials) )
$data_socials = '<div class="content-socials">' . $data_socials . '</div>';
?>
<div class="<?php echo implode( ' ', $wrap_class ); ?>">
<?php switch ( $layout ) {
case '2':
echo $data_img;
echo '<div class="box-right">';
echo $data_title;
echo $data_subtitle;
echo $data_desc;
echo $data_socials;
echo '</div>';
break;
case '3':
echo $data_img;
echo '<div class="overlay">';
echo $data_title;
echo $data_subtitle;
echo $data_desc;
echo $data_button;
echo $data_socials;
echo '</div>';
break;
default:
echo $data_img;
echo $data_title;
echo $data_subtitle;
echo $data_desc;
echo $data_socials;
echo $data_button;
break;
} ?>
</div>

View File

@@ -0,0 +1,94 @@
<?php
$title = $desc = $image = $img_size = $position = $custom_class = $data_img = $data_title = $data_desc = $data_position = '';
$layout = 1;
$size_array = array('full', 'medium', 'large', 'thumbnail');
$wrap_class = apply_filters( 'kc-el-class', $atts );
extract( $atts );
$wrap_class[] = 'kc-testimo';
$wrap_class[] = 'kc-testi-layout-' . $layout;
if ( !empty( $custom_class ) )
$wrap_class[] = $custom_class;
if ( !empty( $image ) ) {
if( in_array( $img_size, $size_array ) ){
$image_data = wp_get_attachment_image_src( $image, $img_size );
$img_link = $image_data[0];
}else{
$image_full_width = wp_get_attachment_image_src( $image, 'full' );
$img_link = kc_tools::createImageSize( $image_full_width[0], $img_size );
}
$data_img .= '<figure class="content-image">';
$data_img .= '<img src="'. $img_link .'" alt="">';
$data_img .= '</figure>';
}
if ( !empty( $title ) ) {
$data_title .= '<div class="content-title">';
$data_title .= $title;
$data_title .= '</div>';
}
if ( !empty( $desc ) ) {
$data_desc .= '<div class="content-desc">';
$data_desc .= $desc;
$data_desc .= '</div>';
}
if ( !empty( $position ) ) {
$data_position .= '<div class="content-position">';
$data_position .= $position;
$data_position .= '</div>';
}
?>
<div class="<?php echo implode( ' ', $wrap_class ); ?>">
<?php switch ( $layout ) {
case '2':
echo $data_title;
echo $data_position;
echo $data_desc;
break;
case '3':
echo $data_img;
echo $data_title;
echo $data_position;
echo $data_desc;
break;
case '4':
echo $data_img;
echo '<div class="box-right">';
echo $data_desc;
echo $data_position;
echo $data_title;
echo '</div>';
break;
case '5':
echo $data_desc;
echo $data_img;
echo '<div class="box-right">';
echo $data_title;
echo $data_position;
echo '</div>';
break;
default:
echo $data_img;
echo $data_desc;
echo $data_title;
echo $data_position;
break;
} ?>
</div>

View File

@@ -0,0 +1,66 @@
<?php
$text = $post_title = $type = $before = $after = $title_link = $link_url = $link_title = $link_target = $class = $title_wrap = $title_wrap_class = '';
extract( $atts );
if( empty( $type ) )
$type = 'h1';
$wrap_class = apply_filters( 'kc-el-class', $atts );
$class_title = array( 'kc_title' );
$wrap_class[] = 'kc-title-wrap';
if ( !empty( $class ) )
$class_title[] = $class;
if ( $title_wrap == 'yes' && !empty( $title_wrap_class ) )
$wrap_class[] = $title_wrap_class;
if ( !empty( $title_link ) ) {
$link_arr = explode( "|", $title_link );
if ( !empty( $link_arr[0] ) )
$link_url = $link_arr[0];
if ( !empty( $link_arr[1] ) )
$link_title = $link_arr[1];
if ( !empty( $link_arr[2] ) )
$link_target = $link_arr[2];
}
if ( $post_title == 'yes'){
$text_title = get_the_title();
if( $text_title != '' )
$text = esc_attr($text_title);
}
$wrap_class[] = $title_wrap_class;
?>
<div class="<?php echo esc_attr( implode( ' ', $wrap_class ) ); ?>">
<?php
if ( $title_wrap == 'yes' && !empty( $before ) )
echo $before;
echo '<'. $type .' class="'. implode( ' ', $class_title ) . '">';
if ( !empty( $link_url ) ) {
echo '<a href="'. esc_url( $link_url ) .'" class="kc_title_link" title="'. esc_attr( $link_title ) .'" target="'. esc_attr( $link_target ) .'">'. $text .'</a>';
} else {
echo $text;
}
echo '</'. $type .'>';
if ( $title_wrap == 'yes' && !empty( $after ) )
echo $after;
?>
</div>

View File

@@ -0,0 +1,98 @@
<?php
// JS callback for live editor
kc_js_callback('kc_front.tooltips');
$position = $icon = $image = $img_size = $button_text = $button_link = $button_target = $button_title = $text_tooltip = $custom_class = $data_icon = $data_img = $data_button = '';
$layout = 1;
$wrapper_class = apply_filters( 'kc-el-class', $atts );
extract( $atts );
$wrapper_class[] = 'kc-popover-tooltip';
if ( !empty( $custom_class ) )
$wrapper_class[] = $custom_class;
$main_class = array( 'kc_tooltip' );
$main_class[] = 'style' . $layout;
if ( !empty( $icon ) ) {
$data_icon .= '<i class="'. $icon .' fati17"></i>';
}
if ( $image != '' ) {
$img_link = wp_get_attachment_image_src( $image, 'full' );
$img_link = $img_link[0];
if ( $img_size != 'full' ) {
$img_link = kc_tools::createImageSize( $img_link, $img_size );
}
$data_img .= '<img src="'. $img_link .'" alt="">';
}else{
$data_img .= '<img src="'. kc_asset_url('images/get_start_s.jpg') .'" alt="">';
}
$button_attr = array();
$button_attr[] = 'class="kc_tooltip style3"';
$button_attr[] = 'data-tooltip="true"';
$button_attr[] = 'data-position="'. $position .'"';
if ( !empty( $button_link ) ) {
$button_link_text = explode( '|', $button_link );
$button_link = $button_link_text[0];
if ( !empty( $button_link_text[1] ) )
$button_title = $button_link_text[1];
if ( !empty( $button_link_text[2] ) )
$button_target = $button_link_text[2];
} else {
$button_link = '#';
}
$button_attr[] = 'href="'. $button_link .'"';
if ( !empty( $button_title ) )
$button_attr[] = 'title="'. esc_attr( $button_title ) .'"';
if ( !empty( $button_target ) )
$button_attr[] = 'target="'. esc_attr( $button_target ) .'"';
if( empty($button_text) )
$button_text = __( 'Read More', 'kingcomposer' );
$data_button .= '<a '. implode( ' ', $button_attr ) .'>'. $button_text .'<span>'. $text_tooltip .'</span></a>';
?>
<div class="<?php echo esc_attr( implode(' ', $wrapper_class) ); ?>">
<?php switch ( $layout ) {
case '2':
?>
<div class="<?php echo implode( ' ', $main_class ); ?>" data-tooltip="true" data-position="<?php echo $position; ?>">
<?php echo $data_img; ?>
<span><?php echo $text_tooltip; ?></span>
</div>
<?php
break;
case '3':
echo '<div class="content-button">';
echo $data_button;
echo '</div>';
break;
default:
?>
<div class="<?php echo implode( ' ', $main_class ); ?>" data-tooltip="true" data-position="<?php echo $position; ?>">
<?php echo $data_icon; ?>
<span><?php echo $text_tooltip; ?></span>
</div>
<?php
break;
} ?>
</div>

View File

@@ -0,0 +1,60 @@
<?php
$show_navigation = $show_pagination = $auto_height = '';
extract( $atts );
$attributes = array();
$el_classes = apply_filters( 'kc-el-class', $atts );
$el_classes = array_merge($el_classes, array(
'kc_shortcode',
'kc_wrap_twitter',
'kc_twitter_feed',
'kc_twitter_style-' . $display_style
));
if ( !empty( $wrap_class ) )
$el_classes[] = $wrap_class;
if ( isset( $css ) )
$el_classes[] = $css;
$atts_data = array(
'show_navigation' => $show_navigation,
'show_pagination' => $show_pagination,
'auto_height' => $auto_height
);
global $kc;
if( isset($atts['consumer_key']) && !empty($atts['consumer_key']) )
$atts['consumer_key'] = $kc->secrect_storage( $atts['consumer_key'], 'encrypt' );
if( isset($atts['consumer_secret']) && !empty($atts['consumer_secret']) )
$atts['consumer_secret'] = $kc->secrect_storage( $atts['consumer_secret'], 'encrypt' );
if( isset($atts['access_token']) && !empty($atts['access_token']) )
$atts['access_token'] = $kc->secrect_storage( $atts['access_token'], 'encrypt' );
if( isset($atts['access_token_secrect']) && !empty($atts['access_token_secrect']) )
$atts['access_token_secrect'] = $kc->secrect_storage( $atts['access_token_secrect'], 'encrypt' );
$attributes[] = 'class="'. esc_attr( implode( ' ', $el_classes ) ) .'"';
$attributes[] = 'data-cfg="'. base64_encode( json_encode( $atts ) ) .'"';
$attributes[] = 'data-owl_option="'. esc_attr( json_encode( $atts_data ) ) .'"';
$attributes[] = 'data-display_style="'. esc_attr( $display_style ) .'"';
?>
<div <?php echo trim( implode(' ', $attributes ) ); ?>>
<div class="result_twitter_feed"><span>Loading...</span></div>
</div>
<?php
kc_js_callback( 'kc_front.ajax_action' );

View File

@@ -0,0 +1,94 @@
<?php
$video_upload = '';
$video_height = '250';
$check_video = 'true';
$video_mute = 'no';
extract( $atts );
$video_classes = apply_filters( 'kc-el-class', $atts );
if( !empty( $video_width ) )
$video_height = intval( $video_width ) / 1.77;
if( isset( $_GET['kc_action'] ) && $_GET['kc_action'] === 'live-editor' )
$is_live = true;
else
$is_live = false;
$video_link = ( !empty( $video_link ) ) ? $video_link : 'https://www.youtube.com/watch?v=iNJdPyoqt8U'; //default video
//Check youtube video url
$pattern = '~
^(?:https?://)? # Optional protocol
(?:www\.)? # Optional subdomain
(?:youtube\.com|youtu\.be) # Mandatory domain name
/watch\?v=([^&]+) # URI with video id as capture group 1
~x';
$has_match = preg_match( $pattern, $video_link, $matches );
$video_attributes = array();
$video_classes = array_merge(
$video_classes,
array(
'kc_shortcode',
'kc_video_play',
'kc_video_wrapper'
)
);
if ( !empty( $wrap_class ) )
$video_classes[] = $wrap_class;
if ( !empty( $atts['css'] ) )
$video_classes[] = $atts['css'];
$video_attributes[] = 'class="'. esc_attr( implode(' ', $video_classes ) ) .'"';
if( !$is_live && empty( $video_upload ) ){
$video_attributes[] = 'data-video="'. esc_attr( $video_link ) .'"';
$video_attributes[] = 'data-width="'. esc_attr( $video_width ) .'"';
$video_attributes[] = 'data-height="'. esc_attr( $video_height ) .'"';
$video_attributes[] = 'data-fullwidth="'. esc_attr( $full_width ) .'"';
$video_attributes[] = 'data-autoplay="'. esc_attr( $auto_play ) .'"';
$video_attributes[] = 'data-loop="'. esc_attr( $loop ) .'"';
$video_attributes[] = 'data-control="'. esc_attr( $control ) .'"';
$video_attributes[] = 'data-related="'. esc_attr( $related ) .'"';
$video_attributes[] = 'data-showinfo="'. esc_attr( $showinfo ) .'"';
$video_attributes[] = 'data-kc-video-mute="' . esc_attr( $video_mute ) . '"';
}
if( $check_video === 'true' ) {
?>
<div <?php echo implode(' ', $video_attributes ); ?>>
<?php if ( $is_live ): ?>
<div style="height:<?php echo esc_attr( $video_height ); ?>px; width:<?php echo esc_attr( $video_width ); ?>" class="disable-view-element">
<h3><?php echo esc_html__( 'For best perfomance, the video map has been disabled in this editing mode.', 'kingcomposer' ); ?></h3>
</div>
<?php elseif ( !empty( $video_upload ) ): ?>
<?php
$autoplay = '';
if( $auto_play == 'yes' )
$autoplay = ' autoplay';
?>
<video width="<?php echo esc_attr( $video_width ); ?>" height="<?php echo esc_attr( $video_height ); ?>" controls<?php echo esc_attr( $autoplay ); ?>>
<source src="<?php echo esc_url( $video_upload ); ?>" type="video/mp4">
<?php echo esc_html__( 'Your browser does not support the video tag.', 'kingcomposer' ); ?>
</video>
<?php endif ?>
</div>
<?php
} else {
echo esc_html__('KingComposer error: Video format url incorrect', 'kingcomposer');
}

View File

@@ -0,0 +1,30 @@
<?php
$name = '';
$kc_el_class = apply_filters( 'kc-el-class', $atts );
extract( $atts );
$kc_el_class[] = 'widget-area kc-wp-sidebar';
echo '<div class="'.esc_attr(implode(' ', $kc_el_class)).'">';
if (empty($name))
{
echo '<h3 class="kc-error">'.
__('Please select a sidebar to display','kingcomposer').
'</h3>';
}
if (is_active_sidebar($name))
{
dynamic_sidebar($name);
}
else
{
echo '<h3 class="kc-error">'.
'<strong>'.esc_html($name).'</strong>: '.
__('The sidebar does not exist or inactive','kingcomposer').
'</h3>';
}
echo '</div>';

View File

@@ -0,0 +1,34 @@
<?php
if( $data = json_decode( base64_decode( $atts['data'] ) ) )
{
foreach( $data as $name => $args )
{
global $wp_registered_widget_updates;
if( isset( $wp_registered_widget_updates[ $name ] ) )
{
$widget_obj = $wp_registered_widget_updates[ $name ]['callback'][0];
$wgclasses = $widget_obj->widget_options['classname'];
$kc_el_class = apply_filters( 'kc-el-class', $atts );
if( is_array( $kc_el_class ) )
$wgclasses .= ' '.esc_attr(implode(' ', $kc_el_class));
$before_widget = sprintf('<div class="widget %s">', $wgclasses );
$default_args = array( 'before_widget' => $before_widget, 'after_widget' => "</div>", 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' );
$correct_args = array();
foreach( $args as $k => $v )
$correct_args[$k] = ctype_digit($v)?intval(trim($v)):$v;
$merge = wp_parse_args( $widget_obj->control_options, wp_parse_args( $default_args, $correct_args ) );
@$widget_obj->widget( $merge, $merge );
}
}
}
else
{
echo 'KC WP Widget: Error data structure';
}

View File

@@ -0,0 +1,31 @@
<#
if( data === undefined )
data = {};
var element_attributes = [], css_classes = [],
atts = ( data.atts !== undefined ) ? data.atts : {};
css_classes = kc.front.el_class( atts );
css_classes.push( 'kc_accordion_wrapper' );
if( atts['class'] !== undefined && atts['class'] !== '' )
css_classes.push( atts['class'] );
if( atts['open_all'] !== undefined && atts['open_all'] == 'yes' )
element_attributes.push( 'data-allowopenall="true"' );
if( atts['close_all'] !== undefined && atts['close_all'] == 'yes' )
element_attributes.push( 'data-closeall="true"' );
element_attributes.push( 'class="'+css_classes.join(' ')+'"' );
#>
<div {{{element_attributes.join(' ')}}}><#
if( atts['title'] !== undefined && atts['title'] !== '' ){
#><h3 class="kc-accordion-title">{{atts['title']}}</h3><#
}
#>{{{data.content}}}</div>
<#
data.callback = function( wrp ){ kc_front.accordion( wrp ) };
#>

View File

@@ -0,0 +1,35 @@
<#
if( data === undefined )
data = {};
var element_attributes = [], title = 'Title', css_class = [],
atts = ( data.atts !== undefined ) ? data.atts : {};
css_class = kc.front.el_class( atts );
css_class.push( 'kc_accordion_section' );
css_class.push( 'group' );
if( atts['title'] !== undefined && atts['title'] !== '' )
title = atts['title'];
if( atts['icon'] !== undefined && atts['icon'] !== '' )
title = '<i class="'+atts['icon']+'"></i> '+title;
if( atts['class'] !== undefined && atts['class'] !== '' )
css_class.push( atts['class'] );
if( data.content === undefined )
data.content = '';
data.content += '<div class="kc-element drag-helper" data-model="-1" droppable="true" draggable="true"><a href="javascript:void(0)" class="kc-add-elements-inner"><i class="sl-plus kc-add-elements-inner"></i></a></div>';
#>
<div class="{{css_class.join(' ')}}">
<h3 class="kc_accordion_header ui-accordion-header">
<span class="ui-accordion-header-icon ui-icon"></span>
<a href="#{{kc.tools.esc_slug(title)}}" data-prevent="scroll">{{{title}}}</a>
</h3>
<div class="kc_accordion_content ui-accordion-content kc_clearfix">
<div class="kc-panel-body">{{{data.content}}}</div>
</div>
</div>

View File

@@ -0,0 +1,33 @@
<#
var output = '', element_attributes = [], el_classes = [],
atts = ( data.atts !== undefined ) ? data.atts : {};
el_classes = kc.front.el_class( atts );
el_classes.push( 'kc_box_wrap' );
if( atts['custom_class'] !== undefined && atts['custom_class'] !== '' )
el_classes.push( atts['custom_class'] );
element_attributes.push( 'class="' + el_classes.join(' ') + '"' );
#>
<div class="{{el_classes.join(' ')}}"><#
data = kc.tools.base64.decode( atts['data'] );
data = data.replace( /\%SITE\_URL\%/g, kc_site_url );
if (data = JSON.parse(data))
{
#>{{{kc.front.loop_box(data)}}}<#
}
else
{
#>KC Box: Error content structure<#
}
if( atts['css_code'] !== undefined ){
#><style type="text/css">{{{atts['css_code']}}}</style><#
}
#></div>

View File

@@ -0,0 +1,30 @@
<#
var output = '',
atts = ( data.atts !== undefined ) ? data.atts : {},
css_classes = [],
title = ( atts['title'] !== undefined ) ? atts['title'] : '',
icon = ( atts['icon'] !== undefined ) ? atts['icon'] : 'fa-leaf',
show_button = ( atts['show_button'] !== undefined ) ? atts['show_button'] : '',
classes = ( atts['class'] !== undefined ) ? atts['class'] : '',
custom_style = '';
css_classes = kc.front.el_class( atts );
css_classes.push( classes );
css_classes = css_classes.join(' ');
title = kc.tools.base64.decode( title );
#>
<div class="message-boxes {{{css_classes}}}">
<div class="message-box-wrap">
<#
if ( icon !== '' ) { #><i class="{{{icon}}}"></i><# }
if ( show_button == 'show' ) {
#><button class="kc-close-but"><?php echo esc_html__( 'close', 'kingcomposer' );?></button><#
}
#>{{{title}}}
</div>
</div>

View File

@@ -0,0 +1,50 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
textbutton = kc.std( atts, 'text_title', 'Button Text'),
link = kc.std( atts, 'link', '#'),
onclick = kc.std( atts, 'onclick', ''),
wrap_class = kc.std( atts, 'wrap_class', ''),
size = kc.std( atts, 'size', 'small'),
show_icon = kc.std( atts, 'show_icon', 'no'),
icon = kc.std( atts, 'icon', 'fa-leaf'),
icon_position = kc.std( atts, 'icon_position', 'left'),
button_attributes = [],
wrapper_class = [];
wrapper_class = kc.front.el_class( atts );
wrapper_class.push( wrap_class );
link = link.split('|');
button_attributes.push( 'class="kc_button"' );
if( link[0] !== undefined )
button_attributes.push( 'href="' + link[0] + '"' );
if( link[1] !== undefined )
button_attributes.push( 'title="' + link[1] + '"' );
if( link[2] !== undefined )
button_attributes.push( 'target="' + link[2] + '"' );
if( onclick !== undefined && onclick !== '')
button_attributes.push( 'onclick="' + onclick + '"' );
if('yes' === show_icon){
if( icon_position == 'left' ){
textbutton = '<i class="' + icon + '"></i> ' + textbutton;
}else if( icon_position == 'right'){
textbutton += ' <i class="' + icon + '"></i>';
}else{
textbutton = '<i class="' + icon + '"></i>';
}
}
#>
<div class="{{{wrapper_class.join(' ')}}}">
<a {{{button_attributes.join(' ')}}}>{{{textbutton}}}</a>
</div>

View File

@@ -0,0 +1,90 @@
<#
if( data === undefined )
var data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
layout = ( atts['layout'] !== undefined ) ? atts['layout'] : '2',
title = ( atts['title'] !== undefined ) ? atts['title'] : '',
desc = ( atts['desc'] !== undefined ) ? kc.tools.base64.decode( atts['desc']) : '',
button_show = ( atts['button_show'] !== undefined ) ? atts['button_show'] : '',
button_text = ( atts['button_text'] !== undefined ) ? atts['button_text'] : '',
button_link = ( atts['button_link'] !== undefined ) ? atts['button_link'] : '',
icon_show = ( atts['icon_show'] !== undefined ) ? atts['icon_show'] : '',
icon = ( atts['icon'] !== undefined && atts['icon'] !== '__empty__' ) ? atts['icon'] : 'fa-rocket',
custom_class = ( atts['custom_class'] !== undefined ) ? atts['custom_class'] : '',
link_url = '',
link_title = '',
link_target = '',
data_text = '',
data_title = '',
data_button = '',
button_attr = [],
main_class = kc.front.el_class( atts );
main_class.push( 'kc-call-to-action' );
main_class.push( 'kc-cta-' + layout );
if ( button_show === 'yes' )
main_class.push( 'kc-is-button' );
if ( custom_class !== '' )
main_class.push( custom_class );
if ( title !== '' || desc !== '' ) {
data_text += '<div class="kc-cta-desc">';
if ( title !== '' ) {
data_text += '<h2>' + title + '</h2>';
}
if ( desc !== '' ) {
data_text += '<div class="kc-cta-text">' + desc + '</div>';
}
data_text += '</div>';
}
if ( button_show === 'yes' && button_text !== '' ) {
if ( button_link !== '' ) {
link_arr = button_link.split('|');
if ( link_arr[0] !== undefined ) {
link_url = link_arr[0];
} else {
link_url = '#';
}
if ( link_arr[1] !== undefined )
link_title = link_arr[1];
if ( link_arr[2] !== undefined )
link_target = link_arr[2];
} else {
link_url = '#';
}
if ( icon_show === 'yes' ) {
button_text += ' <span class="kc-cta-icon"><i class="' + icon + '"></i></span>';
}
button_attr.push( 'href="' + link_url + '"' );
if ( link_title !== '' )
button_attr.push( 'title="' + link_title + '"' );
if ( link_target !== '' )
button_attr.push( 'target="' + link_target + '"' );
data_button += '<div class="kc-cta-button">';
data_button += '<a ' + button_attr.join(' ') + '>' + button_text + '</a>';
data_button += '</div>';
}
#>
<div class="{{{main_class.join(' ')}}}">
{{{data_text}}}
{{{data_button}}}
</div>

View File

@@ -0,0 +1,165 @@
<#
var output = '',
atts = ( data.atts !== undefined ) ? data.atts : {},
thumb_data = '',
attachment_data = [],
attachment_data_full = [],
el_classes = [],
wrp_classes = [],
custom_links_arr = [],
element_attribute = [], el_classes = [], owl_option = [],
wrap_class = ( atts['wrap_class'] !== undefined ) ? atts['wrap_class'] : '',
images = ( atts['images'] !== undefined ) ? atts['images'] : '',
items_number = ( atts['items_number'] !== undefined ) ? atts['items_number'] : 4,
tablet = ( atts['tablet'] !== undefined ) ? atts['tablet'] : 2,
mobile = ( atts['mobile'] !== undefined ) ? atts['mobile'] : 1,
speed = ( atts['speed'] !== undefined ) ? atts['speed'] : 500,
navigation = ( atts['navigation'] !== undefined ) ? atts['navigation'] : false,
pagination = ( atts['pagination'] !== undefined ) ? atts['pagination'] : false,
auto_height = ( atts['auto_height'] !== undefined ) ? atts['auto_height'] : false,
progress_bar = ( atts['progress_bar'] !== undefined ) ? atts['progress_bar'] : false,
delay = ( atts['delay'] !== undefined && atts['delay'] !== '__empty__' && atts['delay'] !== '' ) ? atts['delay'] : 8,
autoplay = ( atts['autoplay'] !== undefined ) ? atts['autoplay'] : false,
show_thumb = ( atts['show_thumb'] !== undefined ) ? atts['show_thumb'] : '',
auto_play = ( atts['auto_play'] !== undefined ) ? atts['auto_play'] : false,
onclick = ( atts['onclick'] !== undefined ) ? atts['onclick'] : '',
custom_links = ( atts['custom_links'] !== undefined ) ? atts['custom_links'] : '',
num_thumb = ( atts['num_thumb'] !== undefined && atts['num_thumb'] !== '' ) ? atts['num_thumb'] : '5',
img_size = ( atts['img_size'] !== undefined ) ? atts['img_size'] : 'full';
wrp_classes = kc.front.el_class( atts );
if( images !== '' ){
images = images.split(',');
}
#>
<div class="{{{wrp_classes.join(' ')}}}">
<#
if( typeof(images) == 'object' && images !== '' ) {
for ( var i=0; i< images.length; i++ ){
image_id = images[i];
attachment_data.push( ajaxurl + '?action=kc_get_thumbn&id=' + image_id + '&size=' + img_size);
attachment_data_full.push( ajaxurl + '?action=kc_get_thumbn&size=full&id=' + image_id );
}
el_classes.push( 'kc-carousel-images' );
el_classes.push( 'owl-carousel-images' );
el_classes.push( 'owl-arrow-nav' );
el_classes.push( 'kc-sync1' );
el_classes.push( wrap_class );
if( atts['nav_style'] !== undefined && atts['nav_style'] !== '' ){
el_classes.push( 'owl-nav-' + atts['nav_style'] );
}
owl_option = {
'items' : items_number,
'tablet' : tablet,
'mobile' : mobile,
'speed' : speed,
'navigation' : navigation,
'pagination' : pagination,
'autoheight' : auto_height,
'progressbar' : progress_bar,
'delay' : delay,
'autoplay' : auto_play,
'showthumb' : show_thumb,
'num_thumb' : num_thumb,
};
owl_option = JSON.stringify( owl_option );
element_attribute.push('class="' + el_classes.join(' ') + '"');
element_attribute.push("data-owl-i-options='" + owl_option + "'");
if( 'custom_link' == onclick && custom_links !== '' ){
custom_links = custom_links.replace('/[\r\n]+/',"\n").replace('/^\n/','').replace('/\n$/','');
custom_links_arr = custom_links.split("\n");
}
for(var i=0; i < attachment_data.length; i++){
image = attachment_data[i];
output += '<div class="item">';
if( 'none' === onclick ){
output += '<img src="' + image + '" alt=""/>';
}else {
switch( onclick ){
case 'lightbox':
output += '<a class="kc-image-link kc-pretty-photo" data-lightbox="kc-lightbox" rel="prettyPhoto[' + atts['_id'] + ']" href="' + attachment_data_full[i] + '"><img src="' + image + '" alt="" /></a>';
break;
case 'custom_link':
if( custom_links_arr[i] !== undefined ){
output += '<a href="' + custom_links_arr[i] + '" target="' + custom_links_target + '">';
output += '<img src="' + image + '" alt="" /></a>';
}else{
output += '<img src="' + image + '" alt="" />';
}
break;
}
}
output += '</div>';
}
#>
<div class="kc-carousel_images">
<div {{{element_attribute.join(' ')}}}>
{{{output}}}
</div>
<#
if( show_thumb === 'yes' ){
#>
<div class="kc-sync2 owl-carousel">
<#
for( var k = 0; k < attachment_data.length; k++ ) {
image = attachment_data[k];
#>
<div class="item">
<img src="{{{image}}}" alt="" />
</div>
<# } #>
</div>
<#
}
data.callback = function( wrp, $ ){
kc_front.carousel_images( wrp );
}
#>
</div>
<#
}else{
#>
<h3 class="kc-carousel-no-images">Carousel Images: No images found.</h3>
<#
}
#>
</div>

View File

@@ -0,0 +1,41 @@
<#
if( data === undefined )data = {};
var width = '', output = '', attributes = [],
atts = ( data.atts !== undefined ) ? data.atts : {},
classes = kc.front.el_class( atts );
classes.push('kc_column');
if (atts['col_class'] !== undefined)
classes.push( atts['col_class'] );
if (atts['css'] !== undefined && typeof atts['css'] == 'string')
classes.push( atts['css'].split('|')[0] );
if( atts['col_id'] !== undefined && atts['col_id'] !== '' )
attributes.push( 'id="'+ atts['col_id'] +'"' );
if( atts['video_bg'] !== undefined && atts['video_bg'] === 'yes' ){
var video_bg_url = atts['video_bg_url'];
if( atts['video_bg_url'] !== undefined ){
classes.push('kc-video-bg');
attributes.push('data-kc-video-bg="'+atts['video_bg_url']+'"');
}
}
attributes.push( 'class="'+classes.join(' ')+'"' );
var col_container_class = ( atts['col_container_class'] !== undefined ) ? ' '+atts['col_container_class'] : '';
if( data.content === undefined )
data.content = '';
data.content += '<div class="kc-element drag-helper" data-model="-1" droppable="true" draggable="true"><a href="javascript:void(0)" class="kc-add-elements-inner"><i class="sl-plus kc-add-elements-inner"></i></a></div>';
#><div {{{attributes.join(' ')}}}>
<div class="kc-col-container{{col_container_class}}">{{{data.content}}}</div>
</div>

View File

@@ -0,0 +1,35 @@
<#
var output = '', attributes = [], col_in_class_container = 'kc_wrapper',
classes = [], atts = ( data.atts !== undefined ) ? data.atts : {};
classes = kc.front.el_class( atts );
classes.push( 'kc_column_inner' );
if (undefined !== atts['col_in_class'] && atts['col_in_class'] !== '')
classes.push( atts['col_in_class'] );
if (undefined !== atts['css'] && typeof atts['css'] == 'string')
classes .push( atts['css'].split('|')[0] );
if (atts['width'] !== undefined)
classes.push( kc.front.ui.column.width_class( atts['width'] ) );
if (undefined !== atts['col_in_class_container'] && atts['col_in_class_container'] !== '')
col_in_class_container += ' '+atts['col_in_class_container'];
if( atts['col_id'] !== undefined && atts['col_id'] !== '' )
attributes.push( 'id="'+ atts['col_id'] +'"' );
attributes.push( 'class="'+classes.join(' ')+'"' );
if( data.content === undefined )
data.content = '';
data.content += '<div class="kc-element drag-helper" data-model="-1" droppable="true" draggable="true"><a href="javascript:void(0)" class="kc-add-elements-inner"><i class="sl-plus kc-add-elements-inner"></i></a></div>';
#><div {{{attributes.join(' ')}}}>
<div class="{{col_in_class_container}}">{{{data.content}}}</div>
</div>

View File

@@ -0,0 +1,18 @@
<#
var atts = ( data.atts !== undefined ) ? data.atts : {}, el_class = [];
el_class = kc.front.el_class( atts );
el_class.push( 'kc_text_block' );
if( atts['class'] !== undefined && atts['class'] !== '' )
el_class.push( atts['class'] );
var content = top.switchEditors.wpautop(data._content);
if (content.indexOf('<p>') === -1)
content = '<p>'+content+'</p>';
#>
<div class="{{el_class.join(' ')}}">{{{content}}}</div>

View File

@@ -0,0 +1,85 @@
<# var output = '',
atts = ( data.atts !== undefined ) ? data.atts : {},
template = '',
custom_css = '',
el_classes = ['kc-countdown-timer'],
wpelm_class = [],
output = '',
element_attribute = [],
countdown_data = [],
timer_style = ( atts['timer_style'] !== undefined ) ? atts['timer_style'] : '1',
custom_template = ( atts['custom_template'] !== undefined ) ? atts['custom_template'] : '',
wrap_class = ( atts['wrap_class'] !== undefined ) ? atts['wrap_class'] : '',
title = ( atts['title'] !== undefined ) ? atts['title'] : '',
today = new Date(),
datetime = ( atts['datetime'] !== undefined && atts['datetime'] !== '__empty__' ) ? atts['datetime'] : '';
if( datetime == ''){
today.setTime(today.getTime() + 7 * 86400000);
datetime = today.toDateString();
}
wpelm_class = kc.front.el_class( atts );
el_classes.push( wrap_class );
switch ( timer_style ) {
case '1':
case '2':
template += '<span class="countdown-style' + timer_style + '">';
template += ' <span class="group">';
template += ' <span class="timer days">%D</span>';
template += ' <span class="unit">days</span>';
template += ' </span>';
template += ' <span class="group">';
template += ' <span class="timer seconds">%H</span>';
template += ' <span class="unit">hours</span>';
template += ' </span>';
template += ' <span class="group">';
template += ' <span class="timer seconds">%M</span>';
template += ' <span class="unit">minutes</span>';
template += ' </span>';
template += ' <span class="group">';
template += ' <span class="timer seconds">%S</span>';
template += ' <span class="unit">seconds</span>';
template += ' </span>';
template += '</span>';
break;
case '3':
if( custom_template !== '' ){
template = kc.tools.base64.decode(custom_template);
} else {
template = '%D days %H:%M:%S';
}
break;
}
var d = new Date(datetime);
datetime = d.getFullYear() + "/" + (d.getMonth() + 1) + "/" + d.getDate();
countdown_data = {
'date' : datetime,
'template' : template.replace('/\s\s+/', ' ').trim()
};
element_attribute.push('class="' + el_classes.join(' ') + '"');
element_attribute.push("data-countdown='" + JSON.stringify( countdown_data ) + "'");
#>
<div class="{{{wpelm_class.join(' ')}}}">
<#
if( title !== '' ){
#><h3>{{{title}}}</h3><#
}
#>
<div {{{element_attribute.join(' ')}}}></div>
</div>
<#
data.callback = function( wrp, $){
kc_front.countdown_timer();
}
#>

View File

@@ -0,0 +1,50 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
_before_number = '',
_after_number = '',
icon = '',
label = '',
el_classess = [];
el_classess = kc.front.el_class( atts );;
el_classess.push( 'kc_counter_box' );
if ( atts['wrap_class'] !== undefined )
el_classess.push( atts['wrap_class'] );
label = ( atts['label'] !== undefined ) ? '<h4>'+ atts['label'] +'</h4>' : '';
if( atts['icon_show'] !== undefined && atts['icon_show'] == 'yes' ) {
icon = ( atts['icon'] !== undefined ) ? atts['icon'] : 'fa-leaf';
icon = ( icon !== '' ) ? '<i class="' + icon + ' element-icon"></i>' : '';
} else {
icon = '';
}
if( atts['label_above'] !== undefined && 'yes' === atts['label_above'] ){
_before_number = icon + label;
} else {
_before_number = icon;
_after_number = label;
}
#>
<div class="{{{el_classess.join(' ')}}}">
{{{_before_number}}}
<span class="counterup">{{{atts['number']}}}</span>
{{{_after_number}}}
</div>
<#
data.callback = function( wrp, $ ){
kc_front.counterup();
}
#>

View File

@@ -0,0 +1,65 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
style = ( atts['style'] !== undefined ) ? atts['style'] : '',
title = ( atts['title'] !== undefined ) ? atts['title'] : '',
icon_show = ( atts['icon_show'] !== undefined ) ? atts['icon_show'] : '',
icon = ( atts['icon'] !== undefined ) ? atts['icon'] : '',
icon_txt = ( atts['icon_txt'] !== undefined ) ? atts['icon_txt'] : '',
icon_float = ( atts['icon_float'] !== undefined ) ? atts['icon_float'] : '',
link = ( atts['link'] !== undefined ) ? atts['link'] : '',
link_url = '#',
link_title = '',
link_target = '',
custom_class = ( atts['custom_class'] !== undefined ) ? atts['custom_class'] : '',
main_class = [],
link_arr = [];
main_class = kc.front.el_class( atts );
main_class.push( 'kc-pro-button kc-button-' + style );
if ( custom_class !=='' ) {
main_class.push( custom_class );
}
if ( link !== '' ) {
link_arr = link.split('|');
if ( link_arr[0] !== undefined )
link_url = link_arr[0];
else
link_url = '#';
if ( link_arr[1] !== undefined )
link_title = link_arr[1];
if ( link_arr[2] !== undefined )
link_target = link_arr[2];
}
if ( icon_show == 'yes' )
icon_txt = ' <i class="' + icon + '"></i> ';
#>
<div class="{{{main_class.join(' ')}}}">
<a href="{{{link_url}}}" title="{{{link_title}}}" target="{{{link_target}}}">
<#
if ( icon_show == 'yes' && icon_float == 'before' ){ #>
<span class="creative_icon creative_icon_left">{{{icon_txt}}}</span>
<# } #>
<span class="creative_title">{{{title}}}</span>
<#
if ( icon_show == 'yes' && icon_float == 'after' ){ #>
<span class="creative_icon creative_icon_right">{{{icon_txt}}}</span>
<# } #>
</a>
</div>

View File

@@ -0,0 +1,39 @@
<#
var output = '',
atts = ( data.atts !== undefined ) ? data.atts : {},
wrap_class = '',
css_classes = [],
style = ( atts['style'] !== undefined ) ? atts['style'] : '1',
icon = ( atts['icon'] !== undefined ) ? atts['icon'] : '',
line_text = ( atts['line_text'] !== undefined && atts['line_text'] !== '__empty__' ) ? atts['line_text'] : '',
classes = ( atts['class'] !== undefined ) ? atts['class'] : '';
wrap_class = kc.front.el_class( atts );
wrap_class.push('divider_line');
if( classes !== '')
wrap_class.push( classes );
#>
<div class="{{{wrap_class.join(' ')}}}">
<div class="divider_inner divider_line{{{style}}}">
<#
switch ( style ) {
case '2':
if ( icon !== '' ){
#>
<i class="{{{icon}}}"></i>
<# }
break;
case '3':
if ( line_text !== '' ){
#>
<span class="line_text">{{{line_text}}}</span>
<# }
break;
default:
// code...
break;
}
#>
</div>
</div>

View File

@@ -0,0 +1,19 @@
<#
var atts = ( data.atts !== undefined ) ? data.atts : {},
wrap_class = [],
desc = ( atts['desc'] !== undefined ) ? kc.tools.base64.decode( atts['desc'] ) : '',
custom_class = ( atts['custom_class'] !== undefined ) ? atts['custom_class'] : '';
wrap_class = kc.front.el_class( atts );
wrap_class.push('kc-dropcaps');
if ( custom_class !== '' )
wrap_class.push( custom_class );
desc = desc.replace(/^(<[a-zA-Z\s\d=\'\"]+>)(\s*[&nbsp;]*)*([a-zA-Z\d]{1})|^(\s*[&nbsp;]*)*([a-zA-Z\d]{1})|^(<[a-zA-Z\s\d=\'\"]+>)(\s*[&nbsp;]*)*([^\x00-\x7F]{1})|^(\s*[&nbsp;]*)*([^\x00-\x7F]{1})/i, '$1<span class="dropcaps-text">$3$5$8$10</span>');
#>
<div class="{{{wrap_class.join(' ')}}}">
{{{desc}}}
</div>

View File

@@ -0,0 +1,132 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
layout = ( atts['layout'] !== undefined ) ? atts['layout'] : '1',
title = ( atts['title'] !== undefined && atts['title'] !== '__empty__') ? atts['title'] : '',
desc = ( atts['desc'] !== undefined && atts['desc'] !== '__empty__') ? kc.tools.base64.decode( atts['desc']) : '',
icon = ( atts['icon'] !== undefined && atts['icon'] !== '__empty__') ? atts['icon'] : 'et-envelope',
image = ( atts['image'] !== undefined ) ? atts['image'] : '',
position = ( atts['position'] !== undefined && atts['position'] !== '__empty__') ? atts['position'] : '',
show_button = ( atts['show_button'] !== undefined ) ? atts['show_button'] : '',
button_text = ( atts['button_text'] !== undefined && atts['button_text'] !== '__empty__') ? atts['button_text'] : '',
button_link = ( atts['button_link'] !== undefined ) ? atts['button_link'] : '',
custom_class = ( atts['custom_class'] !== undefined ) ? atts['custom_class'] : '',
img_link = '',
but_link_text = '',
data_img = '',
data_icon = '',
data_title = '',
data_desc = '',
data_position = '',
data_button = '',
btn_title = '',
btn_target = '',
wrap_class = [];
wrap_class = kc.front.el_class( atts );
wrap_class.push( 'kc-feature-boxes kc-fb-layout-' + layout );
if ( custom_class !=='' ) {
wrap_class.push( custom_class );
}
if ( image !='' ) {
//image = image.replace( /[^\d]/, '' );
img_link = ajaxurl + '?action=kc_get_thumbn&id=' + image + '&size=full';
data_img += '<figure class="content-image">';
data_img += '<img src="'+ img_link +'" alt="">';
data_img += '</figure>';
}
if ( title !== '' ) {
data_title += '<div class="content-title">'+ title +'</div>';
}
if ( desc !== '' ) {
data_desc += '<div class="content-desc">'+ desc +'</div>';
}
if ( position !== '' ) {
data_position += '<div class="content-position">'+ position +'</div>';
}
data_icon += '<div class="content-icon">';
data_icon += '<i class="'+ icon +'"></i>';
data_icon += '</div>';
if ( show_button == 'yes' ) {
if ( button_link !== '' ) {
but_link_text = button_link.split( '|' );
button_link = but_link_text[0];
}
if( but_link_text[1] !== undefined )
btn_title = but_link_text[1];
if( but_link_text[2] !== undefined )
btn_target = but_link_text[2];
data_button += '<div class="content-button">';
data_button += '<a href="'+ button_link +'" title="' + btn_title + '" target="' + btn_target + '">'+ button_text +'</a>';
data_button += '</div>';
}
#>
<div class="{{{wrap_class.join(' ')}}}">
<#
switch ( layout ) {
case '2':
#>
{{{data_img}}}
{{{data_title}}}
{{{data_desc}}}
{{{data_button}}}
<#
break;
case '3':
#>
{{{data_icon}}}
<div class="box-right">
{{{data_title}}}
{{{data_desc}}}
</div>
<#
break;
case '4':
#>
{{{data_img}}}
<div class="box-right">
{{{data_position}}}
{{{data_title}}}
{{{data_desc}}}
{{{data_button}}}
</div>
<#
break;
case '5':
#>
{{{data_position}}}
{{{data_title}}}
{{{data_desc}}}
{{{data_button}}}
<#
break;
default:
#>
{{{data_icon}}}
{{{data_title}}}
{{{data_desc}}}
{{{data_button}}}
<#
break;
} #>
</div>

View File

@@ -0,0 +1,106 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
text_align = 'center',
image_size = 'full',
back_data = '',
front_data = '',
show_icon = ( atts['show_icon'] !== undefined )? atts['show_icon'] : '',
icon = ( atts['icon'] !== undefined )? atts['icon'] : 'sl-rocket',
title = ( atts['title'] !== undefined )? atts['title'] : '',
description = ( atts['description'] !== undefined )? kc.tools.base64.decode( atts['description'] ) : '',
show_button = ( atts['show_button'] !== undefined )? atts['show_button'] : '',
text_on_button = ( atts['text_on_button'] !== undefined )? atts['text_on_button'] : '',
direction = ( atts['direction'] !== undefined )? atts['direction'] : '',
wrap_class = ( atts['wrap_class'] !== undefined )? atts['wrap_class'] : '',
b_show_icon = ( atts['b_show_icon'] !== undefined )? atts['b_show_icon'] : '',
b_icon = ( atts['b_icon'] !== undefined )? atts['b_icon'] : '',
b_title = ( atts['b_title'] !== undefined )? atts['b_title'] : '',
b_description = ( atts['b_description'] !== undefined )? kc.tools.base64.decode( atts['b_description'] ) : '',
b_show_button = ( atts['b_show_button'] !== undefined )? atts['b_show_button'] : '',
b_text_on_button = ( atts['b_text_on_button'] !== undefined )? atts['b_text_on_button'] : '',
b_link = ( atts['b_link'] !== undefined )? atts['b_link'] : '',
btn_title = '',
btn_target = '',
but_link_text = '',
button_link = '',
image_data = kc_url + '/assets/images/get_start.jpg',
element_atttribute = [],
el_classess = [];
el_classess = kc.front.el_class( atts );
el_classess.push( 'kc-flipbox' );
el_classess.push( 'kc-flip-container' );
if ( wrap_class !== '' )
el_classess.push( wrap_class );
if( direction !== '' && direction === 'vertical' )
el_classess.push( 'flip-' + direction );
element_atttribute.push( 'class="' + el_classess.join(' ') + '"' );
element_atttribute.push( 'ontouchstart="this.classList.toggle(\'hover\');"' );
// Front Side Data
if( show_icon === 'yes' && icon !=='' )
front_data += '<div class="wrap-icon"><i class="' + icon + '"></i></div>';
if( title !== '' )
front_data += '<h3>' + title + '</h3>';
if( description !== '' )
front_data += '<p>' + kc.front.do_shortcode( description ) + '</p>';
// Back Side Data
if( b_show_icon == 'yes' && b_icon !== '' )
back_data += '<div class="wrap-icon"><i class="' + b_icon + '"></i></div>';
if( b_title !== '')
back_data += '<h3>' + b_title + '</h3>';
if( b_description !== '' )
back_data += '<p>' + kc.front.do_shortcode( b_description ) + '</p>';
if( b_show_button == 'yes' ){
if ( b_text_on_button == '' )
b_text_on_button = "<?php echo __( 'Read more', 'kingcomposer' );?>";
if ( b_link !== '' ) {
but_link_text = b_link.split( '|' );
button_link = but_link_text[0];
}
if( but_link_text[1] !== undefined )
btn_title = but_link_text[1];
if( but_link_text[2] !== undefined )
btn_target = but_link_text[2];
back_data += '<a class="button" href="' + button_link + ' title="' + btn_title + '" target="' + btn_target + '">' + b_text_on_button + '</a>';
}
#>
<div {{{element_atttribute.join(' ')}}}>
<div class="flipper">
<div class="front">
<div class="front-content">
{{{front_data}}}
</div>
</div>
<div class="back">
<div class="des">
{{{back_data}}}
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,70 @@
<#
if( data === undefined )
data = {};
var output = '',
contact_form = '',
map_location = '',
map_height = '250px',
contact_position = 'left',
element_attributes = [], map_attributes = [],
atts = ( data.atts !== undefined ) ? data.atts : {};
var css_classes = [];
css_classes = kc.front.el_class( atts );
css_classes.push( 'kc_google_maps' );
css_classes.push( 'kc_shortcode' );
if( atts['contact_position'] !== undefined && atts['contact_area_position'] != '' )
contact_position = atts['contact_area_position'];
if( atts['wrap_class'] !== undefined && atts['wrap_class'] !== '' )
css_classes.push( atts['wrap_class'] );
element_attributes.push( 'class="'+ css_classes.join(' ') +'"' );
if( atts['title'] !== undefined && atts['title'] !== '' ){
output += '<h3 class="map_title">'+ atts['title'] +'</h3>';
}
//Contact form on maps
if( atts['show_ocf'] !== undefined && 'yes' == atts['show_ocf'] ){
if( atts['contact_form_sc'] !== undefined && atts['contact_form_sc'] != '' ){
contact_form += '<div class="map_popup_contact_form '+ contact_position +'">';
contact_form += '<a class="close" href="javascript:;"><i class="sl-close"></i></a>';
contact_form += kc.tools.base64.decode(atts['contact_form_sc']);
contact_form += '</div>';
contact_form += '<a class="show_contact_form" href="javascript:;"><i class="fa fa-bars"></i></a>';
}
}
map_attributes.push( 'class="kc-google-maps"' );
map_attributes.push( 'style="height: '+ parseInt(atts['map_height']) +'px"' );
if( atts['disable_wheel_mouse'] !== undefined && atts['disable_wheel_mouse'] != '' ){
map_attributes.push( 'data-wheel="disable"' );
}
map_location = '<div style="width: 100%;height:'+atts['map_height']+';" class="disable-view-element"><h3>For best perfomance, the map has been disabled in this editing mode.</h3></div>';
output += '<div '+ element_attributes.join(' ') +'>'+ contact_form +'<div '+ map_attributes.join(' ') +'>'+ map_location +'</div></div>';
#>
<div {{{element_attributes.join(' ')}}}>
{{{contact_form}}}
<div {{{map_attributes.join(' ')}}}>{{{map_location}}}</div>
</div>
<#
data.callback = function( wrp, $ ){
kc_front.google_maps( wrp.parent() );
}
#>

View File

@@ -0,0 +1,55 @@
<#
if( typeof( data ) == 'undefined' )
data = {};
var output = '',
icon_wrap_class = '',
class_icon = [],
atts = ( data.atts !== undefined ) ? data.atts : {},
icon = ( atts['icon'] !== undefined )? atts['icon'] : '',
link = ( atts['link'] !== undefined )? atts['link'] : '||',
use_link = ( atts['use_link'] !== undefined )? atts['use_link'] : '',
has_link = false,
icon_link_attr = [];
css_class = kc.front.el_class( atts );
css_class.push( 'kc-icon-wrapper' );
if ( atts['icon_wrap_class'] !== undefined && atts['icon_wrap_class'] !== '' )
css_class.push( atts['icon_wrap_class'] );
if( icon === '' )
icon = 'fa-leaf';
class_icon.push( icon );
if ( atts['class'] !== undefined )
class_icon.push( atts['class'] );
if( use_link == 'yes' ){
link = link.split('|');
if( link[0] !== undefined ){
icon_link_attr.push( 'href="' + link[0] + '"' );
has_link = true;
}
if( link[1] !== undefined )
icon_link_attr.push( 'title="' + link[1] + '"' );
if( link[2] !== undefined )
icon_link_attr.push( 'target="' + link[2] + '"' );
}
#>
<div class="{{{css_class.join(' ')}}}">
<# if( has_link === true ){ #>
<a {{{icon_link_attr.join(' ')}}}>
<# } #>
<i class="{{{class_icon.join(' ')}}}"></i>
<# if( has_link === true ){ #>
</a>
<# } #>
</div>

View File

@@ -0,0 +1,103 @@
<#
var output = '',
classes = ['image_fadein'],
css_class = [],
attributes = [],
_images = [],
atts = ( data.atts !== undefined ) ? data.atts : {},
title = ( atts['title'] !== undefined ) ? atts['title'] : '',
images = ( atts['images'] !== undefined ) ? atts['images'] : '',
transition = ( atts['images'] !== undefined ) ? atts['transition'] : '',
delay = ( atts['delay'] !== undefined ) ? atts['delay'] : '',
force_size = ( atts['force_size'] !== undefined ) ? atts['force_size'] : '',
width = ( atts['width'] !== undefined ) ? atts['width'] : '',
height = ( atts['height'] !== undefined ) ? atts['height'] : '',
position = ( atts['position'] !== undefined ) ? atts['position'] : '',
wrap_class = ( atts['wrap_class'] !== undefined ) ? atts['wrap_class'] : '';
css_class = kc.front.el_class( atts );
wrap_class = wrap_class + ' ' + css_class.join( ' ' );
if( images === '' )
images = [];
else
images = images.split(',');
for( var i =0; i < images.length; i++) {
image_id = images[i];
image = ajaxurl + "?action=kc_get_thumbn&size=full&id=" + image_id;
if( image !== undefined && image !== '' ){
if( force_size !== undefined && force_size == 'yes' ){
var att = ['250', '250', 'c'], image_size = '';
if( width !== '' )
att[0] = width;
if( height !== '' )
att[1] = height;
if( position !== '' )
att[2] = position;
image_size = att.join('x');
_images.push( ajaxurl + "?action=kc_get_thumbn_size&id="+image_id+'&size='+image_size);
}
else _images.push( image );
}
}
if( transition !== '' )
classes.push( transition );
if( delay !== '' )
attributes.push( 'data-delay="' + delay + '"');
attributes.push( 'class="' + classes.join(' ') + '"');
attributes.push( 'data-images="' + images + '"');
#>
<div class="image_fadein_slider {{{wrap_class}}}">
<#
if( title !== '' ){
#>
<h3>{{{title}}}</h3>
<#
}
#>
<div {{{attributes.join(' ')}}}>
<#
if( _images.length == 0 ){
#>
<h3><?php echo __('Images Fadein Gallery: No images found', 'kingcomposer' );?></h3>
<#
}else{
for( var i =0; i < _images.length; i++ ){
image = _images[i];
#>
<img src="{{{image}}}" />
<#
}
}
#>
</div>
</div>
<#
data.callback = function( wrp, $){
kc_front.image_fade();
}
#>

View File

@@ -0,0 +1,131 @@
<#
var output = '', atts = ( data.atts !== undefined ) ? data.atts : {},
custom_links = ( atts['custom_links'] !== undefined ) ? atts['custom_links'] : '',
click_action = ( atts['click_action'] !== undefined ) ? atts['click_action'] : 'none',
wrap_class = ( atts['wrap_class'] !== undefined ) ? atts['wrap_class'] : '',
type = ( atts['type'] !== undefined ) ? atts['type'] : '',
image_size = ( atts['image_size'] !== undefined ) ? atts['image_size'] : '',
images = ( atts['images'] !== undefined ) ? atts['images'] : '',
title = ( atts['title'] !== undefined ) ? atts['title'] : '',
columns = ( atts['columns'] !== undefined && atts['columns'] !== '__empty__' ) ? atts['columns'] : '4',
type_class = '',
slider_item_start = '',
slider_item_end = '',
attachment_data = [],
wrp_class = [],
attachment_data_full = [],
custom_links_arr = [],
element_attribute = [], el_classess = [ ],
sizes = ['full', 'thumbnail', 'medium', 'large'];
type_class = 'kc-grid';
if( custom_links !== '' && 'custom_link' === click_action ) {
custom_links = custom_links.replace('/[\r\n]+/',"\n").replace('/^\n/','').replace('/\n$/','');
custom_links_arr = custom_links.split('\n');
}
wrp_class = kc.front.el_class( atts );
wrp_class = wrp_class.join( ' ' );
el_classess = ['kc_image_gallery',
type_class,
wrap_class];
if( images === '' )
images = [];
else
images = images.split(',');
element_attribute.push( 'class="' + el_classess.join(' ') + '"');
element_attribute.push( 'data-type="' + type + '"');
if( type == 'image_masonry' )
element_attribute.push('data-image_masonry="yes"');
else
element_attribute.push('data-image_masonry=""');
for ( var i=0; i < images.length; i++ ){
image_id = images[i];
if ( sizes.indexOf( image_size ) > -1 ) {
attachment_data.push( ajaxurl + '?action=kc_get_thumbn&id=' + image_id + '&size=' + image_size );
}else if( image_size.indexOf('x') > 0 ){
attachment_data.push( ajaxurl + '?action=kc_get_thumbn_size&id=' + image_id + '&size=' + image_size );
}else{
attachment_data.push( ajaxurl + '?action=kc_get_thumbn&id=' + image_id + '&size=full');
}
attachment_data_full.push( ajaxurl + "?action=kc_get_thumbn&size=full&id="+image_id );
}
if( attachment_data[0] === undefined || attachment_data[0] ==='' ){
output += '<h3 class="kc-image-gallery-title">Images Gallery: No images found</h3>';
}else{
var pretty_id = parseInt(Math.random()*100000);
for( var i=0; i< attachment_data.length; i++){
var image = attachment_data[i];
switch( click_action ){
case 'none':
output += '<div class="item-grid grid-' + columns + '"><img src="' + image + '" /></div>';
break;
case 'large_image':
output += '<div class="item-grid grid-' + columns + '"><a href="' + attachment_data_full[i] + '" target="_blank">';
output += '<img src="' + image + '" /></a></div>';
break;
case 'lightbox':
output += '<div class="item-grid grid-' + columns + '"><a class="kc-image-link kc-pretty-photo" data-lightbox="kc-lightbox" rel="kc-pretty-photo['+pretty_id+']" href="' + attachment_data_full[i] + '">';
output += '<img src="' + image + '" /></a></div>';
break;
case 'custom_link':
if( custom_links_arr[i] !== undefined ){
output += '<div class="item-grid grid-' + columns + '"><a href="' + custom_links_arr[i] + '" target="_blank">';
output += '<img src="'+ image + '" /></a></div>';
}else{
output += '<div class="item-grid grid-' + columns + '"><img src="' + image + '" /></div>';
}
break;
}
}
}
#>
<div class="kc-image-gallery {{{wrp_class}}}">
<# if( title !== '' ){#>
<h3 class="kc-title image-gallery-title">{{{title}}}</h3>
<# } #>
<div {{{element_attribute.join(' ')}}}>
{{{output}}}
</div>
</div>
<#
data.callback = function( wrp, $){
if( wrp.find(".kc_image_gallery").data("type") == 'image_masonry' )
kc_front.image_gallery.masonry( wrp );
}
#>

View File

@@ -0,0 +1,191 @@
<#
if( data === undefined )
var data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
layout = ( atts['layout'] !== undefined )? atts['layout'] : '1',
title = ( atts['title'] !== undefined && atts['title'] !== '__empty__')? atts['title'] : '',
desc = ( atts['desc'] !== undefined && atts['desc'] !== '__empty__') ? kc.tools.base64.decode( atts['desc']) : '',
image = ( atts['image'] !== undefined )? atts['image'] : '',
event_click = ( atts['event_click'] !== undefined )? atts['event_click'] : '',
custom_link = ( atts['custom_link'] !== undefined )? atts['custom_link'] : '||',
button_text = ( atts['button_text'] !== undefined )? atts['button_text'] : '',
button_link = ( atts['button_link'] !== undefined )? atts['button_link'] : '||',
icon = ( atts['icon'] !== undefined )? atts['icon'] : 'fa-star',
custom_class = ( atts['custom_class'] !== undefined )? atts['custom_class'] : '',
img_size = ( atts['img_size'] !== undefined )? atts['img_size'] : '1170x700xct',
img_url = '',
link_url = '',
link_title = '',
link_target = '',
before_url = '',
after_url = '',
data_img = '',
data_title = '',
data_desc = '',
data_button = '',
button_attr = [],
img_arr = [],
link_arr = [],
wrap_class = kc.front.el_class( atts );
wrap_class.push( 'kc-image-hover-effects kc-img-effects-' + layout );
if ( custom_class !== '' )
wrap_class.push( custom_class );
if ( image != '' ) {
//image = image.replace( /[^\d]/, '' );
if ( img_size !== 'full' ) {
img_link = ajaxurl + '?action=kc_get_thumbn_size&id=' + image + '&size=' + img_size ;
img_full = ajaxurl + '?action=kc_get_thumbn&id=' + image + '&size=full' ;
} else {
img_link = ajaxurl + '?action=kc_get_thumbn&size=full&id=' + image;
img_full = img_link;
}
} else {
img_link = kc_url + "/assets/images/get_start.jpg";
img_full = kc_url + "/assets/images/get_start.jpg";
}
if ( custom_link !== '' ) {
img_arr = custom_link.split('|');
if ( img_arr[0] !== '' ) {
img_url = img_arr[0];
} else {
img_url = '#';
}
} else {
img_url = '#';
}
if ( button_link !== '' ) {
link_arr = button_link.split('|');
if( link_arr[0] !== undefined )
link_url = link_arr[0];
else
link_url = '#';
if ( link_arr[1] !== undefined )
link_title = link_arr[1];
if ( link_arr[2] !== undefined )
link_target = link_arr[2];
} else {
link_url = '#';
}
button_attr.push( 'href="' + link_url + '"' );
if ( link_title !== '' )
button_attr.push( 'title="' + link_title + '"' );
if ( link_target !== '' )
button_attr.push( 'target="' + link_target + '"' );
switch ( event_click ) {
case 'none':
data_img = '<figure><img src="' + img_link + '" alt=""/></figure>';
break;
case 'custom_link':
data_img = '<a href="' + img_url + '"><img src="' + img_link + '" alt=""/></a>';
before_url = '<a href="' + img_url + '">';
after_url = '</a>';
break;
default:
data_img = '<a href="' + img_full + '" rel="prettyPhoto" class="kc-pretty-photo"><img src="' + img_link + '" alt=""/></a>';
before_url = '<a href="' + img_full + '" rel="prettyPhoto" class="kc-pretty-photo">';
after_url = '</a>';
break;
}
if ( title !== '' ) {
data_title = '<div class="content-title">' + title + '</div>';
}
if ( desc !== '' ) {
data_desc = '<div class="content-desc">' + desc + '</div>';
}
if ( button_text !== '' ) {
data_button = '<div class="content-button"><a ' + button_attr.join(' ') + '>' + button_text + '</a></div>';
}
#>
<div class="{{{wrap_class.join(' ')}}}">
<# switch ( layout ) {
case '2':
#>
{{{data_img}}}
{{{before_url}}}
<div class="overlay-effects">
{{{data_title}}}
{{{data_desc}}}
</div>
{{{after_url}}}
<#
break;
case '3':
#>
{{{data_img}}}
{{{before_url}}}
<div class="overlay-effects">
<div class="overlay-content">
{{{data_title}}}
{{{data_desc}}}
</div>
</div>
{{{after_url}}}
<#
break;
case '4':
#>
{{{data_img}}}
<div class="overlay-effects">
{{{data_title}}}
{{{data_desc}}}
{{{data_button}}}
</div>
<#
break;
case '5':
#>
{{{data_img}}}
{{{before_url}}}
<div class="overlay-effects">
<i class="{{{icon}}}"></i>
</div>
{{{after_url}}}
<#
break;
default:
#>
{{{data_img}}}
{{{before_url}}}
<div class="overlay-effects">
{{{data_title}}}
</div>
{{{after_url}}}
<#
break;
} #>
</div>
<#
data.callback = function( wrp, $ ){
kc_front.single_img.refresh( wrp );
}
#>

View File

@@ -0,0 +1,78 @@
<#
if( typeof( data ) == 'undefined' )
data = {};
var output = '',
icon_wrap_class = '',
atts = ( data.atts !== undefined ) ? data.atts : {},
custom_class = ( atts['custom_class'] !== undefined )? atts['custom_class'] : '',
has_link = false,
icon = label = link = link_title = link_target = link_url = color = bg_color = style = '',
css_class = kc.front.el_class( atts ),
link_attr = [];
try{
var icons = JSON.parse( kc.tools.base64.decode( atts['icons'] ).toString().replace( /\%SITE\_URL\%/g, kc_site_url ) );
}catch(ex){
var icons = atts['icons'];
}
css_class.push( 'kc-multi-icons-wrapper' );
if( custom_class !== '')
css_class.push( custom_class );
#>
<div class="{{{css_class.join(' ')}}}">
<#
for( var i in icons ){
item = icons[i];
link_att = [];
icon_att = [];
icon = item['icon'];
label = item['label'];
color = item['color'];
bg_color = item['bg_color'];
link = ( item['link'] !== undefined )? item['link'] : '||';
if( icon == '' )
icon = 'fa-leaf';
link = link.split('|');
link_target = '_blank';
link_url = '#';
link_title = label;
if( link[0] !== undefined && link[0] !== '' ){
link_url = link[0];
}
if( link[1] !== undefined && link[1] !== '' )
link_title = link[1];
if( link[2] !== undefined && link[2] !== '' )
link_target = link[2];
link_att.push( 'href="' + link_url + '"' );
link_att.push( 'target="' + link_target + '"' );
link_att.push( 'title="' + link_title + '"' );
link_att.push( 'class="multi-icons-link multi-icons' + icon + '"' );
style = '';
icon_att.push('class="' + icon + '"');
if( color !== '' )
icon_att.push('style="color:' + color + ';"');
if( bg_color !== '' )
link_att.push( 'style="background-color:' + bg_color + ';"' );
#>
<a {{{link_att.join(' ')}}}>
<i {{{icon_att.join(' ')}}}></i>
</a>
<# } #>
</div>

View File

@@ -0,0 +1,107 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
custom_class = 'piechart_'+parseInt( Math.random()*1000000 ),
custom_size = 120,
barcolor = '#39c14f',
trackcolor = '#e4e4e4',
percent = 85,
rounded_corners_bar = '',
icon_option = '',
title = '',
description = '',
wrap_class = '',
tmp_class = '',
element_attributes = [],
size = 120,
auto_width = 'no',
linewidth = 10,
css_classes = [ 'kc_shortcode', 'kc_piechart', custom_class ],
icon = '';
tmp_class = kc.front.el_class( atts );
tmp_class.push( wrap_class );
wrap_class = tmp_class.join( ' ' );
if( atts['title'] !== undefined && atts['title'] !== '' )
title = '<h3>' + atts['title'] + '</h3>';
if( atts['icon'] !== undefined && atts['icon'] !== '' )
icon = atts['icon'];
if( atts['icon_option'] !== undefined && atts['icon_option'] !== '' )
icon_option = atts['icon_option'];
if( atts['description'] !== undefined && atts['description'] !== '' )
description = '<p>' + kc.tools.base64.decode( atts['description'] ) + '</p>';
if( atts['percent'] !== undefined && atts['percent'] !== '' )
percent = atts['percent'];
if( atts['linewidth'] !== undefined && atts['linewidth'] !== '' )
linewidth = atts['linewidth'];
if( atts['rounded_corners_bar'] !== undefined && atts['rounded_corners_bar'] !== '' )
rounded_corners_bar = atts['rounded_corners_bar'];
if( atts['custom_size'] !== undefined && atts['custom_size'] !== '' )
custom_size = atts['custom_size'];
if( atts['barcolor'] !== undefined && atts['barcolor'] !== '' )
barcolor = atts['barcolor'];
if( atts['trackcolor'] !== undefined && atts['trackcolor'] !== '' )
trackcolor = atts['trackcolor'];
if( atts['wrap_class'] !== undefined && atts['wrap_class'] !== '' )
wrap_class = atts['wrap_class'];
if( atts['size'] !== undefined && atts['size'] !== '' && atts['size'] !== 'custom' )
size = atts['size'];
else
size = custom_size;
if( size > 1000 )
size = 1000;
if( atts['auto_width'] !== undefined && atts['auto_width'] == 'yes' )
{
auto_width = 'yes';
css_classes.push( 'auto_width' );
}
element_attributes.push( 'data-size="' + size + '"' );
element_attributes.push( 'data-percent="' + percent + '"' );
element_attributes.push( 'data-linecap="' + rounded_corners_bar + '"' );
element_attributes.push( 'data-barcolor="' + barcolor + '"' );
element_attributes.push( 'data-trackcolor="' + trackcolor + '"' );
element_attributes.push( 'data-autowidth="' + auto_width + '"' );
element_attributes.push( 'data-linewidth="' + linewidth + '"' );
element_attributes.push( 'class="' + css_classes.join(' ') + '"' );
var lineHeight = parseInt(size) + (parseInt( linewidth )*2 );
#>
<div class="kc-pie-chart-wrapper {{wrap_class}}">
<div class="kc-pie-chart-holder">
<span {{{element_attributes.join(' ')}}}>
<span class="pie_chart_percent">
<# if( icon_option == 'yes' ){ #>
<i class="{{{icon}}} pie_chart_icon"></i>
<# } #>
<span class="percent"></span>
</span>
</span>
</div>
</div>
<#
data.callback = function( wrp, $ ){
kc_front.piechar.update( wrp );
}
#>

View File

@@ -0,0 +1,218 @@
<#
if( data === undefined )
var data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
desc = ( atts['desc'] !== undefined )? kc.tools.base64.decode( atts['desc'] ) : '',
show_icon_header = ( atts['show_icon_header'] !== undefined )? atts['show_icon_header'] : '',
icon_header = ( atts['icon_header'] !== undefined && atts['icon_header'] !== '__empty__' )? atts['icon_header'] : 'fa-rocket',
price = ( atts['price'] !== undefined )? atts['price'] : '',
title = ( atts['title'] !== undefined && atts['title'] !== '__empty__' )? atts['title'] : '',
subtitle = ( atts['subtitle'] !== undefined && atts['subtitle'] !== '__empty__' )? atts['subtitle'] : '',
el_class = ( atts['custom_class'] !== undefined )? atts['custom_class'] : '',
currency = ( atts['currency'] !== undefined )? atts['currency'] : '',
show_on_top = ( atts['show_on_top'] !== undefined )? atts['show_on_top'] : '',
duration = ( atts['duration'] !== undefined )? atts['duration'] : '',
show_icon = ( atts['show_icon'] !== undefined )? atts['show_icon'] : '',
icon = ( atts['icon'] !== undefined && atts['icon'] !== '__empty__')? atts['icon'] : 'fa-check',
button_text = ( atts['button_text'] !== undefined )? atts['button_text'] : '||',
show_button = ( atts['show_button'] !== undefined )? atts['show_button'] : '||',
button_link = ( atts['button_link'] !== undefined )? atts['button_link'] : '||',
layout = ( atts['layout'] !== undefined )? atts['layout'] : '1',
link_url = '#',
data_icon_header = '',
data_title = '',
data_price = '',
data_currency = '',
data_duration = '',
data_desc = '',
data_button = '',
link_arr = [],
wrap_class = kc.front.el_class( atts );
wrap_class.push( 'kc-pricing-tables');
wrap_class.push( 'kc-pricing-layout-' + layout );
if ( el_class !== '' )
wrap_class.push( el_class );
if ( show_on_top === 'yes' )
wrap_class.push( 'kc-price-before-currency' );
if ( show_icon_header === 'yes' ) {
data_icon_header += '<div class="content-icon-header">';
data_icon_header += '<i class="' + icon_header + '"></i>';
data_icon_header += '</div>';
}
if ( title !== '' ) {
data_title += '<div class="content-title">';
if ( subtitle !== '' ) {
data_title += '<div>' + title + '</div>';
data_title += '<div class="content-sub-title">' + subtitle + '</div>';
} else {
data_title += title;
}
data_title += '</div>';
}
if ( price !== '' ) {
data_price += '<span class="content-price">' + price + '</span>';
}
if ( currency !=='' ) {
data_currency += '<span class="content-currency">' + currency + '</span>';
}
if ( duration !== '' ) {
data_duration += '<span class="content-duration">' + duration + '</span>';
}
if ( desc !== '' ) {
var pros = desc.split("\n");
if( pros.length > 0 ) {
data_desc += '<ul class="content-desc">';
for( var i=0; i < pros.length ; i++) {
if ( show_icon === 'yes' ) {
data_desc += '<li><i class="' + icon + '"></i> ' + pros[i] + ' </li>';
} else {
data_desc += '<li>' + pros[i] + ' </li>';
}
}
data_desc += '</ul>';
}
}
if ( show_button === 'yes' ) {
if ( button_link !== '' ) {
link_arr = button_link.split('|');
if ( link_arr[0] !== undefined )
link_url = link_arr[0];
else
link_url = '#';
}
data_button += '<div class="content-button">';
data_button += '<a href="' + link_url + '">' + button_text + '</a>';
data_button += '</div>';
}
#>
<div class="{{{wrap_class.join(' ')}}}">
<#
switch ( parseInt( layout ) ) {
case 2:
#>
<div class="header-pricing">
{{{data_title}}}
<div class="kc-pricing-price">
<# if ( show_on_top === 'yes' ) { #>
{{{data_price}}}
{{{data_currency}}}
{{{data_duration}}}
<# } else { #>
{{{data_currency}}}
{{{data_price}}}
{{{data_duration}}}
<# } #>
</div>
</div>
{{{data_desc}}}
{{{data_button}}}
<#
break;
case 3:
#>
{{{data_title}}}
{{{data_desc}}}
<div class="kc-pricing-price">
<# if ( show_on_top === 'yes' ) { #>
{{{data_price}}}
{{{data_currency}}}
{{{data_duration}}}
<# } else { #>
{{{data_currency}}}
{{{data_price}}}
{{{data_duration}}}
<# } #>
</div>
{{{data_button}}}
<#
break;
case 4:
#>
<div class="header-pricing">
{{{data_icon_header}}}
{{{data_title}}}
<div class="kc-pricing-price">
<# if ( show_on_top === 'yes' ) { #>
{{{data_price}}}
{{{data_currency}}}
{{{data_duration}}}
<# } else { #>
{{{data_currency}}}
{{{data_price}}}
{{{data_duration}}}
<# } #>
</div>
</div>
{{{data_desc}}}
{{{data_button}}}
<#
break;
default:
#>
<div class="header-pricing">
{{{data_title}}}
{{{data_icon_header}}}
<div class="kc-pricing-price">
<# if ( show_on_top === 'yes' ) { #>
{{{data_price}}}
{{{data_currency}}}
{{{data_duration}}}
<# } else { #>
{{{data_currency}}}
{{{data_price}}}
{{{data_duration}}}
<# } #>
</div>
</div>
{{{data_desc}}}
{{{data_button}}}
<#
}
#>
</div>

View File

@@ -0,0 +1,112 @@
<#
var output = '',
element_attributes = [], el_classes = [ ],
atts = ( data.atts !== undefined ) ? data.atts : {},
radius = '',
speed = 2000,
margin = 20,
progress_bar_color_default = '#999999',
value_color_style = '',
label_color_style = '';
el_classes = kc.front.el_class( atts );
el_classes.push( 'kc_shortcode' );
el_classes.push( 'kc_progress_bars' );
if( atts['wrap_class'] !== undefined && atts['wrap_class'] !== '' )
el_classes.push( atts['wrap_class'] );
if( atts['radius'] !== undefined && atts['radius'] !== '' )
radius = atts['radius'];
if( atts['speed'] !== undefined && atts['speed'] !== '' )
speed = atts['speed'];
var style = ( atts['style'] !== undefined ) ? atts['style'] : 1;
try{
var options = JSON.parse( kc.tools.base64.decode( atts['options'] ).toString().replace( /\%SITE\_URL\%/g, kc_site_url ) );
}catch(ex){
var options = atts['options'];
}
element_attributes.push( 'class="'+el_classes.join(' ')+'"' );
element_attributes.push( 'data-style="'+style+'"' );
output += '<div ' + element_attributes.join(' ') + '>';
if( atts['title'] !== undefined && atts['title'] !== '' )
output += '<h3>'+atts['title']+'</h3>';
if( options !== null ){
for( var n in options ){
var value = ( options[n]['value'] !== undefined && options[n]['value'] !== '' ) ? options[n]['value'] : 50,
label = ( options[n]['label'] !== undefined && options[n]['label'] !== '' ) ? options[n]['label'] : 'Label default',
prob_color = ( options[n]['prob_color'] !== undefined && options[n]['prob_color'] !== '' ) ? options[n]['prob_color'] : '',
prob_style = '',
value_color_style = '';
if( prob_color != '')
{
prob_style += 'background-color: '+prob_color+';';
}
prob_style += 'width: '+atts['progress_animate']+'%';
if( options[n]['value_color'] !== undefined && options[n]['value_color'] !== '' ){
value_color_style = ' style="color: '+options[n]['value_color']+'"';
}
prob_track_attributes = [];
prob_attributes = [];
//Progress bars track attributes
prob_track_css_classes = [
'kc-ui-progress-bar',
'kc-ui-progress-bar'+style,
'kc-progress-bar',
'kc-ui-container',
];
if( radius == 'yes' )
prob_track_css_classes.push( 'kc-progress-radius' );
prob_track_attributes.push( 'class="'+prob_track_css_classes.join(' ')+'"' );
//Progress bars attributes
prob_css_classes = [ 'kc-ui-progress', 'kc-ui-progress'+style ];
var prob_css_class = prob_css_classes.join(' ');
prob_attributes.push( 'class="'+prob_css_class+'"' );
prob_attributes.push( 'style="'+prob_style+'"' );
output +='<div class="progress-item">';
output += '<span class="label">'+label+'</span>';
output += '<div '+prob_track_attributes.join(' ')+'>';
output += '<div '+prob_attributes.join(' ')+' data-value="'+value+'" data-speed="'+speed+'">';
output += '<div class="ui-label"><span class="value" '+value_color_style+'>'+value+'%</span></div>';
output += '</div>';
output += '</div>';
output += '</div>';
}
}
output += '</div>';
data.callback = function( wrp, $ ){
kc_front.refresh( wrp );
}
#>
{{{output}}}

View File

@@ -0,0 +1,108 @@
<#
if( data === undefined )
data = {};
var attributes = [], classes = [],
cont_class = ['kc-row-container'],
css_data = '', output = '',
atts = ( data.atts !== undefined ) ? data.atts : {};
classes = kc.front.el_class( atts );
classes.push( 'kc_row' );
if( atts['row_class'] !== undefined && atts['row_class'] !== '' )
classes.push( atts['row_class'] );
if( atts['full_height'] !== undefined && atts['full_height'] !== '' ){
if( atts['content_placement'] !== undefined && atts['content_placement'] == 'middle' )
attributes.push( 'data-kc-fullheight="middle-content"' );
else attributes.push( 'data-kc-fullheight="true"' );
}
if( atts['column_align'] === undefined || atts['column_align'] === '' )
atts['column_align'] = 'center';
if( atts['equal_height'] !== undefined && atts['equal_height'] !== '' ){
attributes.push( 'data-kc-equalheight="true"' );
attributes.push( 'data-kc-equalheight-align="' + atts['column_align'] + '"' );
}
if( atts['use_container'] !== undefined && atts['use_container'] == 'yes' )
cont_class.push( 'kc-container' );
if( atts['container_class'] !== undefined && atts['container_class'] !== '' )
cont_class.push( atts['container_class'] );
if( atts['css'] !== undefined && atts['css'] !== '' )
classes .push( atts['css'].split('|')[0] );
if( atts['video_bg'] !== undefined && atts['video_bg'] === 'yes' ){
var video_bg_url = atts['video_bg_url'];
if( atts['video_bg_url'] !== undefined ){
classes.push('kc-video-bg');
attributes.push('data-kc-video-bg="'+atts['video_bg_url']+'"');
css_data += 'position: relative;';
if( atts['video_options'] !== undefined ){
attributes.push('data-kc-video-options="'+atts['video_options']+'"');
}
}
}
if( atts['row_id'] !== undefined && atts['row_id'] !== '' )
attributes.push( 'id="'+atts['row_id']+'"' );
if( atts['force'] !== undefined && atts['force'] == 'yes' ){
if( atts['use_container'] !== undefined && atts['use_container'] == 'yes' )
attributes.push( 'data-kc-fullwidth="row"' );
else
attributes.push( 'data-kc-fullwidth="content"' );
}
if( atts['video_bg_url'] === undefined || atts['video_bg'] !== 'yes' )
{
if( atts['parallax'] !== undefined )
{
attributes.push( 'data-kc-parallax="true"' );
if( atts['parallax'] == 'yes-new' )
{
var bg_image = '<?php echo admin_url('/admin-ajax.php?action=kc_get_thumbn&size=full&id='); ?>'+atts['parallax_image'];
css_data += "background-image:url('"+bg_image+"');";
}
}
}
attributes.push( 'class="'+classes.join(' ')+'"' );
if( css_data !== '' )
attributes.push( 'style="'+css_data+'"' );
output += '<section '+attributes.join(' ')+'>';
output += '<div class="'+cont_class.join(' ')+'">';
output += '<div class="kc-wrap-columns">'+data.content+'</div>';
output += '</div>';
output += '</section>';
data.callback = function( wrp, $ ){
kc_front.init( wrp );
}
#>
{{{output}}}

View File

@@ -0,0 +1,62 @@
<#
var output = '', atts = ( data.atts !== undefined ) ? data.atts : {},
css_classes = [], attributes = [];
css_classes = kc.front.el_class( atts );
css_classes.push( 'kc_row' );
css_classes.push( 'kc_row_inner' );
if( undefined !== atts['row_class'] && atts['row_class'] !== '' )
css_classes.push( atts['row_class'] );
if( atts['css'] !== undefined && atts['css'] !== '' )
css_classes.push( atts['css'].split('|')[0] );
if( undefined !== atts['row_id'] && atts['row_id'] !== '' )
attributes.push( 'id="'+atts['row_id']+'"' );
if( atts['video_bg'] !== undefined && atts['video_bg'] === 'yes' ){
var video_bg_url = atts['video_bg_url'];
if( atts['video_bg_url'] !== undefined ){
css_classes.push('kc-video-bg');
attributes.push('data-kc-video-bg="'+atts['video_bg_url']+'"');
if( atts['video_options'] !== undefined ){
attributes.push('data-kc-video-options="'+atts['video_options']+'"');
}
}
}
attributes.push( 'class="'+css_classes.join(' ')+'"' );
if( atts['column_align'] === undefined || atts['column_align'] === '' )
atts['column_align'] = 'center';
if( undefined !== atts['equal_height'] && atts['equal_height'] !== '' )
{
attributes.push( 'data-kc-equalheight="true"' );
attributes.push( 'data-kc-row-action="true"' );
attributes.push( 'data-kc-equalheight-align="' + atts['column_align'] + '"' );
}
output += '<div '+attributes.join(' ')+'>';
if( undefined !== atts['row_class_container'] && atts['row_class_container'] !== '' )
output += '<div class="'+atts['row_class_container']+'">';
output += data.content;
if( undefined !== atts['row_class_container'] && atts['row_class_container'] !== '' )
output += '</div>';
output += '</div>';
#>
{{{output}}}

View File

@@ -0,0 +1,91 @@
<#
if( data === undefined )
data = {};
var attributes = [], classes = [],
cont_class = ['kc-row-container'],
css_data = '', output = '',
atts = ( data.atts !== undefined ) ? data.atts : {};
classes = kc.front.el_class( atts );
classes.push( 'kc_row' );
if( atts['row_class'] !== undefined && atts['row_class'] !== '' )
classes.push( atts['row_class'] );
if( atts['full_height'] !== undefined && atts['full_height'] !== '' ){
if( atts['content_placement'] !== undefined && atts['content_placement'] == 'middle' )
attributes.push( 'data-kc-fullheight="middle-content"' );
else attributes.push( 'data-kc-fullheight="true"' );
}
if( atts['equal_height'] !== undefined && atts['equal_height'] !== '' ){
attributes.push( 'data-kc-equalheight="true"' );
}
if( atts['use_container'] !== undefined && atts['use_container'] == 'yes' )
cont_class.push( 'kc-container' );
if( atts['container_class'] !== undefined && atts['container_class'] !== '' )
cont_class.push( atts['container_class'] );
if( atts['css'] !== undefined && atts['css'] !== '' )
classes .push( atts['css'].split('|')[0] );
if( atts['video_bg'] !== undefined && atts['video_bg'] === 'yes' ){
var video_bg_url = atts['video_bg_url'];
if( atts['video_bg_url'] !== undefined ){
classes.push('kc-video-bg');
attributes.push('data-kc-video-bg="'+atts['video_bg_url']+'"');
css_data += 'position: relative;';
}
}
if( atts['row_id'] !== undefined && atts['row_id'] !== '' )
attributes.push( 'id="'+atts['row_id']+'"' );
if( atts['video_bg_url'] === undefined || atts['video_bg'] !== 'yes' )
{
if( atts['parallax'] !== undefined )
{
attributes.push( 'data-kc-parallax="true"' );
if( atts['parallax'] == 'yes-new' )
{
var bg_image = '<?php echo admin_url('/admin-ajax.php?action=kc_get_thumbn&size=full&id='); ?>'+atts['parallax_image'];
css_data += "background-image:url('"+bg_image+"');";
}
}
}
attributes.push( 'class="'+classes.join(' ')+'"' );
if( css_data !== '' )
attributes.push( 'style="'+css_data+'"' );
output += '<div '+attributes.join(' ')+'>';
output += '<div class="'+cont_class.join(' ')+'">';
output += '<div class="kc-wrap-columns">'+data.content+'</div>';
output += '</div>';
output += '</div>';
data.callback = function( wrp, $ ){
kc_front.init( wrp );
}
#>
{{{output}}}

View File

@@ -0,0 +1,147 @@
<#
var output = '',
atts = ( data.atts !== undefined ) ? data.atts : {},
default_src = kc_url + "/assets/images/get_start.jpg",
element_attributes = [],
image_attributes = [],
css_classes = kc.front.el_class( atts ),
image_classes = [],
image_url = '';
image_full = '';
link = '',
target = '',
title_link = '',
overlay_html = '',
image_id = ( atts['image'] !== undefined ) ? atts['image'] : '',
overlay = ( atts['overlay'] !== undefined ) ? atts['overlay'] : '',
icon = ( atts['icon'] !== undefined ) ? atts['icon'] : 'fa-plus',
image_size = ( atts['image_size'] !== undefined ) ? atts['image_size'] : '',
on_click_action = ( atts['on_click_action'] !== undefined ) ? atts['on_click_action'] : '',
image_source = ( atts['image_source'] !== undefined ) ? atts['image_source'] : '',
caption = ( atts['caption'] !== undefined && atts['caption'] !== '__empty__' ) ? atts['caption'] : '',
alt = ( atts['alt'] !== undefined && atts['alt'] !== '__empty__' ) ? atts['alt'] : '',
image_wrap = 'yes',
data_lightbox = '',
sizes = ['full', 'thumbnail', 'medium', 'large'];
css_classes.push( 'kc_shortcode' );
css_classes.push( 'kc_single_image' );
if ( atts['class'] !== undefined && atts['class'] !== '' )
css_classes.push( atts['class'] );
if ( atts['ieclass'] !== undefined )
image_classes.push( atts['ieclass'] );
if( image_source == 'external_link' ) {
var image_full = ( atts['image_external_link'] !== undefined ) ? atts['image_external_link'] : '',
image_url = image_full,
size = ( atts['image_size_el'] !== undefined ) ? atts['image_size_el'] : 'full';
if( image_url !== '' )
image_attributes.push( 'src="' + image_url + '"' );
else
image_attributes.push( 'src="' + default_src + '"' );
if( image_full == '' )
image_full = default_src;
var regx = /(\d+)x(\d+)/;
if ( result = regx.exec( size ) ) {
var width = result[1],
height = result[2];
image_attributes.push( 'width="' + width + '"' );
image_attributes.push( 'height="' + height + '"' );
}
} else {
if( image_source == 'media_library' )
{
//image_id = image_id.replace( /[^\d]/, '' );
}
else
{
image_id = kc_post_thumnail_ID;
}
image_full = ajaxurl + '?action=kc_get_thumbn&size=full&id=' + image_id;
if ( sizes.indexOf( image_size ) > -1 ) {
image_url = ajaxurl + '?action=kc_get_thumbn&id=' + image_id + '&size=' + image_size ;
}else if( image_size.indexOf('x') > 0 ){
image_url = ajaxurl + '?action=kc_get_thumbn_size&id=' + image_id + '&size=' + image_size ;
}
if( image_url !== '' ) {
image_attributes.push('src="' + image_url + '"');
} else {
image_attributes.push('src="' + default_src + '"');
image_classes.push('kc_image_empty');
}
if( image_full === '' )
image_full = default_src;
}
image_attributes.push( 'class="' + image_classes.join(' ') + '"' );
if( alt !== '' )
image_attributes.push( 'alt="' + alt + '"');
else
image_attributes.push( 'alt=""' );
title_link = alt;
target = '_self';
if( on_click_action == 'lightbox' )
{
data_lightbox = 'rel="prettyPhoto" class="kc-pretty-photo"';
}
else if( on_click_action == 'open_custom_link' )
{
link = atts['custom_link'];
link = link.split('|');
if( link[0] !== undefined )
image_full = link[0];
if( link[1] !== undefined )
title_link = link[1];
if( link[2] !== undefined )
target= link[2];
}
element_attributes.push('class="' + css_classes.join(' ') + '"');
//overlay layer
if( overlay === 'yes' )
overlay_html = '<div class="kc-image-overlay"><i class="' + icon + '"></i></div>';
if( on_click_action !== '' ) {
output += '<a ' + data_lightbox + ' href="' + image_full + '" title="' + title_link + '"><img ' + image_attributes.join(' ') + ' target="' + target + '" />' + overlay_html +'</a>';
} else {
output += '<img ' + image_attributes.join(' ') + '/>' + overlay_html;
}
if( caption !== '' ){
output += '<p class="scapt">' + caption + '</p>';
}
#>
<div {{{element_attributes.join(' ')}}}>
{{{output}}}</div>
<#
data.callback = function( wrp, $ ){
kc_front.single_img.refresh( wrp );
}
#>

View File

@@ -0,0 +1,16 @@
<#
if( data === undefined )
data = {};
var el_class = kc.front.el_class( atts ), height = 0,
atts = ( data.atts !== undefined ) ? data.atts : {};
if( atts['class'] !== undefined )
el_class.push(atts['class']);
if( atts['height'] !== undefined )
height = parseInt( atts['height'] );
#>
<div class="{{{el_class.join(' ')}}}" style="height: {{{height}}}px; clear: both; width:100%;"></div>

View File

@@ -0,0 +1,27 @@
<#
var output = '', css_class = [],
atts = ( data.atts !== undefined ) ? data.atts : {};
css_class = kc.front.el_class( atts );
css_class.push( 'kc_tab' );
css_class.push( 'ui-tabs-panel' );
css_class.push( 'kc_ui-tabs-hide' );
css_class.push( 'kc_clearfix' );
if ( atts['tab_id'] !== undefined && atts['tab_id'] !== '' ){
tab_id = kc.tools.esc_slug( atts['title'] );
}else{
tab_id = atts['tab_id'];
}
if ( atts['class'] !== undefined && atts['class'] !== '' )
css_class.push( atts['class'] );
if( data.content === undefined )
data.content = '';
data.content += '<div class="kc-element drag-helper" data-model="-1" droppable="true" draggable="true"><a href="javascript:void(0)" class="kc-add-elements-inner"><i class="sl-plus kc-add-elements-inner"></i></a></div>';
#><div id="{{tab_id}}" class="{{{css_class.join(' ')}}}"><div class="kc_tab_content">{{{data.content}}}</div></div>

View File

@@ -0,0 +1,85 @@
<#
var output = '', tabs_option = {}, tabs_option_data = [], tab_nav_class = '', atts = ( data.atts !== undefined ) ? data.atts : {}, css_class = [];
tabs_option['open-on-mouseover'] = (atts['open_mouseover'] !== undefined) ? atts['open_mouseover'] : '';
tabs_option['tab-active'] = (atts['active_section'] !== undefined) ? atts['active_section'] : '';
tabs_option['effect-option'] = (atts['effect_option'] !== undefined) ? atts['effect_option'] : '';
for( var n in tabs_option ){
tabs_option_data.push( 'data-'+n+'="'+tabs_option[n]+'"' );
}
css_class = kc.front.el_class( atts );
css_class.push( 'kc_tabs' );
css_class.push( 'group' );
if( undefined !== atts['css'] && atts['css'] !== '' )
css_class.push( atts['css'].split('|')[0] );
if( undefined !== atts['class'] && atts['class'] !== '' )
css_class.push( atts['class'] );
if( undefined !== atts['type'] && atts['type'] == 'vertical_tabs' )
{
css_class.push( 'kc_vertical_tabs' );
if( undefined !== atts['vertical_tabs_position'] && atts['vertical_tabs_position'] == 'right' )
css_class.push( 'tabs_right' );
}
else if( atts['type'] == 'slider_tabs' ){
css_class.push( 'kc-tabs-slider' );
var owl_option = jQuery().extend({
'items' : 1,
'tablet' : 1,
'mobile' : 1,
'speed' : 450,
'navigation' : false,
'pagination' : true,
'autoheight' : false,
'autoplay' : false
}, atts );
owl_option = JSON.stringify( owl_option );
}
else{
tab_nav_class = 'kc_tabs_nav';
}
data.callback = function( wrp ){ kc_front.tabs( wrp ) };
if( undefined !== atts['type'] && atts['type'] == 'slider_tabs' ){
#><div class="{{css_class.join(' ')}}"><#
if( atts['title_slider'] !== undefined && atts['title_slider'] == 'yes' ){
#><ul class="kc-tabs-slider-nav kc_clearfix">{{{kc.front.ui.process_tab_titles(data)}}}</ul><#
}
#><div class="owl-carousel" data-owl-options="{{owl_option}}">{{{data.content}}}</div></div><#
}else{
#><div class="{{css_class.join(' ')}}" {{{tabs_option_data.join(' ')}}}>
<div class="kc_wrapper ui-tabs kc_clearfix">
<ul class="{{tab_nav_class}} ui-tabs-nav kc_clearfix">
{{{kc.front.ui.process_tab_titles(data)}}}
</ul>
<#
#>{{{data.content}}}</div></div><#
}
#>

View File

@@ -0,0 +1,145 @@
<#
if( data === undefined )
var data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
desc = ( atts['desc'] !== undefined )? kc.tools.base64.decode( atts['desc'] ) : '',
subtitle = ( atts['subtitle'] !== undefined && atts['subtitle'] !== '__empty__' )? atts['subtitle'] : '',
title = ( atts['title'] !== undefined && atts['title'] !== '__empty__' )? atts['title'] : '',
image = ( atts['image'] !== undefined )? atts['image'] : '',
el_class = ( atts['custom_class'] !== undefined )? atts['custom_class'] : '',
img_size = ( atts['img_size'] !== undefined )? atts['img_size'] : 'full',
show_button = ( atts['show_button'] !== undefined )? atts['show_button'] : '',
button_link = ( atts['button_link'] !== undefined )? atts['button_link'] : '||',
button_text = ( atts['button_text'] !== undefined && atts['button_text'] !== '__empty__')? atts['button_text'] : '',
layout = ( atts['layout'] !== undefined )? atts['layout'] : '1',
data_img = '',
img_link = '',
button_link_text = '',
data_title = '',
data_desc = '',
data_subtitle = '',
data_socials = '',
socials = '',
data_button = '',
icon = '',
social_list = ['facebook', 'twitter', 'google_plus', 'linkedin', 'pinterest', 'flickr', 'instagram', 'dribbble', 'reddit', 'email'],
sizes = ['full', 'thumbnail', 'medium', 'large'],
wrap_class = kc.front.el_class( atts );
wrap_class.push( 'kc-team' );
wrap_class.push( 'kc-team-' + layout ) ;
if ( el_class !== '' )
wrap_class.push( el_class );
if ( image != '' ) {
//image = image.replace( /[^\d]/, '' );
if ( sizes.indexOf( img_size ) < 0 ) {
img_link = ajaxurl + '?action=kc_get_thumbn_size&id=' + image + '&size=' + img_size ;
} else {
img_link = ajaxurl + '?action=kc_get_thumbn&size=' + img_size + '&id=' + image;
}
data_img += '<figure class="content-image">';
data_img += '<img src="' + img_link + '" alt="">';
data_img += '</figure>';
}
if ( title !== '' ) {
data_title += '<div class="content-title">';
data_title += title;
data_title += '</div>';
}
if ( desc !=='' ) {
data_desc += '<div class="content-desc">';
data_desc += desc;
data_desc += '</div>';
}
if ( subtitle !== '' ) {
data_subtitle += '<div class="content-subtitle">';
data_subtitle += subtitle;
data_subtitle += '</div>';
}
if ( show_button === 'yes' ) {
if ( button_link !== '' ) {
button_link_text = button_link.split('|');
button_link = button_link_text[0];
}
if( button_text === '' )
button_text = "<?php echo __( 'Readmore', 'kingcomposer' );?>";
data_button += '<div class="content-button">';
data_button += '<a href="' + button_link + '">' + button_text + '</a>';
data_button += '</div>';
}
for (var i = 0; i < social_list.length; i++) {
if( atts[social_list[i]] !== undefined && atts[social_list[i]] !== '__empty__' ){
icon = social_list[i];
icon = icon.replace('_', '-');
icon = icon.replace('email', 'envelope-o');
data_socials += '<a href="' + atts[social_list[i]] + '" target="_blank"><i class="fa-' + icon + '"></i></a>';
}
}
if( data_socials !== '' )
data_socials = '<div class="content-socials">' + data_socials + '</div>';
#>
<div class="{{{wrap_class.join(' ')}}}">
<#
switch ( parseInt( layout ) ) {
case 2:
#>
{{{data_img}}}
<div class="box-right">
{{{data_title}}}
{{{data_subtitle}}}
{{{data_desc}}}
{{{data_socials}}}
</div>
<#
break;
case 3:
#>
{{{data_img}}}
<div class="overlay">
{{{data_title}}}
{{{data_subtitle}}}
{{{data_desc}}}
{{{data_button}}}
{{{data_socials}}}
</div>
<#
break;
default:
#>
{{{data_img}}}
{{{data_title}}}
{{{data_subtitle}}}
{{{data_desc}}}
{{{data_socials}}}
{{{data_button}}}
<#
}
#>
</div>

View File

@@ -0,0 +1,117 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
layout = ( atts['layout'] !== undefined ) ? atts['layout'] : '1',
title = ( atts['title'] !== undefined && atts['title'] !== '__empty__' ) ? atts['title'] : '',
desc = ( atts['desc'] !== undefined && atts['desc'] !== '__empty__' ) ? kc.tools.base64.decode( atts['desc']) : '',
image = ( atts['image'] !== undefined ) ? atts['image'] : '',
img_size = ( atts['img_size'] !== undefined ) ? atts['img_size'] : 'full',
position = ( atts['position'] !== undefined && atts['position'] !== '__empty__' ) ? atts['position'] : '',
custom_class = ( atts['custom_class'] !== undefined ) ? atts['custom_class'] : '',
data_title = '',
data_desc = '',
data_img = '',
data_position = '',
wrap_class = [];
wrap_class = kc.front.el_class( atts );
wrap_class.push( 'kc-testimo kc-testi-layout-' + layout );
if ( custom_class !=='' ) {
wrap_class.push( custom_class );
}
if ( image !='' ) {
//image = image.replace( /[^\d]/, '' );
if ( img_size !== 'full' ) {
img_link = ajaxurl + '?action=kc_get_thumbn_size&id=' + image + '&size=' + img_size ;
} else {
img_link = ajaxurl + '?action=kc_get_thumbn&size=' + img_size + '&id=' + image;
}
data_img += '<figure class="content-image">';
data_img += '<img src="' + img_link + '" alt="">';
data_img += '</figure>';
}
if ( title !== '' ) {
data_title += '<div class="content-title">';
data_title += title;
data_title += '</div>';
}
if ( desc !=='' ) {
data_desc += '<div class="content-desc">';
data_desc += desc;
data_desc += '</div>';
}
if ( position !== '' ) {
data_position += '<div class="content-position">';
data_position += position;
data_position += '</div>';
}
#>
<div class="{{{wrap_class.join(' ')}}}">
<# switch ( layout ) {
case '2':
#>
{{{data_title}}}
{{{data_position}}}
{{{data_desc}}}
<#
break;
case '3':
#>
{{{data_img}}}
{{{data_title}}}
{{{data_position}}}
{{{data_desc}}}
<#
break;
case '4':
#>
{{{data_img}}}
<div class="box-right">
{{{data_desc}}}
{{{data_position}}}
{{{data_title}}}
</div>
<#
break;
case '5':
#>
{{{data_desc}}}
{{{data_img}}}
<div class="box-right">
{{{data_title}}}
{{{data_position}}}
</div>
<#
break;
default:
#>
{{{data_img}}}
{{{data_desc}}}
{{{data_title}}}
{{{data_position}}}
<#
break;
} #>
</div>

View File

@@ -0,0 +1,44 @@
<#
var output = '',
wrap_class = [],
classes = ['kc_title'],
wrp_class = [],
type = 'h1',
atts = ( data.atts !== undefined ) ? data.atts : {},
text = ( atts['text'] !== undefined )? kc.tools.base64.decode( atts['text'] ) : '',
post_title = ( atts['post_title'] !== undefined )? atts['post_title'] : 'no',
after = ( atts['after'] !== undefined )? kc.tools.base64.decode( atts['after'] ) : '',
before = ( atts['before'] !== undefined )? kc.tools.base64.decode( atts['before'] ) : '';
wrap_class = kc.front.el_class( atts );
wrap_class.push( 'kc-title-wrap' );
if( atts['class'] !== undefined && atts['class'] !== '' )
classes.push( atts['class'] );
if( atts['type'] !== undefined && atts['type'] !== '' )
type = atts['type'];
if ( atts['title_wrap'] == 'yes' && atts['title_wrap_class'] !== undefined )
wrap_class.push(atts['title_wrap_class']);
if ( post_title === 'yes')
text = kc_post_title;
#>
<div class="{{{wrap_class.join(' ')}}}">
<# if ( atts['title_wrap'] == 'yes' ){ #>
<# if ( atts['before'] !== undefined ){ #>{{{before}}}<# } #>
<{{{type}}} class="{{{classes.join(' ')}}}">{{{text}}}</{{{type}}}>
<# if ( atts['after'] !== undefined ){#>{{{after}}}<#}#>
<# } else{ #>
<{{{type}}} class="{{{classes.join(' ')}}}">{{{text}}}</{{{type}}}>
<# } #>
</div>

View File

@@ -0,0 +1,125 @@
<#
if( data === undefined )
var data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
layout = ( atts['layout'] !== undefined ) ? atts['layout'] : '1',
position = ( atts['position'] !== undefined ) ? atts['position'] : '',
icon = ( atts['icon'] !== undefined ) ? atts['icon'] : '',
text_tooltip = ( atts['text_tooltip'] !== undefined && atts['text_tooltip'] !== '__empty__' ) ? kc.tools.base64.decode( atts['text_tooltip']) : '',
image = ( atts['image'] !== undefined ) ? atts['image'] : '',
img_size = ( atts['img_size'] !== undefined ) ? atts['img_size'] : 'full',
button_text = ( atts['button_text'] !== undefined && atts['button_text'] !== '__empty__' ) ? atts['button_text'] : '',
button_link = ( atts['button_link'] !== undefined ) ? atts['button_link'] : '||',
custom_class = ( atts['custom_class'] !== undefined ) ? atts['custom_class'] : '',
data_icon = '',
data_button = '',
data_img = '',
data_position = '',
img_link = '',
button_title = '',
button_target = '',
button_link_text = '',
button_attr = [],
main_class = ['kc_tooltip'],
wrapper_class = kc.front.el_class( atts );
wrapper_class.push( 'kc-popover-tooltip' );
if ( custom_class !== '' )
wrapper_class.push( custom_class );
main_class.push( 'style' + layout );
if ( icon !== '' ) {
data_icon += '<i class="' + icon + ' fati17"></i>';
}
if ( image !='' ) {
//image = image.replace( /[^\d]/, '' );
if ( img_size !== 'full' ) {
img_link = ajaxurl + '?action=kc_get_thumbn_size&id=' + image + '&size=' + img_size ;
} else {
img_link = ajaxurl + '?action=kc_get_thumbn&size=full&id=' + image;
}
}else{
img_link = kc_url + "/assets/images/get_start_s.jpg";
}
data_img += '<img src="' + img_link + '" alt="">';
button_attr.push( 'class="kc_tooltip style3"' );
button_attr.push( 'data-tooltip="true"' );
button_attr.push( 'data-position="' + position + '"' );
if ( button_link !== '' ) {
button_link_text = button_link.split('|');
button_link = button_link_text[0];
if ( button_link_text[1] !== undefined )
button_title = button_link_text[1];
if ( button_link_text[2] !== undefined )
button_target = button_link_text[2];
} else {
button_link = '#';
}
button_attr.push( 'href="' + button_link + '"' );
if ( button_title !== '' )
button_attr.push( 'title="' + button_title + '"' );
if ( button_target !== '' )
button_attr.push( 'target="' + button_target + '"' );
if( button_text === '' )
button_text = "<?php echo __( 'Read More', 'kingcomposer' );?>";
data_button += '<a ' + button_attr.join(' ') + '>' + button_text + '<span>' + text_tooltip + '</span></a>';
#>
<div class="{{{wrapper_class.join(' ')}}}">
<#
switch ( layout ) {
case '2':
#>
<div class="{{{main_class.join(' ')}}}" data-tooltip="true" data-position="{{{position}}}">
{{{data_img}}}
<span>{{{text_tooltip}}}</span>
</div>
<#
break;
case '3':
#>
<div class="content-button">
{{{data_button}}}
</div>
<#
break;
default:
#>
<div class="{{{main_class.join(' ')}}}" data-tooltip="true" data-position="{{{position}}}">
{{{data_icon}}}
<span>{{{text_tooltip}}}</span>
</div>
<#
}
#>
</div>
<#
data.callback = function( wrp, $ ){
kc_front.tooltips( wrp );
}
#>

View File

@@ -0,0 +1,39 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
video_height = 250,
video_width = '100%',
video_info = '',
el_classess = [];
el_classess = kc.front.el_class( atts );
el_classess.push( 'kc_shortcode' );
el_classess.push( 'kc_video_play' );
el_classess.push( 'kc_video_wrapper' );
if( atts['wrap_class'] !== undefined && atts['wrap_class'] !== '' )
el_classess.push( atts['wrap_class'] );
if( atts['video_height'] !== undefined && atts['video_height'] !== '' )
video_height = parseInt( atts['video_height'] );
if( atts['video_width'] !== undefined && atts['video_width'] !== '' )
video_width = parseInt( atts['video_width'] )+'px';
if( atts['title'] !== undefined && atts['title'] !== '' )
video_info += '<h3>'+atts['title']+'</h3>';
if( atts['description'] !== undefined && atts['description'] !== '' )
video_info += '<p>'+kc.tools.base64.decode( atts['description'] )+'</p>';
#>
<div class="{{{el_classess.join(' ')}}}">
<div style="height:{{video_height}}px;width:{{video_width}};" class="disable-view-element">
<h3>For best perfomance, the video player has been disabled in this editing mode.</h3>
</div>
<div class="video-info">{{{video_info}}}</div>
</div>