function ts_button_outlined_func($atts, $content = null)
{
    $oArgs = ThemeArguments::getInstance('ts_button_outlined_func');
    $button_id = (int) $oArgs->get('button_id') + 1;
    $oArgs->set('button_id', $button_id);
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', "icon" => '', "color" => '', "hover_color" => '', "background_color" => '', "background_hover_color" => '', "size" => '', "url" => '', 'target' => '_self', 'align' => ''), $atts));
    $button_class = 'button btn btn-border ' . $size;
    if (empty($url)) {
        $url = '#';
    }
    $button_styles = '';
    $button_data = '';
    if (!empty($color)) {
        $button_styles .= "color:{$color}; border-color: {$color};";
        $button_data .= 'data-color="' . esc_attr($color) . '"';
    }
    if (!empty($hover_color)) {
        $button_data .= 'data-hover-color="' . esc_attr($hover_color) . '"';
    }
    if (!empty($background_color)) {
        $button_styles .= "background-color:{$background_color};";
        $button_data .= 'data-background-color="' . esc_attr($background_color) . '"';
    }
    if (!empty($background_hover_color)) {
        $button_data .= 'data-background-hover-color="' . esc_attr($background_hover_color) . '"';
    }
    $icon_html = '';
    if ($icon && $icon != 'no') {
        $icon_html = '<i class="icons ' . esc_attr($icon) . '"></i>';
    }
    return '<div class="xbtn ' . sanitize_html_classes($align) . '"><a id="button-' . esc_attr($button_id) . '" ' . esc_attr($button_data) . ' class="' . esc_attr($button_class) . ' ' . ts_get_animation_class($animation) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . ' href="' . esc_url($url) . '" target="' . esc_attr($target) . '" style="' . $button_styles . '">' . $icon_html . $content . '</a></div>';
}
Beispiel #2
0
/**
 * Print import notice
 */
function ts_import_notice()
{
    $oArgs = ThemeArguments::getInstance('importer');
    $ts_import_notice = $oArgs->get('ts_import_notice');
    $ts_import_notice = $oArgs->get('ts_import_notice_type');
    if (isset($_GET['imported_sample_data']) && $_GET['imported_sample_data'] == 1) {
        ?>
		<div class="updated">
			<p><?php 
        _e('Import completed', 'framework');
        ?>
</p>
		</div>
	<?php 
    } elseif (!empty($ts_import_notice)) {
        ?>
		<div class="<?php 
        echo sanitize_html_classes($ts_import_notice_type);
        ?>
">
			<p><?php 
        echo esc_html($ts_import_notice);
        ?>
</p>
		</div>
	<?php 
    }
}
 /**
  * Returns instance of the object TsArguments
  *
  * @return TsArguments
  * @access public
  * @static
  */
 public static function getInstance($context)
 {
     if (self::$oInstance == false) {
         self::$oInstance = new ThemeArguments();
     }
     self::$oInstance->setContext($context);
     return self::$oInstance;
 }
<?php

/** 
 * Header part for blog classic
 * 
 * @package Rhythm
 */
$oArgs = ThemeArguments::getInstance('page-templates/blog-classic');
if ($oArgs->get('main-layout') == 'default') {
    ?>
	<!-- Date -->
	<div class="blog-item-date">
		<span class="date-num"><?php 
    the_time('j');
    ?>
</span><?php 
    the_time('M');
    ?>
	</div>
<?php 
}
Beispiel #5
0
/**
 * Showing inline styles html tag in the footer
 */
function ts_enqueue_inline_styles()
{
    $oArgs = ThemeArguments::getInstance('inline_style');
    $inline_styles = $oArgs->get('inline_styles');
    if (is_array($inline_styles) && count($inline_styles) > 0) {
        echo '<style id="custom-shortcode-css" type="text/css">' . ts_css_compress(htmlspecialchars_decode(wp_kses_data(join('', $inline_styles)))) . '</style>';
    }
    $oArgs->reset();
}
Beispiel #6
0
} else {
    //No posts were found
    ?>

			<?php 
    get_template_part('templates/content/content', 'none');
    ?>

		<?php 
}
?>

		
		
		<?php 
$oArgs = ThemeArguments::getInstance('templates/global/inner-page');
$oArgs->set('add_inner_page_container', $add_inner_page_container);
get_template_part('templates/global/inner-page');
?>

		
		<?php 
// If comments are open or we have at least one comment, load up the comment template
if (ts_get_opt('page-comments-enable') == 1 && (comments_open() || get_comments_number())) {
    comments_template();
}
?>
			
		<?php 
if ($allow_sidebars) {
    get_template_part('templates/global/page-after-content');
/**
 * Get timeline fadein value
 * @return string
 */
function ts_get_timeline_fadein()
{
    $oArgs = ThemeArguments::getInstance('templates/template-blog-timeline');
    if ($oArgs->get('ts_loop_it') % 2 == 0) {
        return 'fadeInLeft';
    } else {
        return 'fadeInRight';
    }
}
Beispiel #8
0
<?php

/**
 * The template for displaying archive pages.
 *
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package Rhythm
 */
$oArgs = ThemeArguments::getInstance('templates/pages/index');
$oArgs->set('template', ts_get_opt('archive-template'));
$oArgs->set('columns', ts_get_opt('archive-columns'));
get_template_part('templates/pages/index');
$oArgs->reset();
Beispiel #9
0
function ts_tab_func($atts, $content = null)
{
    extract(shortcode_atts(array('title' => '', 'icon' => 'no'), $atts));
    $oArgs = ThemeArguments::getInstance('ts_tabs_func');
    $shortcode_tabs = $oArgs->get('shortcode_tabs');
    if (!is_array($shortcode_tabs)) {
        $shortcode_tabs = array();
    }
    $shortcode_tabs[] = array('title' => $title, 'icon' => $icon, 'content' => trim(do_shortcode($content)));
    $oArgs->set('shortcode_tabs', $shortcode_tabs);
}
Beispiel #10
0
function ts_tiles_slider_func($atts, $content = null)
{
    extract(shortcode_atts(array('image' => '', 'url' => '', 'target' => ''), $atts));
    $oArgs = ThemeArguments::getInstance('ts_tiles_func');
    $shortcode_tiles = $oArgs->get('shortcode_tiles');
    if (!is_array($shortcode_tiles)) {
        $shortcode_tiles = array();
    }
    $shortcode_tiles[] = array('image' => ts_get_image_by_id($image), 'url' => $url, 'target' => $target);
    $oArgs->set('shortcode_tiles', $shortcode_tiles);
}
if (get_query_var('paged')) {
    $paged = get_query_var('paged');
} elseif (get_query_var('page')) {
    // applies when this page template is used as a static homepage in WP3+
    $paged = get_query_var('page');
} else {
    $paged = 1;
}
$args = array('numberposts' => '', 'posts_per_page' => get_option('posts_per_page'), 'offset' => 0, 'cat' => '', 'orderby' => 'date', 'order' => 'DESC', 'include' => '', 'exclude' => '', 'meta_key' => '', 'meta_value' => '', 'post_type' => 'post', 'post_mime_type' => '', 'post_parent' => '', 'paged' => $paged, 'post_status' => 'publish');
$custom_query = new WP_Query($args);
$found_posts = null;
$max_num_pages = 0;
if ($custom_query->have_posts()) {
    $max_num_pages = $custom_query->max_num_pages;
    $ts_loop_it = 0;
    $oArgs = ThemeArguments::getInstance('templates/template-blog-timeline');
    while ($custom_query->have_posts()) {
        $custom_query->the_post();
        get_template_part('/inc/blog-timeline/content', get_post_format());
        $ts_loop_it++;
        $oArgs->set('ts_loop_it', $ts_loop_it);
    }
    // end of the loop.
    $oArgs->reset();
}
?>
            </div>
			<?php 
wp_reset_postdata();
?>
			<div class="pagination-box">
function testimonials_posts_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => '', 'style' => '', 'bg' => '', 'count' => '3', 'length' => '125', 'blog_text' => '', 'blog_url' => '', 'white' => '', 'text_color' => '', 'color' => ''), $atts));
    $oArgs = ThemeArguments::getInstance('testimonials_posts_func');
    $ts_testimonials_i = (int) $oArgs->get('ts_testimonials_i') + 1;
    $oArgs->set('ts_testimonials_i', $ts_testimonials_i);
    ob_start();
    ?>
	<?php 
    if ($style == 'style4') {
        $attributes = 'data-carousel-autoplay="true" data-carousel-one="true" data-carousel-nav="false"';
    } else {
        $attributes = 'data-carousel-pagination="true" data-carousel-one="true"';
    }
    $title_class = '';
    if (!empty($title)) {
        $title_class = 'title-box';
    }
    ?>

	<div class="respond-carousel <?php 
    echo ts_get_animation_class($animation);
    ?>
" <?php 
    echo ts_get_animation_data_class($animation_delay, $animation_iteration);
    ?>
>
		<div class="carousel-box load overflow" <?php 
    echo $attributes;
    ?>
>
			<div class="<?php 
    echo esc_attr($title_class);
    ?>
">
				<?php 
    if ($style == 'style2' || $style == 'style3') {
        ?>
					<a class="next" href="#">
		                <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
							<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon>
		                </svg>
					</a>
					<a class="prev" href="#">
		                <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
							<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon>
		                </svg>
					</a>
				<?php 
    }
    if (!empty($title)) {
        echo '<h2 class="title">' . $title . '</h2>';
    }
    ?>
			</div>
			<div class="row">
				<?php 
    $data = '';
    if (!empty($text_color)) {
        $data .= 'data-text-color="' . esc_attr($text_color) . '" ';
    }
    if (!empty($color)) {
        $data .= 'data-color="' . esc_attr($color) . '" ';
    }
    ?>
				<div class="carousel testimonials-wrapper" id="testimonials-<?php 
    echo esc_attr($ts_testimonials_i);
    ?>
" <?php 
    echo $data;
    ?>
>

					<?php 
    query_posts(array('post_type' => 'testimonials', 'posts_per_page' => $count));
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $thumb = get_xv_thumbnail(84, 84);
            $excerpt = get_xv_excerpt($length);
            ?>
							<?php 
            if ($bg == '1') {
                $bg_style = 'bg-info';
                $bg_class = 'bg';
            } else {
                $bg_style = 'border-info';
                $bg_class = 'border white';
            }
            ?>


							<div class="respond respond-blockquote <?php 
            echo sanitize_html_classes($bg_class);
            ?>
 col-sm-12 col-md-12">
								<div class="description <?php 
            echo esc_attr($bg_style);
            ?>
">
									<blockquote>
										<?php 
            the_content();
            ?>
									</blockquote>
								</div>
								<div class="name">
									<div class="icon">
										<?php 
            if (has_post_thumbnail()) {
                the_post_thumbnail();
            }
            ?>
									</div>
									
									<strong <?php 
            echo $white == 'white' ? 'class="white"' : '';
            ?>
><?php 
            the_title();
            ?>
</strong>
									<div <?php 
            echo $white == 'white' ? 'class="white"' : '';
            ?>
><?php 
            echo get_post_meta(get_the_ID(), 'designation', TRUE);
            ?>
</div>
								</div>
							</div>
							<?php 
        }
    }
    wp_reset_query();
    ?>
				</div>
			</div>
			<div class="clearfix"></div>
			<?php 
    if ($style == 'style1' || $style == 'style3') {
        ?>
				<div class="pagination switches"></div>
			<?php 
    }
    ?>
		</div>
	</div>

	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
Beispiel #13
0
<?php

/**
 * Loop Rating
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.0.0
 */
if (!defined('ABSPATH')) {
    exit;
    // Exit if accessed directly
}
global $product;
$oArgs = ThemeArguments::getInstance('rs_woo_products');
if (get_option('woocommerce_enable_review_rating') === 'no' || $oArgs->get('disable_rating') === true) {
    return;
}
?>

<?php 
if ($rating_html = $product->get_rating_html()) {
    ?>
	<div class="clearfix align-center">
		<?php 
    echo $rating_html;
    ?>
	</div>
<?php 
}