function ts_register_sidebars()
{
    if (function_exists('register_sidebar')) {
        register_sidebar(array('name' => __('Primary Sidebar', 'ThemeStockyard'), 'description' => __('Default content sidebar on pages/posts.', 'ThemeStockyard'), 'id' => 'ts-primary-sidebar', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<div class="page-title clearfix"><h5 class="mimic-small uppercase subtle-text-color"><span>', 'after_title' => '</span></h5></div>'));
        register_sidebar(array('name' => __('Second Sidebar', 'ThemeStockyard'), 'description' => __('Sidebar con bluebox.', 'ThemeStockyard'), 'id' => 'ts-second-sidebar', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<div class="page-title clearfix"><h5 class="mimic-small uppercase subtle-text-color"><span>', 'after_title' => '</span></h5></div>'));
        $footer_sidebar_layout = ts_option_vs_default('footer_layout', 'footer2');
        switch ($footer_sidebar_layout) {
            case "footer1":
                register_sidebar(array('name' => __('Footer Area 1', 'ThemeStockyard'), 'id' => 'ts-footer-sidebar-1', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<div class="page-title clearfix"><h5 class="mimic-small uppercase subtle-text-color"><span>', 'after_title' => '</span></h5></div>'));
                register_sidebar(array('name' => __('Footer Area 2', 'ThemeStockyard'), 'id' => 'ts-footer-sidebar-2', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<div class="page-title clearfix"><h5 class="mimic-small uppercase subtle-text-color"><span>', 'after_title' => '</span></h5></div>'));
                register_sidebar(array('name' => __('Footer Area 3', 'ThemeStockyard'), 'id' => 'ts-footer-sidebar-3', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<div class="page-title clearfix"><h5 class="mimic-small uppercase subtle-text-color"><span>', 'after_title' => '</span></h5></div>'));
                register_sidebar(array('name' => __('Footer Area 4', 'ThemeStockyard'), 'id' => 'ts-footer-sidebar-4', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<div class="page-title clearfix"><h5 class="mimic-small uppercase subtle-text-color"><span>', 'after_title' => '</span></h5></div>'));
                break;
            case "footer2":
            case "footer5":
            case "footer6":
                register_sidebar(array('name' => __('Footer Area 1', 'ThemeStockyard'), 'id' => 'ts-footer-sidebar-1', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<div class="page-title clearfix"><h5 class="mimic-small uppercase subtle-text-color"><span>', 'after_title' => '</span></h5></div>'));
                register_sidebar(array('name' => __('Footer Area 2', 'ThemeStockyard'), 'id' => 'ts-footer-sidebar-2', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<div class="page-title clearfix"><h5 class="mimic-small uppercase subtle-text-color"><span>', 'after_title' => '</span></h5></div>'));
                register_sidebar(array('name' => __('Footer Area 3', 'ThemeStockyard'), 'id' => 'ts-footer-sidebar-3', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<div class="page-title clearfix"><h5 class="mimic-small uppercase subtle-text-color"><span>', 'after_title' => '</span></h5></div>'));
                break;
            case "footer3":
            case "footer7":
            case "footer8":
                register_sidebar(array('name' => __('Footer Area 1', 'ThemeStockyard'), 'id' => 'ts-footer-sidebar-1', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<div class="page-title clearfix"><h5 class="mimic-small uppercase subtle-text-color"><span>', 'after_title' => '</span></h5></div>'));
                register_sidebar(array('name' => __('Footer Area 2', 'ThemeStockyard'), 'id' => 'ts-footer-sidebar-2', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<div class="page-title clearfix"><h5 class="mimic-small uppercase subtle-text-color"><span>', 'after_title' => '</span></h5></div>'));
                break;
            default:
            case "footer4":
                register_sidebar(array('name' => __('Footer Area 1', 'ThemeStockyard'), 'id' => 'ts-footer-sidebar-1', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<div class="page-title clearfix"><h5 class="mimic-small uppercase subtle-text-color"><span>', 'after_title' => '</span></h5></div>'));
                break;
        }
    }
}
Exemple #2
0
function ts_theme_styles()
{
    wp_enqueue_style('font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', '', '4.3.0');
    wp_dequeue_style('rs-plugin-static');
    wp_enqueue_style('theme-css', get_stylesheet_uri(), '', TS_THEME_VERSION);
    if (ts_enable_style_selector()) {
        wp_enqueue_style('style-selector', get_template_directory_uri() . '/css/style_selector.css', '', TS_THEME_VERSION);
    }
    $enable_inline_css = ts_option_vs_default('enable_inline_css', 0);
    if ($enable_inline_css < 1) {
        $ts_php_css_ver = get_option(ts_slugify(TS_THEMENAME) . '_activation_time');
        $ts_php_css_ver = $ts_php_css_ver ? '-' . $ts_php_css_ver : '';
        wp_enqueue_style('theme-options-css', esc_url(home_url() . '?theme-options=css'), '', TS_THEME_VERSION . $ts_php_css_ver);
    }
    if (ts_option_vs_default('rtl', 0) == 1) {
        wp_enqueue_style('rtl', get_template_directory_uri() . '/rtl.css', '', TS_THEME_VERSION);
    }
}
Exemple #3
0
            </ul>
            <div class="tab-contents">
                <div class="tab-context tab-details">
                    <?php 
    do_action('woocommerce_single_product_summary');
    ?>
                </div>
                
                <?php 
    $i = 1;
    foreach ($tabs as $key => $tab) {
        if ($key == 'additional_information') {
            continue;
        }
        // we include this under the description/details tab
        if (ts_option_vs_default('show_shop_reviews_on_single', 1) != 1 && $key == 'reviews') {
            continue;
        }
        ?>
                
                <div class="tab-context tab-<?php 
        echo esc_attr($key);
        ?>
">
                    <?php 
        call_user_func($tab['callback'], $key, $tab);
        ?>
                </div>

                <?php 
        $i++;
Exemple #4
0
<?php

/**
 * Loop Add to Cart
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.1.0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $product;
if (ts_option_vs_default('show_add_to_cart_button_on_results', 1) == 1) {
    echo apply_filters('woocommerce_loop_add_to_cart_link', sprintf('<a href="%s" rel="nofollow" data-product_id="%s" data-product_sku="%s" data-quantity="%s" class="button %s product_type_%s">%s</a>', esc_url($product->add_to_cart_url()), esc_attr($product->id), esc_attr($product->get_sku()), esc_attr(isset($quantity) ? $quantity : 1), $product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : '', esc_attr($product->product_type), esc_html($product->add_to_cart_text())), $product);
}
		<?php 
/**
 * woocommerce_single_product_summary hook
 *
 * @hooked woocommerce_template_single_title - 5
 * @hooked woocommerce_template_single_price - 10
 * @hooked woocommerce_template_single_excerpt - 20
 * @hooked woocommerce_template_single_add_to_cart - 30
 * @hooked woocommerce_template_single_meta - 40
 * @hooked woocommerce_template_single_sharing - 50
 */
//do_action( 'woocommerce_single_product_summary' );
remove_action('woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15);
remove_action('woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);
if (ts_option_vs_default('show_add_to_cart_button_on_single', 1) != 1) {
    remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30);
}
do_action('woocommerce_after_single_product_summary');
?>

	</div><!-- .summary -->

	<?php 
/**
 * woocommerce_after_single_product_summary hook
 *
 * @hooked woocommerce_output_product_data_tabs - 10
 * @hooked woocommerce_output_related_products - 20
 */
//do_action( 'woocommerce_after_single_product_summary' );
Exemple #6
0
$entries_class = $ts_show_sidebar == 'yes' ? 'has-sidebar' : 'no-sidebar';
$ts_query = isset($atts) && $atts['default_query'] === false ? new WP_Query($atts) : $wp_query;
$atts = isset($atts) ? $atts : array();
$entry_class = 'span4';
?>
                <div class="loop-wrap loop-masonry-wrap <?php 
echo esc_attr(ts_loop_wrap_class($atts));
?>
">
                    <div class="hfeed entries blog-entries loop loop-masonry <?php 
echo esc_attr($entries_class);
?>
 clearfix">
                        <?php 
$exc_lnth = ts_option_vs_default('excerpt_length_minimum', 100);
$excerpt_length = isset($atts['excerpt_length']) && $atts['excerpt_length'] != '' ? $atts['excerpt_length'] : $exc_lnth;
$ts_show = ts_maybe_show_blog_elements($atts);
$show_excerpt = $excerpt_length == '0' || !$ts_show->excerpt ? false : true;
$title_size = ts_get_blog_loop_title_size($atts, 4);
$text_align = ts_get_blog_loop_text_align($atts);
$allow_vids = isset($atts['allow_videos']) ? $atts['allow_videos'] : '';
$allow_gals = isset($atts['allow_galleries']) ? $atts['allow_galleries'] : '';
if ($ts_query->have_posts()) {
    while ($ts_query->have_posts()) {
        $ts_query->the_post();
        $atts['exclude_these_later'] = isset($atts['exclude_these_later']) ? $atts['exclude_these_later'] : '';
        if (!ts_attr_is_false($atts['exclude_these_later'])) {
            $ts_previous_posts[] = $ts_query->post->ID;
        }
        $post_type = get_post_type();
                $show_shop_reviews_on_single = ts_option_vs_default('show_shop_reviews_on_single', 1);
                if ($show_shop_reviews_on_single == 1) {
                    echo ' <span class="sep sep-1">&nbsp;/&nbsp;</span> ';
                    echo '<a href="' . esc_url(get_permalink()) . '#reviews" class="to-comments-link reviews-smoothscroll">' . $comment_number . ' ';
                    echo $comment_number == 1 ? __('Review', 'ThemeStockyard') : __('Reviews', 'ThemeStockyard');
                    echo '</a>' . "\n";
                }
            } else {
                echo ' <span class="sep sep-2">&nbsp;/&nbsp;</span> ';
                echo '<span class="mimic-small">';
                echo __('By', 'ThemeStockyard') . ' ';
                echo '<span class="author vcard">';
                echo '<a href="' . get_author_posts_url($post->post_author) . '">' . get_the_author_meta('display_name', $post->post_author) . '</a>';
                echo '</span>';
                echo '</span>';
                if (ts_option_vs_default('show_titlebar_post_view_count', 0) == 1) {
                    $ts_postview_nonce = wp_create_nonce('ts_update_postviews_nonce');
                    $post_view_count = ts_postmeta_vs_default($ts_page_id, '_p_ts_postviews', 0);
                    $post_view_count = !$post_view_count ? '0' : $post_view_count;
                    $post_view_count_text = sprintf(_n('1 view', '%s views', $post_view_count, 'ThemeStockyard'), $post_view_count);
                    echo ' <span class="sep sep-3">&nbsp;/&nbsp;</span> ';
                    echo '<span id="ts-postviews" data-pid="' . esc_attr($ts_page_id) . '" data-nonce="' . esc_attr($ts_postview_nonce) . '">';
                    echo '<i class="fa fa-eye"></i>' . esc_html($post_view_count_text);
                    echo '</span>';
                }
            }
        } else {
            echo '<!-- comments closed -->' . "\n";
        }
        ?>
</div>
Exemple #8
0
<?php

global $smof_data, $ts_page_id, $ts_page_title;
$ts_page_id = get_option('page_for_posts');
$ts_show_sidebar = ts_option_vs_default('show_archive_sidebar', 1) != 1 ? 'no' : 'yes';
$ts_sidebar_position = ts_option_vs_default('page_sidebar_position', 'right');
$post = $posts[0];
$ts_queried_object = get_query_var('author');
$ts_page_title = __('Posts by:', 'ThemeStockyard') . ' ' . get_the_author_meta('display_name', get_query_var('author'));
$ts_caption = trim($ts_caption) ? $ts_caption : '';
get_header();
get_template_part('top');
get_template_part('title-page');
?>
            <div id="main-container-wrap" class="<?php 
echo esc_attr(ts_main_container_wrap_class('page'));
?>
">
                <div id="main-container" class="container clearfix">            
                    <div id="main" class="<?php 
echo esc_attr(ts_main_div_class());
?>
 clearfix">
                        <div class="entry single-entry clearfix">
                            <div class="post">
                                <?php 
/* 
 * Run the loop to output the posts.
 */
$ts_loop = isset($smof_data['archive_layout']) ? $smof_data['archive_layout'] : '';
ts_blog($ts_loop, array('default_query' => true));
Exemple #9
0
<?php

/*
Template Name: Sitemap
*/
global $smof_data, $ts_previous_posts, $ts_page_id, $ts_show_top_ticker;
$ts_page_object = get_queried_object();
$ts_page_id = is_single() ? $post->ID : get_queried_object_id();
$ts_custom_css = get_post_meta($ts_page_id, '_page_css', true);
$ts_show_top_ticker_option = ts_option_vs_default('show_page_top_ticker', 0) == 1 ? 'yes' : 'no';
$ts_show_top_ticker = ts_postmeta_vs_default($ts_page_id, '_page_top_ticker', $ts_show_top_ticker_option);
$ts_show_sidebar_option = ts_option_vs_default('show_page_sidebar', 1) != 1 ? 'no' : 'yes';
$ts_show_sidebar = ts_postmeta_vs_default($ts_page_id, '_page_sidebar', $ts_show_sidebar_option);
$ts_sidebar_position_option = ts_option_vs_default('page_sidebar_position', 'right');
$ts_sidebar_position = ts_postmeta_vs_default($ts_page_id, '_page_sidebar_position', $ts_sidebar_position_option);
$ts_page_comments = ts_option_vs_default('page_comments', 0) == 1 ? true : false;
get_header();
get_template_part('top');
get_template_part('title-page');
?>
            <div id="main-container-wrap" class="<?php 
echo esc_attr(ts_main_container_wrap_class('page'));
?>
">
            
                <?php 
get_template_part('slider');
?>
                
                <div id="main-container" class="container clearfix">
                    <div id="main" class="<?php 
Exemple #10
0
<?php

/**
 * Single Product Price, including microdata for SEO
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     1.6.4
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $post, $product;
if (ts_option_vs_default('show_shop_prices_on_single', 1) != 1) {
    return false;
}
?>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">

	<p itemprop="price" class="price"><?php 
echo ts_escape($product->get_price_html());
?>
</p>

	<meta itemprop="priceCurrency" content="<?php 
echo ts_escape(get_woocommerce_currency());
?>
" />
	<link itemprop="availability" href="http://schema.org/<?php 
echo $product->is_in_stock() ? 'InStock' : 'OutOfStock';
Exemple #11
0
    function form($instance)
    {
        $defaults = array('label' => __("Social Links...", 'ThemeStockyard'), 'facebook' => ts_option_vs_default('social_url_facebook', ''), 'twitter' => ts_option_vs_default('social_url_twitter', ''), 'pinterest' => ts_option_vs_default('social_url_pinterest', ''), 'google_plus' => ts_option_vs_default('social_url_google_plus', ''), 'github' => ts_option_vs_default('social_url_github', ''), 'linkedin' => ts_option_vs_default('social_url_linkedin', ''), 'instagram' => ts_option_vs_default('social_url_instagram', ''), 'flickr' => ts_option_vs_default('social_url_flickr', ''), 'youtube' => ts_option_vs_default('social_url_youtube', ''), 'vimeo' => ts_option_vs_default('social_url_vimeo', ''), 'vk' => ts_option_vs_default('social_url_vk', ''), 'tumblr' => ts_option_vs_default('social_url_tumblr', ''), 'behance' => ts_option_vs_default('social_url_behance', ''), 'dribbble' => ts_option_vs_default('social_url_dribbble', ''), 'soundcloud' => ts_option_vs_default('social_url_soundcloud', ''), 'rss' => ts_option_vs_default('social_url_rss', ''));
        $instance = wp_parse_args((array) $instance, $defaults);
        ?>
        <p>
            <label for="<?php 
        echo esc_attr($this->get_field_id('label'));
        ?>
"><?php 
        _e('Label (optional):', 'ThemeStockyard');
        ?>
</label>
            <input type="text" name="<?php 
        echo esc_attr($this->get_field_name('label'));
        ?>
" value="<?php 
        echo esc_attr($instance['label']);
        ?>
" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('label'));
        ?>
" />
        </p>
        <p>
            <label for="<?php 
        echo esc_attr($this->get_field_id('facebook'));
        ?>
"><?php 
        _e('Facebook URL:', 'ThemeStockyard');
        ?>
</label>
            <input type="text" name="<?php 
        echo esc_attr($this->get_field_name('facebook'));
        ?>
" value="<?php 
        echo esc_attr($instance['facebook']);
        ?>
" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('facebook'));
        ?>
" />
        </p>
        <p>
            <label for="<?php 
        echo esc_attr($this->get_field_id('twitter'));
        ?>
"><?php 
        _e('Twitter URL:', 'ThemeStockyard');
        ?>
</label>
            <input type="text" name="<?php 
        echo esc_attr($this->get_field_name('twitter'));
        ?>
" value="<?php 
        echo esc_attr($instance['twitter']);
        ?>
" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('twitter'));
        ?>
" />
        </p>
        <p>
            <label for="<?php 
        echo esc_attr($this->get_field_id('pinterest'));
        ?>
"><?php 
        _e('Pinterest URL:', 'ThemeStockyard');
        ?>
</label>
            <input type="text" name="<?php 
        echo esc_attr($this->get_field_name('pinterest'));
        ?>
" value="<?php 
        echo esc_attr($instance['pinterest']);
        ?>
" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('pinterest'));
        ?>
" />
        </p>
        <p>
            <label for="<?php 
        echo esc_attr($this->get_field_id('google_plus'));
        ?>
"><?php 
        _e('Google+ URL:', 'ThemeStockyard');
        ?>
</label>
            <input type="text" name="<?php 
        echo esc_attr($this->get_field_name('google_plus'));
        ?>
" value="<?php 
        echo esc_attr($instance['google_plus']);
        ?>
" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('google_plus'));
        ?>
" />
        </p>
        <p>
            <label for="<?php 
        echo esc_attr($this->get_field_id('github'));
        ?>
"><?php 
        _e('Github URL:', 'ThemeStockyard');
        ?>
</label>
            <input type="text" name="<?php 
        echo esc_attr($this->get_field_name('github'));
        ?>
" value="<?php 
        echo esc_attr($instance['github']);
        ?>
" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('github'));
        ?>
" />
        </p>
        <p>
            <label for="<?php 
        echo esc_attr($this->get_field_id('linkedin'));
        ?>
"><?php 
        _e('LinkedIn URL:', 'ThemeStockyard');
        ?>
</label>
            <input type="text" name="<?php 
        echo esc_attr($this->get_field_name('linkedin'));
        ?>
" value="<?php 
        echo esc_attr($instance['linkedin']);
        ?>
" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('linkedin'));
        ?>
" />
        </p>
        <p>
            <label for="<?php 
        echo esc_attr($this->get_field_id('instagram'));
        ?>
"><?php 
        _e('Instagram URL:', 'ThemeStockyard');
        ?>
</label>
            <input type="text" name="<?php 
        echo esc_attr($this->get_field_name('instagram'));
        ?>
" value="<?php 
        echo esc_attr($instance['instagram']);
        ?>
" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('instagram'));
        ?>
" />
        </p>
        <p>
            <label for="<?php 
        echo esc_attr($this->get_field_id('flickr'));
        ?>
"><?php 
        _e('Flickr URL:', 'ThemeStockyard');
        ?>
</label>
            <input type="text" name="<?php 
        echo esc_attr($this->get_field_name('flickr'));
        ?>
" value="<?php 
        echo esc_attr($instance['flickr']);
        ?>
" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('flickr'));
        ?>
" />
        </p>
        <p>
            <label for="<?php 
        echo esc_attr($this->get_field_id('youtube'));
        ?>
"><?php 
        _e('Youtube URL:', 'ThemeStockyard');
        ?>
</label>
            <input type="text" name="<?php 
        echo esc_attr($this->get_field_name('youtube'));
        ?>
" value="<?php 
        echo esc_attr($instance['youtube']);
        ?>
" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('youtube'));
        ?>
" />
        </p>
        <p>
            <label for="<?php 
        echo esc_attr($this->get_field_id('vimeo'));
        ?>
"><?php 
        _e('Vimeo URL:', 'ThemeStockyard');
        ?>
</label>
            <input type="text" name="<?php 
        echo esc_attr($this->get_field_name('vimeo'));
        ?>
" value="<?php 
        echo esc_attr($instance['vimeo']);
        ?>
" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('vimeo'));
        ?>
" />
        </p>
        <p>
            <label for="<?php 
        echo esc_attr($this->get_field_id('vk'));
        ?>
"><?php 
        _e('VK URL:', 'ThemeStockyard');
        ?>
</label>
            <input type="text" name="<?php 
        echo esc_attr($this->get_field_name('vk'));
        ?>
" value="<?php 
        echo esc_attr($instance['vk']);
        ?>
" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('vk'));
        ?>
" />
        </p>
        <p>
            <label for="<?php 
        echo esc_attr($this->get_field_id('tumblr'));
        ?>
"><?php 
        _e('Tumblr URL:', 'ThemeStockyard');
        ?>
</label>
            <input type="text" name="<?php 
        echo esc_attr($this->get_field_name('tumblr'));
        ?>
" value="<?php 
        echo esc_attr($instance['tumblr']);
        ?>
" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('tumblr'));
        ?>
" />
        </p>
        <p>
			<label for="<?php 
        echo esc_attr($this->get_field_id('behance'));
        ?>
"><?php 
        _e('Behance URL:', 'ThemeStockyard');
        ?>
</label>
			<input type="text" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('behance'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('behance'));
        ?>
" value="<?php 
        echo esc_attr($instance['behance']);
        ?>
" />
		</p>
	     
	    <p>
	 		<label for="<?php 
        echo esc_attr($this->get_field_id('dribbble'));
        ?>
"><?php 
        _e('Dribbble URL:', 'ThemeStockyard');
        ?>
</label>
			<input type="text" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('dribbble'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('dribbble'));
        ?>
" value="<?php 
        echo esc_attr($instance['dribbble']);
        ?>
" />
	    </p>

		<p>
			<label for="<?php 
        echo esc_attr($this->get_field_id('soundcloud'));
        ?>
"><?php 
        _e('SoundCloud URL:', 'ThemeStockyard');
        ?>
</label>
			<input type="text" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('soundcloud'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('soundcloud'));
        ?>
" value="<?php 
        echo esc_attr($instance['soundcloud']);
        ?>
" />
		</p>
	     
	    <p>
	 		<label for="<?php 
        echo esc_attr($this->get_field_id('rss'));
        ?>
"><?php 
        _e('RSS URL:', 'ThemeStockyard');
        ?>
</label>
			<input type="text" class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('rss'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('rss'));
        ?>
" value="<?php 
        echo esc_attr($instance['rss']);
        ?>
" />
	    </p>
	    <p><small><?php 
        _e('(use the <strong>[rss_url]</strong> shortcode for the default RSS url)', 'ThemeStockyard');
        ?>
</small></p>
        <?php 
    }
                                            <div id="ts-post-comments-share-wrap" class="clearfix <?php 
echo esc_attr(ts_post_sharing_class());
?>
">
                                                <?php 
$comment_number = get_comments_number();
$ts_using_recommended_disqus_settings = ts_option_vs_default('using_recommended_disqus_settings', 'no');
?>
                                                <a href="<?php 
echo get_permalink() . ts_link2comments();
?>
" class="to-comments-link small-size smoothscroll" id="ts-moon-comment-bubble"><strong><?php 
echo '<span  class="disqus-comment-count" data-disqus-url="' . get_permalink() . '">';
echo intval($comment_number);
echo $ts_using_recommended_disqus_settings == 'yes' ? '</span> ' : ' ';
echo $comment_number == 1 ? __('Comment', 'ThemeStockyard') : __('Comments', 'ThemeStockyard');
echo $ts_using_recommended_disqus_settings == 'yes' ? '' : '</span>';
?>
</strong></a>
                                                <?php 
$ts_sharing_options = ts_sharing_options_on_posts();
if ($ts_sharing_options->show) {
    ?>
            
                                                <div id="page-share" class="not-pulled small">
                                                    <?php 
    echo ts_social_sharing();
    ?>
                                                </div>
                                                <?php 
                <?php 
    if (have_comments()) {
        ?>
                <div id="comments-content">
                    <div class="page-title clearfix">
                        <h6 class="uppercase small"><?php 
        comments_number(__('No Comment', 'ThemeStockyard'), __('One Comment', 'ThemeStockyard'), __('% Comments', 'ThemeStockyard'));
        ?>
</h6>
                        <?php 
        echo do_shortcode('[divider height="10"]');
        ?>
                    </div>

                    <ol class="commentlist <?php 
        echo ts_option_vs_default('show_comments_avatars', 1) ? '' : 'no-comment-avatars';
        ?>
">
                        <?php 
        wp_list_comments(array('callback' => 'ts_custom_comment_list'));
        ?>
                    </ol>

                    <?php 
        if (get_comment_pages_count() > 1 && get_option('page_comments')) {
            ?>
                    <div id="comment-nav" class="comment-nav" role="navigation">
                        <div class="comm-prev"><?php 
            previous_comments_link(__('<i class="icon-chevron-left"></i> Older Comments', 'ThemeStockyard'));
            ?>
</div>
Exemple #14
0
<?php

global $smof_data, $post, $product, $ts_show_sidebar, $ts_sidebar_position, $ts_page_id;
$ts_page_object = get_queried_object();
$ts_page_id = ts_is_woo_shop() ? $ts_page_id : (is_single() ? $post->ID : get_queried_object_id());
$ts_custom_css = get_post_meta($ts_page_id, '_page_css', true);
if (is_product()) {
    $ts_show_sidebar = ts_option_vs_default('show_woocommerce_product_sidebar', 0) == 1 ? 'yes' : 'no';
} else {
    $ts_show_sidebar_option = ts_option_vs_default('show_woocommerce_page_sidebar', 1) == 1 ? 'yes' : 'no';
    $ts_show_sidebar = ts_postmeta_vs_default($ts_page_id, '_page_sidebar', $ts_show_sidebar_option);
}
$ts_sidebar_position = ts_option_vs_default('woocommerce_sidebar_position', 'right');
if (ts_is_woo_shop()) {
    $ts_sidebar_position = ts_postmeta_vs_default($ts_page_id, '_page_sidebar_position', $ts_sidebar_position);
}
get_header();
get_template_part('top');
get_template_part('title-page');
get_template_part('slider');
?>
            <div id="main-container-wrap" class="<?php 
echo esc_attr(ts_main_container_wrap_class('page'));
?>
">
                <div id="main-container" class="container clearfix" data-pos="<?php 
echo esc_attr($ts_sidebar_position);
?>
">
                    <div id="main" class="<?php 
echo esc_attr(ts_main_div_class());
function ts_dynamic_css($color = '', $layout = '', $bg_image = '')
{
    if (function_exists('ts_option_vs_default')) {
        ?>
 
    /******************** ***********************/
    

    /* SECTION 3: TYPOGRAPHY

        Within this section....
        - Section 3a: font-famiy
        - Section 3b: font-size
        - Section 3c: font-style
        - Section 3d: line-height
    ================================================== */
    <?php 
        $logo_font_family = ts_option_vs_default_font('logo_font_family', 'Montserrat');
        $body_font_family = ts_option_vs_default_font('body_font_family', 'Open Sans');
        $h1_font_family = ts_option_vs_default_font('h1_font_family', 'Montserrat');
        $h2_font_family = ts_option_vs_default_font('h2_font_family', 'Montserrat');
        $h3_font_family = ts_option_vs_default_font('h3_font_family', 'Montserrat');
        $h4_font_family = ts_option_vs_default_font('h4_font_family', 'Montserrat');
        $h5_font_family = ts_option_vs_default_font('h5_font_family', 'Open Sans');
        $h6_font_family = ts_option_vs_default_font('h6_font_family', 'Open Sans');
        $stylized_meta_font_family = ts_option_vs_default_font('stylized_meta_font_family', 'Libre Baskerville');
        $stylized_meta_font_style = ts_option_vs_default('stylized_meta_font_style::style', 'italic');
        $form_font_family = ts_option_vs_default_font('form_font_family', 'Open Sans');
        $button_font_family = ts_option_vs_default_font('button_font_family', 'Open Sans');
        $small_font_family = ts_option_vs_default_font('small_font_family', 'Open Sans');
        $main_nav_font_family = ts_option_vs_default_font('main_nav_font_family', 'Open Sans');
        $main_nav_submenu_font = ts_option_vs_default_font('main_nav_submenu_font', 'Open Sans');
        ?>

    /* Section 3a: font-family */
    #logo .logo-text { font-family: "<?php 
        echo esc_attr($logo_font_family);
        ?>
"; }
    body { font-family: "<?php 
        echo esc_attr($body_font_family);
        ?>
"; }
    h1 { font-family: "<?php 
        echo esc_attr($h1_font_family);
        ?>
"; }
    h2 { font-family: "<?php 
        echo esc_attr($h2_font_family);
        ?>
"; }
    h3 { font-family: "<?php 
        echo esc_attr($h3_font_family);
        ?>
"; }
    h4 { font-family: "<?php 
        echo esc_attr($h4_font_family);
        ?>
"; }
    h5,
    .ts-tabs-widget .tab-header li { font-family: "<?php 
        echo esc_attr($h5_font_family);
        ?>
"; }
    h6 { font-family: "<?php 
        echo esc_attr($h6_font_family);
        ?>
"; }
    .stylized-meta { font-family: "<?php 
        echo esc_attr($stylized_meta_font_family);
        ?>
"; <?php 
        echo aq_font_style($stylized_meta_font_style);
        ?>
 }
    .main-nav { font-family: "<?php 
        echo esc_attr($main_nav_font_family);
        ?>
"; }
    .main-nav ul ul { font-family: "<?php 
        echo esc_attr($main_nav_submenu_font);
        ?>
"; }
    #top-bar > .right-side input,
    small,
    .small,
    .smaller,
    .mimic-small,
    .mimic-smaller,
    #header-social,
    .dem-tags a, 
    .post-tags a,
    #copyright-nav,
    .widget .tagcloud a,
    .post .wp-caption-text,
    .mimic-post .wp-caption-text,
    ol.commentlist .comment-head,
    .post-single-prev-next strong { font-family: "<?php 
        echo esc_attr($small_font_family);
        ?>
"; }    
    select,
    textarea, 
    input[type="tel"], 
    input[type="url"],
    input[type="text"], 
    input[type="email"],  
    input[type="search"],
    input[type="submit"],
    input[type="password"],
    .woocommerce-page .select2-drop-active,
    .woocommerce .select2-container .select2-choice { font-family: "<?php 
        echo esc_attr($form_font_family);
        ?>
"; } 
    button,
    .button,
    .wpcf7-submit,
    #button,
    .woocommerce input[type="submit"], 
    .woocommerce input[type="button"], 
    .woocommerce .product-remove a.remove { font-family: "<?php 
        echo esc_attr($button_font_family);
        ?>
"; }

    
    <?php 
        $body_font_size = ts_option_vs_default('body_font_style::size', '14px');
        ?>
    /* Section 3b: font-size */
    body,
    blockquote p { font-size: <?php 
        echo esc_attr($body_font_size);
        ?>
; }
    
    <?php 
        $form_font_size = ts_option_vs_default('form_font_style::size', '14px');
        $form_font_style = ts_option_vs_default('form_font_style::style', 'normal');
        ?>
    select,
    textarea, 
    input[type="tel"], 
    input[type="url"],
    input[type="text"], 
    input[type="email"],  
    input[type="search"],
    input[type="number"],
    input[type="password"],
    .woocommerce-page .select2-drop-active,
    .woocommerce .select2-container .select2-choice { font-size: <?php 
        echo esc_attr($form_font_size);
        ?>
; <?php 
        echo aq_font_style($form_font_style);
        ?>
 }
    
    <?php 
        $h1_font_size = ts_option_vs_default('h1_font_style::size', '36px');
        $h1_font_style = ts_option_vs_default('h1_font_style::style', 'normal');
        $h2_font_size = ts_option_vs_default('h2_font_style::size', '26px');
        $h2_font_style = ts_option_vs_default('h2_font_style::style', 'normal');
        $h3_font_size = ts_option_vs_default('h3_font_style::size', '20px');
        $h3_font_style = ts_option_vs_default('h3_font_style::style', 'normal');
        $h4_font_size = ts_option_vs_default('h4_font_style::size', '15px');
        $h4_font_style = ts_option_vs_default('h4_font_style::style', 'normal');
        $h5_font_size = ts_option_vs_default('h5_font_style::size', '14px');
        $h5_font_style = ts_option_vs_default('h5_font_style::style', 'normal');
        $h6_font_size = ts_option_vs_default('h6_font_style::size', '12px');
        $h6_font_style = ts_option_vs_default('h6_font_style::style', 'normal');
        ?>
    h1,
    #title-bar h2,
    #main-slider-wrap.flexslider-wrap h2 { font-size: <?php 
        echo esc_attr($h1_font_size);
        ?>
; <?php 
        echo aq_font_style($h1_font_style);
        ?>
 }
    h2 { font-size: <?php 
        echo esc_attr($h2_font_size);
        ?>
; <?php 
        echo aq_font_style($h2_font_style);
        ?>
 }
    h3 { font-size: <?php 
        echo esc_attr($h3_font_size);
        ?>
; <?php 
        echo aq_font_style($h3_font_style);
        ?>
 }
    h4 { font-size: <?php 
        echo esc_attr($h4_font_size);
        ?>
; <?php 
        echo aq_font_style($h4_font_style);
        ?>
 }
    h5,
    .ts-tabs-widget .tab-header li { font-size: <?php 
        echo esc_attr($h5_font_size);
        ?>
; <?php 
        echo aq_font_style($h5_font_style);
        ?>
 }
    h6 { font-size: <?php 
        echo esc_attr($h6_font_size);
        ?>
; <?php 
        echo aq_font_style($h6_font_style);
        ?>
 }
    
    <?php 
        $main_nav_font_size = ts_option_vs_default('main_nav_font_style::size', '13px');
        ?>
    .main-nav > ul > li,
    .main-nav > div > ul > li,
    #header-social .social .icon-style,
    .social-icons-widget-style .social .icon-style { font-size: <?php 
        echo esc_attr($main_nav_font_size);
        ?>
; }
    
    <?php 
        $logo_font_size = ts_option_vs_default('logo_font_style::size', '30px');
        $logo_font_style = ts_option_vs_default('logo_font_style::style', 'normal');
        ?>
    #logo .logo-text { font-size: <?php 
        echo esc_attr($logo_font_size);
        ?>
; <?php 
        echo aq_font_style($logo_font_style);
        ?>
 }



    /* SECTION 4: BACKGROUNDS
    ================================================== */
    
    <?php 
        $primary_color = ts_option_vs_default('primary_color', '#EE4643');
        $primary_color_rgb = isset($primary_color) ? ts_hex2rgb($primary_color, 'string') : ts_hex2rgb('#EE4643', 'string');
        $standard_border_color = ts_option_vs_default('standard_border_color', '#eee');
        $subtle_bg_color = ts_option_vs_default('subtle_bg_color', '#f9f9f9');
        ?>

    /* primary/highlight color */
    #top-bar .ts-searchform.form-in-use input,
    .widget_calendar table td#today,
    #ts-news-ticker-nav .flex-direction-nav a,
    .vertical-tabs ul.tab-header li.active:before,
    .horizontal-tabs ul.tab-header li.active:before,
    button,
    .button,
    .wpcf7-submit,
    #button,
    .spinner > div,
    .woocommerce input[type="submit"], 
    .woocommerce input[type="button"], 
    .woocommerce .product-remove a.remove,
    .loop .ts-meta-wrap .meta-item-date { background-color: <?php 
        echo esc_attr($primary_color);
        ?>
; }

    <?php 
        $use_custom_background_image = ts_option_vs_default('use_custom_background_image', 0);
        $custom_background_image = ts_option_vs_default('custom_background_image', null);
        $custom_background_position = ts_option_vs_default('custom_background_positioning::position', 'top left');
        $custom_background_repeat = ts_option_vs_default('custom_background_positioning::repeat', 'repeat');
        $custom_background_attachment = ts_option_vs_default('custom_background_positioning::attachment', 'fixed');
        $background_color = ts_option_vs_default('background_color', '#fff');
        $content_background_color = ts_option_vs_default('content_background_color', '#fff');
        if ($content_background_color && ts_option_vs_default('layout', 1) != 1) {
            $content_bg = $content_background_color;
            $content_bg_rgb = ts_hex2rgb($content_background_color, 'string');
        } else {
            $content_bg = $background_color;
            $content_bg_rgb = ts_hex2rgb($background_color, 'string');
        }
        ?>
    /* body background color */
    body,
    #wrap,
    #ts-style-selector-wrap,
    #ts-style-selector-toggle { background-color: <?php 
        echo esc_attr($background_color);
        ?>
; }
    #ts-main-nav-inner-wrap.stickied,
    body.not-wall-to-wall #wrap,
    .woocommerce #payment, 
    .woocommerce-page #payment,
    .loop .ts-meta-wrap .meta-item-author,
    .traditional-tabs.horizontal-tabs .tab-header li,
    .vertical-tabs ul.tab-header li.active:before { background-color: <?php 
        echo esc_attr($content_bg);
        ?>
; }
    #ts-moon-comment-bubble:before { border-top-color: <?php 
        echo esc_attr($content_bg);
        ?>
; }
    
    <?php 
        if ($use_custom_background_image && $custom_background_image) {
            ?>
    body.has-custom-bg-image { 
        background: url(<?php 
            echo esc_url($custom_background_image);
            ?>
) 
            <?php 
            echo esc_attr($custom_background_position . ' ' . $custom_background_repeat . ' ' . $custom_background_attachment);
            ?>
 !important; 
    }
    <?php 
        }
        ?>

    /* top container */
    #top-wrap,
    #top-bar-wrap,
    #ts-style-selector-wrap,
    #ts-style-selector-toggle,
    #ts-main-nav-inner-wrap.stickied,
    .top-stuff-link-item .search-pocket-wrap .search-pocket { background-color: <?php 
        echo esc_attr($content_bg);
        ?>
; }

    
    /* main nav > sub-menu */
    .main-nav ul ul.children,
    .main-nav ul ul.sub-menu,
    .main-nav ul .main-nav-search-sub-menu,
    .main-nav ul .main-nav-shop-sub-menu { background-color: <?php 
        echo esc_attr($content_bg);
        ?>
; }

    /* subtle background color */
    .subtle-bg-color,
    code.ts-inline-code,
    .pagination>a:hover, 
    .pagination>a:focus, 
    .pagination>a.active, 
    .pagination>span.active,
    #ts-news-ticker-wrap .flex-direction-nav .flex-next,
    .page-links .wp-link-pages > span,
    form#commentform .form-allowed-tags code,
    .woocommerce table.shop_table tfoot th, 
    .woocommerce-page table.shop_table tfoot th,
    .woocommerce #payment div.payment_box, 
    .woocommerce-page #payment div.payment_box,
    .woocommerce .widget_price_filter .ui-slider .ui-slider-handle, 
    .woocommerce-page .widget_price_filter .ui-slider .ui-slider-handle { background-color: <?php 
        echo esc_attr($subtle_bg_color);
        ?>
; }
    
    /* post section background */
    .masonry-cards .card-butt p,
    .tagline-shortcode .tagline,
    .masonry-cards .post-content .post-content-inner,
    .ts-pricing-table .ts-pricing-column { background-color: <?php 
        echo esc_attr($content_bg);
        ?>
; }
    
    <?php 
        $footer_bg_color = ts_option_vs_default('footer_bg_color', '#f5f5f5');
        $copyright_bg_color = ts_option_vs_default('copyright_bg_color', '#EE4643');
        ?>
    /* footer background color */
    #footer-copyright-wrap { background-color: <?php 
        echo esc_attr($footer_bg_color);
        ?>
; }
    #copyright-nav-wrap { background-color: <?php 
        echo esc_attr($copyright_bg_color);
        ?>
; }




    /* TYPOGRAPHY COLORS (and other relevant items)
    ================================================== */
    
    <?php 
        $body_font_color = ts_option_vs_default('body_font_color', '#555');
        ?>
    /* body: plain text */
    body,
    .mobile-menu,
    code.ts-inline-code, 
    form#commentform .form-allowed-tags code,
    .woocommerce-info, 
    .woocommerce-error,
    .woocommerce-message,
    .woocommerce #payment div.payment_box, 
    .woocommerce-page #payment div.payment_box { color: <?php 
        echo esc_attr($body_font_color);
        ?>
; }
    
    /* mobile nav */
    .mobile-menu-icon { background-color: <?php 
        echo esc_attr($body_font_color);
        ?>
; }
    .mobile-menu-icon:before { border-color: <?php 
        echo esc_attr($body_font_color);
        ?>
; }
    
    <?php 
        $heading_font_color = ts_option_vs_default('heading_font_color', '#444');
        ?>
    /* body: h1-6 headings */
    h1, h2, h3, h4, h5, h6 { color: <?php 
        echo esc_attr($heading_font_color);
        ?>
; }
    
    <?php 
        $body_link_color = ts_option_vs_default('body_link_color', '#EE4643');
        $body_title_link_color = ts_option_vs_default('body_title_link_color', '#212121');
        ?>
    /* body: link color */
    a, 
    a:hover,
    a:visited, 
    a:active,
    a:focus { color: <?php 
        echo esc_attr($body_link_color);
        ?>
; } 
    .tp-caption a,
    .tab-head.active,
    #title-bar h1 a,
    #title-bar h2 a,
    h1 a,
    h2 a, 
    h3 a, 
    h4 a,
    h5 a,
    h6 a,
    .post h1 a,
    .post h2 a, 
    .post h3 a, 
    .post h4 a,
    .post h5 a,
    .post h6 a,
    #sidebar h1 a,
    #sidebar h2 a, 
    #sidebar h3 a, 
    #sidebar h4 a,
    #sidebar h5 a,
    #sidebar h6 a,
    #page-share a,
    #ts-post-author a,
    #ts-news-ticker h4 a,
    .post .dem-tags.smaller a,
    .pagination a.active,
    #title-bar .to-comments-link,
    .ts-tabs-widget .tab-header li.active { color: <?php 
        echo esc_attr($body_title_link_color);
        ?>
; }

    <?php 
        $subtle_text_color = ts_option_vs_default('subtle_text_color', '#999');
        ?>
    /* subtle text color */
    del,
    small,
    .small,
    .smaller,
    small a,
    .small a,
    .smaller a,
    .post small a,
    .post .small a,
    .post .smaller a,
    #sidebar small a,
    #sidebar .small a,
    #sidebar .smaller a,
    strike,
    #header-social,
    #header-social ul li a,
    .subtle-text-color,
    .title-bar-caption, 
    .loop .entry .title-info p,
    .widget_rss li .rssSummary,
    ol.commentlist .comment-head,
    .post-single-prev-next a strong,
    .widget_calendar table caption,
    .ts-tabs-widget .tab-header li,
    .ts-tabs-widget .tab-header li:before,
    .ts-searchform button,
    .widget_search button,
    .ts-searchform input[type="submit"],
    .widget_search input[type="submit"],
    #header-social .social .icon-style,
    .social-icons-widget-style .social .icon-style,
    .woocommerce p.stars span a, 
    .woocommerce-page p.stars span a,
    .woocommerce .shop_table .product-name dt,
    #ts-news-ticker-wrap .flex-direction-nav i { color: <?php 
        echo esc_attr($subtle_text_color);
        ?>
; }
    
    
    /* primary color */
    .woocommerce p.stars span a:hover, 
    .woocommerce-page p.stars span a:hover,
    .woocommerce p.stars span a.active, 
    .woocommerce-page p.stars span a.active,
    .ts-tabs-widget .tab-header li.active { color: <?php 
        echo esc_attr($primary_color);
        ?>
; }
    .highlight { background-color: rgba(<?php 
        echo esc_attr($primary_color_rgb);
        ?>
, .1); color: <?php 
        echo esc_attr($primary_color);
        ?>
; }

    <?php 
        $top_container_font_color = ts_option_vs_default('top_container_font_color', '#c3c3c3');
        $top_container_link_color = ts_option_vs_default('top_container_link_color', '#aaa');
        $top_container_link_hover_color = ts_option_vs_default('top_container_link_hover_color', '#EE4643');
        ?>
    /* top container */
    .top-stuff-side { color: <?php 
        echo esc_attr($top_container_font_color);
        ?>
; }
    .top-stuff-side a { color: <?php 
        echo esc_attr($top_container_link_color);
        ?>
; }
    .top-stuff-side a:active,
    .top-stuff-side a:focus,
    .top-stuff-side a:hover { color: <?php 
        echo esc_attr($top_container_link_hover_color);
        ?>
; }
    
    
    
    
    <?php 
        $logo_font_color = ts_option_vs_default('logo_font_color', '#EE4643');
        $logo_tagline_color = ts_option_vs_default('logo_tagline_color', '#808080');
        $top_bar_text_color = ts_option_vs_default('top_bar_text_color', '#aaa');
        $top_bar_link_color = ts_option_vs_default('top_bar_link_color', '#808080');
        ?>
    /* logo tagline */
    #logo a { color: <?php 
        echo esc_attr($logo_font_color);
        ?>
; }
    #logo-tagline { color: <?php 
        echo esc_attr($logo_tagline_color);
        ?>
; }
    #top-bar { color: <?php 
        echo esc_attr($top_bar_text_color);
        ?>
; }
    #top-bar a { color: <?php 
        echo esc_attr($top_bar_link_color);
        ?>
; }
    #top-bar bold,
    #top-bar strong { color: <?php 
        echo esc_attr($top_bar_link_color);
        ?>
; }
    #top-bar .side a:active,
    #top-bar .side a:focus,
    #top-bar .side a:hover,
    #top-bar .middle-area a { color: <?php 
        echo esc_attr($primary_color);
        ?>
; }
    

    <?php 
        $main_nav_link_color = ts_option_vs_default('main_nav_link_color', '#444');
        ?>
    /* main nav */
    .main-nav > ul > li > a, 
    .main-nav > div > ul > li > a { color: <?php 
        echo esc_attr($main_nav_link_color);
        ?>
; }
    <?php 
        $main_nav_hover_color = ts_option_vs_default('main_nav_hover_color', '#EE4643');
        ?>
    .main-nav-wrap #header-social ul li:before,
    .main-nav-wrap #header-social ul li a:hover,
    .main-nav ul > li.menu-item > a:hover,
    .main-nav ul > li.page_item > a:hover,
    .main-nav > ul > li > a:hover, 
    .main-nav > div > ul > li > a:hover, 
    .main-nav > ul > li.current_page_item > a, 
    .main-nav > ul > li.current-menu-item > a,
    .main-nav > div > ul > li.current_page_item > a, 
    .main-nav > div > ul > li.current-menu-item > a,
    .main-nav > ul > li.inuse > a,
    .main-nav > div > ul > li.inuse > a,
    .main-nav > ul > li.current_page_parent > a,
    .main-nav > ul > li.current_page_ancestor > a,
    .main-nav > div > ul > li.current_page_parent > a,
    .main-nav > div > ul > li.current_page_ancestor > a,
    .main-nav > ul > li.current_page_parent > a > .sf-sub-indicator,
    .main-nav > div > ul > li.current_page_ancestor > a > .sf-sub-indicator { color: <?php 
        echo esc_attr($main_nav_hover_color);
        ?>
; }
    .main-nav > ul > li.menu-item-has-children:hover > a:after, 
    .main-nav > div > ul > li.menu-item-has-children:hover > a:after,
    .main-nav > ul > li.menu-item-has-children.sfHover > a:after, 
    .main-nav > div > ul > li.menu-item-has-children.sfHover > a:after,
    .main-nav.normal > ul > li.current_page_item > a:after, 
    .main-nav.normal > ul > li.current-menu-item > a:after,
    .main-nav.normal > div > ul > li.current_page_item > a:after, 
    .main-nav.normal > div > ul > li.current-menu-item > a:after,
    .main-nav > ul > li.inuse > a:after,
    .main-nav > div > ul > li.inuse > a:after,
    .main-nav > ul > li.current_page_parent > a:after,
    .main-nav > div > ul > li.current_page_ancestor > a:after { background-color:<?php 
        echo esc_attr($main_nav_hover_color);
        ?>
; }


    <?php 
        $main_nav_submenu_text_color = ts_option_vs_default('main_nav_submenu_text_color', '#808080');
        $main_nav_submenu_link_color = ts_option_vs_default('main_nav_submenu_link_color', '#575757');
        $main_nav_submenu_hover_color = ts_option_vs_default('main_nav_submenu_hover_color', '#EE4643');
        ?>
    /* main nav: sub-menu */
    .main-nav ul ul.children,
    .main-nav ul ul.sub-menu,
    .main-nav ul .main-nav-search-sub-menu,
    .main-nav ul .main-nav-shop-sub-menu { color: <?php 
        echo esc_attr($main_nav_submenu_text_color);
        ?>
; }
    .main-nav ul ul.children a,
    .main-nav ul ul.sub-menu a,
    .main-nav ul .main-nav-search-sub-menu a,
    .main-nav ul .main-nav-shop-sub-menu a { color: <?php 
        echo esc_attr($main_nav_submenu_link_color);
        ?>
; }    
    .main-nav ul ul li.menu-item-has-children > a:after { border-color: transparent transparent transparent <?php 
        echo esc_attr($main_nav_submenu_link_color);
        ?>
; }
    .main-nav ul ul li.menu-item > a:hover,
    .main-nav ul ul li.page_item > a:hover,
    .main-nav ul ul li.current_page_item > a, 
    .main-nav ul ul li.current-menu-item > a { color: <?php 
        echo esc_attr($main_nav_submenu_hover_color);
        ?>
; }
    .main-nav ul ul li.menu-item-has-children > a:hover:after { border-color: transparent transparent transparent <?php 
        echo esc_attr($main_nav_submenu_hover_color);
        ?>
; }
    .main-nav ul ul.sub-menu del,
    .main-nav ul ul.sub-menu small,
    .main-nav ul ul.sub-menu .small,
    .main-nav ul ul.sub-menu .smaller,
    .main-nav ul ul.sub-menu small a,
    .main-nav ul ul.sub-menu .small a,
    .main-nav ul ul.sub-menu .smaller a,
    .main-nav ul ul.sub-menu .post small a,
    .main-nav ul ul.sub-menu .post .small a,
    .main-nav ul ul.sub-menu .post .smaller a,
    .main-nav ul ul.sub-menu #sidebar small a,
    .main-nav ul ul.sub-menu #sidebar .small a,
    .main-nav ul ul.sub-menu #sidebar .smaller a,
    .main-nav ul ul.sub-menu strike,
    .main-nav ul ul.sub-menu #header-social,
    .main-nav ul ul.sub-menu #header-social ul li a,
    .main-nav ul ul.sub-menu .subtle-text-color,
    .main-nav ul ul.sub-menu .title-bar-caption, 
    .main-nav ul ul.sub-menu .loop .entry .title-info p,
    .main-nav ul ul.sub-menu .widget_rss li .rssSummary,
    .main-nav ul ul.sub-menu ol.commentlist .comment-head,
    .main-nav ul ul.sub-menu .post-single-prev-next a strong,
    .main-nav ul ul.sub-menu .widget_calendar table caption,
    .main-nav ul ul.sub-menu .ts-tabs-widget .tab-header li,
    .main-nav ul ul.sub-menu .ts-tabs-widget .tab-header li:before,
    .main-nav ul ul.sub-menu .ts-searchform button,
    .main-nav ul ul.sub-menu .widget_search button,
    .main-nav ul ul.sub-menu .ts-searchform input[type="submit"],
    .main-nav ul ul.sub-menu .widget_search input[type="submit"],
    .main-nav ul ul.sub-menu #header-social .social .icon-style,
    .main-nav ul ul.sub-menu .social-icons-widget-style .social .icon-style,
    .main-nav ul ul.sub-menu .woocommerce p.stars span a, 
    .main-nav ul ul.sub-menu .woocommerce-page p.stars span a,
    .main-nav ul ul.sub-menu .woocommerce .shop_table .product-name dt { color: <?php 
        echo esc_attr($subtle_text_color);
        ?>
; }

    <?php 
        $footer_widget_font_color = ts_option_vs_default('footer_widget_font_color', '#808080');
        $footer_widget_headings_color = ts_option_vs_default('footer_widget_headings_color', '#808080');
        $footer_widgets_link_color = ts_option_vs_default('footer_widgets_link_color', '#EE4643');
        $copyright_link_color = ts_option_vs_default('copyright_link_color', '#fff');
        $copyright_text_color = ts_option_vs_default('copyright_text_color', '#fff');
        ?>
    /* footer colors */
    #footer-copyright-wrap { color: <?php 
        echo esc_attr($footer_widget_font_color);
        ?>
; }
    #footer a,
    #footer a:active,
    #footer a:focus,
    #footer a:hover,
    #footer .ts-tabs-widget .tab-header li.active { color: <?php 
        echo esc_attr($footer_widgets_link_color);
        ?>
; }
    #footer h1,
    #footer h2,
    #footer h3,
    #footer h4,
    #footer h5,
    #footer h6,
    #footer .ts-tabs-widget .tab-header li { color: <?php 
        echo esc_attr($footer_widget_headings_color);
        ?>
; }
    #copyright-nav { color: <?php 
        echo esc_attr($copyright_text_color);
        ?>
; }
    #copyright-nav a,
    #copyright-nav a:active,
    #copyright-nav a:focus,
    #copyright-nav a:hover { color: <?php 
        echo esc_attr($copyright_link_color);
        ?>
; }
    #copyright-nav ul li { border-color: <?php 
        echo esc_attr($copyright_text_color);
        ?>
; }

    <?php 
        $woocommerce_price_color = ts_option_vs_default('woocommerce_price_color', '#7ac142');
        ?>
    /* woocommerce price */
    .woocommerce .price, 
    .woocommerce-page .price,
    .woocommerce div.product span.price, 
    .woocommerce-page div.product span.price, 
    .woocommerce #content div.product span.price, 
    .woocommerce-page #content div.product span.price, 
    .woocommerce div.product p.price, 
    .woocommerce-page div.product p.price, 
    .woocommerce #content div.product p.price, 
    .woocommerce-page #content div.product p.price,
    .woocommerce ul.products li.product .price, 
    .woocommerce-page ul.products li.product .price,
    .product.woocommerce span.amount,
    .woocommerce div.product .stock, 
    .woocommerce-page div.product .stock, 
    .woocommerce #content div.product .stock, 
    .woocommerce-page #content div.product .stock { color: <?php 
        echo esc_attr($woocommerce_price_color);
        ?>
; }


    /* BORDERS / BORDER COLORS (and other relevant items)
    ================================================== */

    /* primary color */
    .ts-pricing-column.featured,
    button.outline,
    .button.outline,
    #button.outline,
    .loop .post-category-heading a,
    #ts-moon-comment-bubble:hover { border-color: <?php 
        echo esc_attr($primary_color);
        ?>
; }
    .loop-slider-wrap .ts-item-details .comment-bubble:after,
    #ts-moon-comment-bubble:hover:after { border-top-color: <?php 
        echo esc_attr($primary_color);
        ?>
; }
    

    /* standard border color */
    .ts-top,
    #top-bar-wrap,
    #top-bar > .right-area,
    #top-bar > .middle-area { border-color: <?php 
        echo esc_attr($standard_border_color);
        ?>
; }
    
    
    #ts-moon-comment-bubble { border-color: <?php 
        echo esc_attr($standard_border_color);
        ?>
; }
    #ts-moon-comment-bubble:after { border-top-color: <?php 
        echo esc_attr($standard_border_color);
        ?>
; }
    
    
    
    @media only screen and (max-width: 920px) {
        #main-nav,
        .main-nav > ul > li,
        .main-nav > div > ul > li { border-color: <?php 
        echo esc_attr($standard_border_color);
        ?>
; }
        .main-nav ul ul.sub-menu,
        .main-nav ul ul.children { border-top-color: <?php 
        echo esc_attr($standard_border_color);
        ?>
; }
    }
    
    .ts-progress-bar-wrap ,
    body.single-post #ts-post-wrap .dem-tags .sep { background-color: <?php 
        echo esc_attr($standard_border_color);
        ?>
; }
    
    
    #ts-top-mobile-menu,
    .main-nav > ul > li > a,
    .main-nav > div > ul > li > a, 
    .main-nav > ul > li > .sub-menu,
    .main-nav > div > ul > li > .sub-menu,
    .main-nav > ul > li > .children,
    .main-nav > div > ul > li > .children,
    .main-nav ul ul > li.menu-item,
    .main-nav > div ul ul > li.menu-item,
    .main-nav ul ul > li.page_item,
    .main-nav > div ul ul > li.page_item,
    #ts-main-nav-inner-wrap.stickied { background-color: <?php 
        echo esc_attr($content_bg);
        ?>
; }
    
    .ts-progress-bar-wrap,
    body.single-post #ts-post-wrap .dem-tags .sep { background-color: <?php 
        echo esc_attr($standard_border_color);
        ?>
; }
    
    hr,
    abbr,
    acronym { border-bottom-color: <?php 
        echo $standard_border_color;
        ?>
; }
    
    .main-nav-shop-link a,
    
    #header-social .social .icon-style,
    .social-icons-widget-style .social .icon-style,
    body.has-no-footer-widgets #copyright-nav,

    #top-bar-wrap,
    #top-bar-wrap:before,
    #top-bar-wrap.three-part:after,

    #main-slider-wrap.full,

    #ts-news-ticker-wrap,
    #title-bar-wrap,
    body.single-post #ts-post-the-content .ts-gallery-wrapper,
    
    ol.commentlist .comment-avatar img,
    #main .single-entry .ts-about-author .avatar-img-link img,
    .post-widget-comment .widget-thumbnail .thumb-link img,
    
    .has-sidebar-comments-left .single-entry #ts-comments-wrap-wrap,
    .has-sidebar-comments-right .single-entry #ts-comments-wrap-wrap,
    
    #ts-post-comments-share-wrap,
    .search-result-caption,

    .loop .entry .read-more-wrap,
    .loop-default .featured-media-wrap,
    .loop-widget .entry,
    .single-portfolio .post-single-prev-next,

    .ts-post-section-inner,
    #ts-post-featured-media-wrap,

    .pagination a,
    .pagination span,
    .page-links .wp-link-pages > a,
    .page-links .wp-link-pages > span,
    .masonry-cards .post-content .read-more,

    .wp-caption,
    .gallery .gallery-item .gallery-icon img,
    .traditional-tabs.horizontal-tabs .tab-header li.active,
    .widget li,
    .wpmega-widgetarea .widget li,
    .ubermenu-widget-area .widget li,
    .widget .tagcloud a, 
    .post-tags a,
    .widget .tab-header,
    .widget_calendar table td, 
    .widget_calendar table th,
    .widget .tab-header,
    .divider-shortcode.line .divider,
    .divider-shortcode.dotted .divider,
    .divider-shortcode.dashed .divider,
    .divider-shortcode.double-line .divider,
    .divider-shortcode.double-dotted .divider,
    .divider-shortcode.double-dashed .divider,
    .divider-shortcode .divider-sep,
    .divider-shortcode .shapes .ts-circle,
    .divider-shortcode .shapes .ts-square,
    .title-shortcode .title-sep,
    .title-shortcode.dashed .title-sep,
    .title-shortcode.dotted .title-sep,
    .title-shortcode.double-line .title-sep,
    .title-shortcode.double-dashed .title-sep,
    .title-shortcode.double-dotted .title-sep,
    .title-shortcode.underline-full .title-shortcode-htag,
    .title-shortcode.underline-text .title-shortcode-htag span,

    .vertical-tabs ul.tab-header li,
    .vertical-tabs ul.tab-header li:first-child,
    .traditional-tabs.vertical-tabs .tab-contents,
    .traditional-tabs.vertical-tabs ul.tab-header li,
    .simple-tabs.vertical-tabs-left .tab-contents,
    .simple-tabs.vertical-tabs-right .tab-contents,

    .toggle-block,
    .accordion-block
    .toggle-block .tab-body,
    .accordion-block .tab-body,
    .toggles-wrapper .accordion-block,
    .accordion-wrapper .accordion-block,
    .tagline-shortcode,
    .ts-pricing-column,
    .ts-pricing-column ul li,

    .ts-blockquote-shortcode.pull-left,
    .ts-blockquote-shortcode.pull-right,

    .ts-loop-product-title,
    .woocommerce-page div.product #reviews .comment img,
    .woocommerce #content div.product #reviews .comment, 
    .woocommerce div.product #reviews .comment, 
    .woocommerce-page #content div.product #reviews .comment, 
    .woocommerce-page div.product #reviews .comment,
    .woocommerce-info,
    .woocommerce-message,
    .woocommerce table.shop_table tr.cart_item, 
    .woocommerce-page table.shop_table tr.cart_item,
    #sidebar .widget > h5,
    #sidebar .widget .page-title h5,
    #sidebar .widget > h5 > span,
    #sidebar .widget .page-title h5 > span,
    #footer .widget > h5 > span,
    #footer .widget .page-title h5 > span { border-color: <?php 
        echo esc_attr($standard_border_color);
        ?>
; }
    
    <?php 
        $footer_widget_border_color = ts_option_vs_default('footer_widget_border_color', '#e5e5e5');
        ?>
    /* footer widget border color */
    #footer-copyright-wrap,
    #footer .widget *,
    #bottom-ad-inner,
    #copyright-nav,
    #footer-copyright-wrap * { border-color: <?php 
        echo esc_attr($footer_widget_border_color);
        ?>
; }
    




    /* FORM ELEMENT COLORS 
    ================================================== */
    
    <?php 
        $form_font_color = ts_option_vs_default('form_font_color', '#808080');
        $form_background_color = ts_option_vs_default('form_background_color', '#eee');
        ?>
    .woocommerce .select2-container .select2-choice,
    .woocommerce-page .select2-drop-active,
    .wp-editor-container,
    input.input-text, 
    input[type="text"], 
    input[type="search"], 
    input[type="email"], 
    input[type="password"],
    input[type="number"],
    input[type="tel"], 
    input[type="url"], 
    textarea, 
    select { 
        background-color: <?php 
        echo esc_attr($form_background_color);
        ?>
;
        color: <?php 
        echo esc_attr($form_font_color);
        ?>
;
    }
    .ts-searchform button { color: <?php 
        echo esc_attr($form_font_color);
        ?>
 !important; }

    <?php 
        $footer_form_font_color = ts_option_vs_default('footer_form_font_color', '#808080');
        $footer_form_background_color = ts_option_vs_default('footer_form_background_color', '#eee');
        ?>
    #footer input[type="text"], 
    #footer input[type="search"], 
    #footer input[type="email"], 
    #footer input[type="password"],
    #footer input[type="number"],
    #footer input[type="tel"], 
    #footer input[type="url"], 
    #footer textarea, 
    #footer select { 
        background-color: <?php 
        echo esc_attr($footer_form_background_color);
        ?>
;
        color: <?php 
        echo esc_attr($footer_form_font_color);
        ?>
;
    }
    #footer .ts-searchform button { color: <?php 
        echo esc_attr($footer_form_font_color);
        ?>
 !important; }
    
    
    /*======================================================================== 
                                #STANDARD COLORS
                                - borders
                                - backgrounds
                                - text
                                - buttons
    =========================================================================*/
    .border-standard { border-color: <?php 
        echo esc_attr($standard_border_color);
        ?>
 !important; }
    .border-primary { border-color: <?php 
        echo esc_attr($primary_color);
        ?>
 !important; }

    /* Begin Background Colors */
    .bg-primary { background-color: <?php 
        echo esc_attr($primary_color);
        ?>
 !important; }

    /* Begin Text Colors */
    .primary-color, 
    .color-shortcode.primary,
    .color-primary { color: <?php 
        echo esc_attr($primary_color);
        ?>
 !important; }

    /* Begin Button Colors */
    .button.default,
    .button.primary {
        background-color: <?php 
        echo esc_attr($primary_color);
        ?>
 !important;
    }

<?php 
    }
}
function ts_update_postviews()
{
    if (!wp_verify_nonce($_REQUEST['nonce'], "ts_update_postviews_nonce")) {
        exit('no funny business');
    }
    if (ts_option_vs_default('show_titlebar_post_view_count', 0) == 1) {
        $post = get_post($_POST['pid']);
        if (is_object($post) && isset($post->ID)) {
            $post_view_count = ts_postmeta_vs_default($post->ID, '_p_ts_postviews', 0);
            $post_view_count_text = sprintf(_n('1 view', '%s views', $post_view_count, 'ThemeStockyard'), $post_view_count);
            $post_view_count++;
            update_post_meta($post->ID, '_p_ts_postviews', $post_view_count);
            return $post_view_count_text;
        }
    }
    exit;
}
Exemple #17
0
<link rel="apple-touch-icon-precomposed" href="<?php 
    echo esc_url($smof_data['iphone_icon']);
    ?>
">
<?php 
}
if (trim(ts_option_vs_default('iphone_icon_retina', ''))) {
    ?>
<!-- For iPhone 4 Retina display -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php 
    echo esc_url($smof_data['iphone_icon_retina']);
    ?>
">
<?php 
}
if (trim(ts_option_vs_default('ipad_icon', ''))) {
    ?>
<!-- For iPad -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php 
    echo esc_url($smof_data['ipad_icon']);
    ?>
">
<?php 
}
ts_grab_google_fonts(true);
?>
<link rel="pingback" href="<?php 
bloginfo('pingback_url');
?>
" />
<script type="text/javascript">
Exemple #18
0
<?php

/**
 * Loop Price
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     1.6.4
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $product;
if (ts_option_vs_default('show_shop_prices_on_results', 1) != 1) {
    return;
}
?>

<?php 
if ($price_html = $product->get_price_html()) {
    ?>
	<span class="price"><?php 
    echo ts_escape($price_html);
    ?>
</span>
<?php 
}
Exemple #19
0
<?php

/*
Template Name: Blog
*/
global $smof_data;
$ts_page_object = get_queried_object();
$ts_page_id = is_single() ? $post->ID : get_queried_object_id();
$ts_custom_css = get_post_meta($ts_page_id, '_page_css', true);
$ts_show_sidebar_option = isset($smof_data['show_page_sidebar']) && $smof_data['show_page_sidebar'] < 1 ? 'no' : 'yes';
$ts_show_sidebar = ts_postmeta_vs_default($post->ID, '_page_sidebar', $ts_show_sidebar_option);
$ts_sidebar_position_option = ts_option_vs_default('page_sidebar_position', 'right');
$ts_sidebar_position = ts_postmeta_vs_default($ts_page_id, '_page_sidebar_position', $ts_sidebar_position_option);
$ts_infinite_scroll = ts_option_vs_default('infinite_scroll_on_blog_template', 0);
get_header();
get_template_part('top');
get_template_part('title-page');
?>
            <div id="main-container-wrap" class="<?php 
echo esc_attr(ts_main_container_wrap_class('page'));
?>
">
                <div id="main-container" class="container clearfix">
                    <div id="main" class="<?php 
echo esc_attr(ts_main_div_class());
?>
 clearfix">
                        <div class="entry single-entry clearfix">
                            <div class="post">
                                <?php 
if (have_posts()) {
        </div>

        <div class="ts-loop-product-title">
            <h4><a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></h4>
        </div>
        
        <div class="ts-loop-product-bottom">
            
            <?php 
if (ts_option_vs_default('show_shop_reviews_on_results', 1) == 1 || ts_option_vs_default('show_shop_prices_on_results', 1) == 1) {
    ?>
            <div class="price-wrap">
                <?php 
    /**
     * woocommerce_after_shop_loop_item_title hook
     *
     * @hooked woocommerce_template_loop_price - 10
     */
    do_action('woocommerce_after_shop_loop_item_title');
    ?>
            </div>
            <?php 
}
?>
        </div>
Exemple #21
0
    $imagew = 1040;
    $imageh = 460;
}
$ts_query = isset($atts) && $atts['default_query'] === false ? new WP_Query($atts) : $wp_query;
$atts = isset($atts) ? $atts : array();
?>
                <div class="loop-wrap loop-banner-wrap <?php 
echo esc_attr(ts_loop_wrap_class($atts));
?>
">
                    <div class="hfeed entries blog-entries loop loop-banner <?php 
echo esc_attr($entries_class);
?>
">
                        <?php 
$exc_lnth = ts_option_vs_default('excerpt_length_banner', 60);
$excerpt_length = isset($atts['excerpt_length']) && $atts['excerpt_length'] != '' ? $atts['excerpt_length'] : $exc_lnth;
$ts_show = ts_maybe_show_blog_elements($atts);
$show_excerpt = $excerpt_length == '0' || !$ts_show->excerpt ? false : true;
$title_size = ts_get_blog_loop_title_size($atts, 2);
$text_align = ts_get_blog_loop_text_align($atts);
if ($ts_query->have_posts()) {
    $i = 1;
    $paged = get_query_var('paged') ? get_query_var('paged') : 1;
    $limit = isset($atts['limit']) ? $atts['limit'] : get_option('posts_per_page');
    while ($ts_query->have_posts()) {
        $ts_query->the_post();
        $atts['exclude_these_later'] = isset($atts['exclude_these_later']) ? $atts['exclude_these_later'] : '';
        if (!ts_attr_is_false($atts['exclude_these_later'])) {
            $ts_previous_posts[] = $ts_query->post->ID;
        }
Exemple #22
0
                <?php 
if (ts_option_vs_default('show_back_to_top', 0) == 1) {
    ?>
                <div id="ts-back-to-top-wrap">
                    <a href="#wrap" id="ts-back-to-top" class="smoothscroll-up"><i class="fa fa-arrow-up"></i></a>
                </div>
                <?php 
}
?>
                
            </div>
        </div>
    </div>
<?php 
$ts_disqus_shortname = ts_option_vs_default('disqus_shortname', '');
if (ts_option_vs_default('use_disqus', 1) == 1 && trim($ts_disqus_shortname)) {
    ?>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '<?php 
    echo esc_js($ts_disqus_shortname);
    ?>
'; // required: replace example with your forum shortname
(function($) {
    $(window).load(function() {
        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function () {
            var s = document.createElement('script'); s.async = true;
            s.type = 'text/javascript';
            s.src = '//<?php 
    echo esc_js($ts_disqus_shortname);
} else {
    $entries_class = 'no-sidebar';
}
$ts_query = isset($atts) && $atts['default_query'] === false ? new WP_Query($atts) : $wp_query;
$atts = isset($atts) ? $atts : array();
?>
                <div class="loop-wrap loop-medium-image-wrap <?php 
echo esc_attr(ts_loop_wrap_class($atts));
?>
">
                    <div class="hfeed entries blog-entries loop loop-medium-image <?php 
echo esc_attr($entries_class);
?>
">
                        <?php 
$exc_lnth = ts_option_vs_default('excerpt_length_standard', 160);
$excerpt_length = isset($atts['excerpt_length']) && $atts['excerpt_length'] != '' ? $atts['excerpt_length'] : $exc_lnth;
$ts_show = ts_maybe_show_blog_elements($atts);
$show_excerpt = $excerpt_length == '0' || !$ts_show->excerpt ? false : true;
$title_size = ts_get_blog_loop_title_size($atts, 4);
$text_align = ts_get_blog_loop_text_align($atts);
$allow_vids = isset($atts['allow_videos']) ? $atts['allow_videos'] : '';
$allow_gals = isset($atts['allow_galleries']) ? $atts['allow_galleries'] : '';
$mw = 510;
$mh = ts_loop_media_height('list', $atts, $mw);
if ($ts_query->have_posts()) {
    while ($ts_query->have_posts()) {
        $ts_query->the_post();
        $atts['exclude_these_later'] = isset($atts['exclude_these_later']) ? $atts['exclude_these_later'] : '';
        if (!ts_attr_is_false($atts['exclude_these_later'])) {
            $ts_previous_posts[] = $ts_query->post->ID;
Exemple #24
0
<?php

global $ts_style_selector_default_primary_color;
$ts_style_selector_default_primary_color = ts_option_vs_default('primary_color', '#ee4643');
global $ts_style_selector_colors;
$ts_style_selector_colors = array(__('Coral', 'ThemeStockyard') => '#ee4643', __('Faded Rose', 'ThemeStockyard') => '#E2A8A8', __('Peach', 'ThemeStockyard') => '#F28D7B', __('Purple', 'ThemeStockyard') => '#8e587a', __('Navy', 'ThemeStockyard') => '#134063', __('Blue', 'ThemeStockyard') => '#365d95', __('Teal', 'ThemeStockyard') => '#1E7775', __('Sea Green', 'ThemeStockyard') => '#67a788', __('Sage', 'ThemeStockyard') => '#3ab54b', __('Green', 'ThemeStockyard') => '#7F9614', __('Mustard Yellow', 'ThemeStockyard') => '#E8B71A', __('Orange', 'ThemeStockyard') => '#F28707', __('Brown', 'ThemeStockyard') => '#9b7c56', __('Gold', 'ThemeStockyard') => '#D9B753', __('Gray', 'ThemeStockyard') => '#3b3b3b');
global $ts_style_selector_bg_options;
$ts_style_selector_bg_options = array(__('Grunge Wall', 'ThemeStockyard') => 'grunge-wall', __('Bright Squares', 'ThemeStockyard') => 'bright-squares', __('Retina Wood', 'ThemeStockyard') => 'retina_wood', __('Sneaker Mesh', 'ThemeStockyard') => 'sneaker_mesh_fabric', __('Arches', 'ThemeStockyard') => 'arches', __('Dark Wood', 'ThemeStockyard') => 'dark_wood', __('Escheresque 1', 'ThemeStockyard') => 'escheresque_ste', __('Escheresque 2', 'ThemeStockyard') => 'escheresque', __('Google Play pattern', 'ThemeStockyard') => 'gplaypattern', __('Graphy', 'ThemeStockyard') => 'graphy', __('3 pixel squares', 'ThemeStockyard') => 'px_by_Gr3g', __('Stresses Linen', 'ThemeStockyard') => 'stressed_linen', __('Tileable Wood', 'ThemeStockyard') => 'tileable_wood_texture', __('Type', 'ThemeStockyard') => 'type', __('Food', 'ThemeStockyard') => 'food', __('Green Cup', 'ThemeStockyard') => 'green_cup', __('School', 'ThemeStockyard') => 'school', __('Skulls', 'ThemeStockyard') => 'skulls', __('Swirl Pattern', 'ThemeStockyard') => 'swirl_pattern', __('Symphony', 'ThemeStockyard') => 'symphony');
function ts_print_style_selector_colors()
{
    global $ts_style_selector_colors, $ts_style_selector_default_primary_color;
    $current_color = strtolower($ts_style_selector_default_primary_color);
    foreach ($ts_style_selector_colors as $key => $value) {
        $value = strtolower($value);
        $active = '#' . $current_color == $value || $current_color == $value ? 'active' : '';
        $_value = substr($value, 0, 1) == '#' ? strtolower(substr($value, 1)) : strtolower($value);
        echo '<a title="' . esc_attr($key) . '" data-color="' . esc_attr($value) . '" class="' . esc_attr($active) . ' ts-demo-test-color ts-demo-test-color-' . esc_attr($_value) . '">&nbsp;</a>';
    }
}
function ts_print_style_selector_bg_options()
{
    global $ts_style_selector_bg_options;
    $current_bg = '';
    foreach ($ts_style_selector_bg_options as $key => $value) {
        $active = $current_bg == $value ? 'active border-primary' : '';
        echo '<a title="' . esc_attr($key) . '" data-bg="' . esc_attr($value) . '" class="' . esc_attr($active) . '">&nbsp;</a>';
    }
}
function ts_print_style_selector_skin_options()
{
    $ts_style_selector_skins = array('Light' => 'light', 'Dark' => 'dark');
Exemple #25
0
        ?>
                                    
                                        <?php 
        if ($ts_direction_links == 'yes') {
            ts_post_direction_nav();
        }
        ?>
                                    
                                        <?php 
        $show_related_option = ts_option_vs_default('show_related_blog_posts', 1) == 1 ? 'yes' : 'no';
        $show_related = ts_postmeta_vs_default($post->ID, '_p_related_posts', $show_related_option);
        if ($show_related == '1' || $show_related == 'yes') {
            ?>
                                        <div class="ts-related-posts-on-single ts-post-section-inner">
                                            <h5 class="smaller uppercase"><?php 
            echo ts_option_vs_default('related_blog_posts_title_text', 'Related Posts');
            ?>
</h4>
                                            <?php 
            $args = array('include' => 'related', 'limit' => 3, 'show_pagination' => 'no', 'media_width' => 480, 'media_height' => 360, 'title_size' => 4, 'allow_videos' => 0, 'allow_galleries' => 0);
            echo ts_blog('3columns', $args);
            ?>
                                        </div>
                                        <?php 
        }
        ?>
                                        
                                    </div>
                                    
                                    <div id="ts-comments-wrap-wrap" class="clearfix <?php 
        echo esc_attr(ts_single_comments_wrap_wrap_class());
Exemple #26
0
<?php

global $smof_data, $ts_page_id;
$ts_page_object = get_queried_object();
$ts_page_id = is_single() ? $post->ID : get_queried_object_id();
$ts_show_top_ticker_option = ts_option_vs_default('show_page_top_ticker', 0) == 1 ? 'yes' : 'no';
$ts_show_top_ticker = ts_postmeta_vs_default($ts_page_id, '_page_top_ticker', $ts_show_top_ticker_option);
$crop_width = ts_option_vs_default('cropped_featured_image_width_full', 1040, true);
$crop_height = 0;
get_header();
get_template_part('top');
get_template_part('title-page');
?>
            <div id="main-container-wrap" class="<?php 
echo esc_attr(ts_main_container_wrap_class('page'));
?>
">
                <?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
                <div id="main-container" class="container clearfix">
                    <div id="main" class="no-sidebar clearfix">
                        <div class="entry single-entry clearfix">                     
                            <div id="ts-post-content-sidebar-wrap" class="clearfix">
                                <div id="ts-post-wrap">
                                    <div id="ts-post-featured-media-wrap">
                                        <div class="featured-photo text-center"><a href="<?php 
        echo esc_url(get_permalink());
        ?>
Exemple #27
0
} else {
    $entries_class = 'no-sidebar';
}
$ts_query = isset($atts) && $atts['default_query'] === false ? new WP_Query($atts) : $wp_query;
$atts = isset($atts) ? $atts : array();
?>
                <div class="loop-wrap loop-2-column-wrap <?php 
echo esc_attr(ts_loop_wrap_class($atts));
?>
">
                    <div class="hfeed entries blog-entries loop loop-2-column <?php 
echo esc_attr($entries_class);
?>
 clearfix">
                        <?php 
$exc_lnth = ts_option_vs_default('excerpt_length_2col_medium', 320);
$excerpt_length = isset($atts['excerpt_length']) && $atts['excerpt_length'] != '' ? $atts['excerpt_length'] : $exc_lnth;
$ts_show = ts_maybe_show_blog_elements($atts);
$show_excerpt = $excerpt_length == '0' || !$ts_show->excerpt ? false : true;
$title_size = ts_get_blog_loop_title_size($atts, 2);
$text_align = ts_get_blog_loop_text_align($atts);
$allow_vids = isset($atts['allow_videos']) ? $atts['allow_videos'] : 'yes';
$allow_gals = isset($atts['allow_galleries']) ? $atts['allow_galleries'] : 'yes';
if ($ts_query->have_posts()) {
    $i = 1;
    while ($ts_query->have_posts()) {
        $ts_query->the_post();
        $atts['exclude_these_later'] = isset($atts['exclude_these_later']) ? $atts['exclude_these_later'] : '';
        if (!ts_attr_is_false($atts['exclude_these_later'])) {
            $ts_previous_posts[] = $ts_query->post->ID;
        }
     $style = 'background-image:url(' . esc_url($img) . ');height:' . absint($h) . 'px';
     $img = $img_blank;
     $img_wrap_begin = '';
     $img_wrap_end = '';
 }
 // note: $style variable is escaped above
 echo '<li class="' . esc_attr($ts_slider_type) . '-item ts-slider-item" style="' . esc_attr($style) . '" data-width="' . absint($w) . '" data-height="' . absint($h) . '">' . "\n";
 $img_height = $ts_slider_type == 'carousel' ? 'height="' . absint($h) . '"' : '';
 if ($img) {
     $alt_text = $get_alt_text ? ts_get_attachment_alt_text($slider_photo_id) : '';
     $img_html = $img_wrap_begin . '<img src="' . esc_url($img) . '" width="' . absint($w) . '" ' . $img_height . ' alt=""/>' . $img_wrap_end . "\n";
 } elseif ($vimeo || $youtube) {
     $rand_id = mt_rand();
     if ($vimeo) {
         $qs_addons = ts_get_video_qs_addons($vimeo, '&amp;');
         $color = str_replace('#', '', ts_option_vs_default('primary_color', ''));
         $video_src = 'https://player.vimeo.com/video/' . $video_id . '?api=1&amp;title=0&amp;byline=0&amp;portrait=0&amp;color=' . $color;
         $video_src .= '&amp;player_id=' . $video_service . '-' . $slider->post->ID . '-' . $rand_id . $qs_addons;
         $iframe_class = 'ts-vimeo-player';
     } else {
         $qs_addons = ts_get_video_qs_addons($youtube, '&amp;');
         $video_src = 'https://www.youtube.com/embed/' . $video_id . '?enablejsapi=1&amp;rel=0&amp;version=3&amp;hd=1' . $qs_addons;
         $iframe_class = 'ts-youtube-player';
     }
     echo '<div class="fluid-width-video-wrapper"><div>';
     echo '<iframe id="' . esc_attr($video_service . '-' . $slider->post->ID . '-' . $rand_id) . '" src="' . esc_url($video_src) . '" width="' . absint($w) . '" ' . $img_height . ' data-videoid="' . esc_attr($video_id) . '" class="' . esc_attr($iframe_class) . '" allowFullScreen webkitAllowFullScreen></iframe>';
     echo '</div></div>' . "\n";
 }
 if ($img) {
     echo strip_tags($link_begin, '<a>');
     echo $ts_slider_type == 'flex' && $slider_width_class == 'full' ? '' : strip_tags($img_html, '<a><img>');
Exemple #29
0
/*-----------------------------------------------------------------------------------*/
/*	Alert Config
/*-----------------------------------------------------------------------------------*/
$ts_shortcodes['alert'] = array('no_preview' => true, 'params' => array('type' => array('type' => 'select', 'label' => __('Alert Type', 'ThemeStockyard'), 'desc' => __('Select the type of alert message', 'ThemeStockyard'), 'options' => array('general' => __('General', 'ThemeStockyard'), 'error' => __('Error', 'ThemeStockyard'), 'success' => __('Success', 'ThemeStockyard'), 'notice' => __('Notice', 'ThemeStockyard'))), 'content' => array('std' => __('Text Goes Here', 'ThemeStockyard'), 'type' => 'textarea', 'label' => __('Alert Content', 'ThemeStockyard'), 'desc' => __('Insert the alert text', 'ThemeStockyard'), 'use_selection' => true)), 'shortcode' => '[alert type="{{type}}"]{{content}}[/alert]', 'popup_title' => __('Alert Shortcode', 'ThemeStockyard'));
/*-----------------------------------------------------------------------------------*/
/*	Blockquote Config
/*-----------------------------------------------------------------------------------*/
$ts_shortcodes['blockquote'] = array('no_preview' => true, 'params' => array('content' => array('std' => __('Text Goes Here', 'ThemeStockyard'), 'type' => 'textarea', 'label' => __('Blockquote Content', 'ThemeStockyard'), 'use_selection' => true), 'attributed_to' => array('std' => '', 'type' => 'text', 'label' => __('Button URL', 'ThemeStockyard'), 'desc' => __('Example: Ernest Hemingway', 'ThemeStockyard')), 'atrributed_to_url' => array('std' => '', 'type' => 'text', 'label' => __('&#8220;Attributed To&#8221; URL', 'ThemeStockyard'), 'desc' => __('http://example.com', 'ThemeStockyard')), 'align' => array('type' => 'select', 'label' => __('Align Text', 'ThemeStockyard'), 'options' => array('left' => __('Left', 'ThemeStockyard'), 'right' => __('Right', 'ThemeStockyard')), 'std' => 'left'), 'pull' => array('type' => 'select', 'label' => __('Pull Direction', 'ThemeStockyard'), 'options' => array('' => __('[none]', 'ThemeStockyard'), 'left' => __('Left', 'ThemeStockyard'), 'right' => __('Right', 'ThemeStockyard')))), 'shortcode' => '[blockquote pull="{{pull}}" align="{{align}}" attributed_to="{{attributed_to}}" attributed_to_url="{{attributed_to_url}}"]{{content}}[/blockquote]', 'popup_title' => __('Blockquote Shortcode', 'ThemeStockyard'));
/*-----------------------------------------------------------------------------------*/
/*	Blog Config
/*-----------------------------------------------------------------------------------*/
$ts_shortcodes['blog'] = array('no_preview' => true, 'params' => array('layout' => array('type' => 'select', 'label' => __('Blog Layout', 'ThemeStockyard'), 'desc' => __('Select the layout for the blog shortcode', 'ThemeStockyard'), 'options' => array('' => __('Default', 'ThemeStockyard'), 'classic' => __('Classic', 'ThemeStockyard'), '2-column-grid' => __('2 Column Grid', 'ThemeStockyard'), '3-column-grid' => __('3 Column Grid', 'ThemeStockyard'), '4-column-grid' => __('4 Column Grid', 'ThemeStockyard'), 'masonry' => __('Masonry', 'ThemeStockyard'), 'list' => __('List', 'ThemeStockyard'))), 'posts_per_page' => array('type' => 'select', 'label' => __('Posts Per Page', 'ThemeStockyard'), 'desc' => __('Select number of posts per page', 'ThemeStockyard'), 'options' => ts_shortcodes_range(30, true, true), 'std' => 10), 'show_pagination' => array('type' => 'select', 'label' => __('Show Pagination?', 'ThemeStockyard'), 'desc' => __('Not recommended for pages that have more than one instance of a blog shortcode', 'ThemeStockyard'), 'options' => $reverse_choices, 'std' => 'no'), 'infinite_scroll' => array('type' => 'select', 'label' => __('Turn on Infinite Scrolling?', 'ThemeStockyard'), 'desc' => __('Set to &#8220;Yes&#8221; to automatically hide pagination and load more posts via ajax when scrolling the page', 'ThemeStockyard'), 'options' => array('no' => __('No', 'ThemeStockyard'), 'yes' => __('Yes (load more on scroll)', 'ThemeStockyard'), 'yes_button' => __('Yes (load more on button click)', 'ThemeStockyard')), 'std' => 'no'), 'infinite_scroll_limit' => array('type' => 'select', 'label' => __('Infinite Scroll Limit', 'ThemeStockyard'), 'desc' => __('Maximum number of times the Infinite Scroll should run - only works with "load more on scroll".', 'ThemeStockyard'), 'options' => ts_shortcodes_range(30, 'unlimited'), 'std' => 0), 'infinite_scroll_button_text' => array('type' => 'text', 'label' => __('Infinite Scrolling button text', 'ThemeStockyard'), 'desc' => __('Only works if the previous setting is "Yes (load more on button click)".', 'ThemeStockyard'), 'std' => ts_option_vs_default('infinite_scroll_button_text', 'Load more posts')), 'cat' => array('type' => 'multiple_select', 'label' => __('Categories', 'ThemeStockyard'), 'desc' => __('Select a category or leave blank for all', 'ThemeStockyard'), 'options' => ts_shortcodes_categories('category')), 'include' => array('type' => 'text', 'label' => __('Post "IDs" to include...', 'ThemeStockyard'), 'desc' => __('Display only certain posts by listing their IDs here (separated by commas)', 'ThemeStockyard')), 'exclude' => array('type' => 'text', 'label' => __('Post "IDs" to <em>exclude</em>...', 'ThemeStockyard'), 'desc' => __('Prevent certain posts from displaying by listing their IDs here (separated by commas)', 'ThemeStockyard')), 'exclude_previous_posts' => array('type' => 'radio_inline', 'label' => __('Exclude previous posts?', 'ThemeStockyard'), 'desc' => __('This option can prevent posts from the slider or other instances of blog shortcodes from appearing.', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'exclude_these_later' => array('type' => 'radio_inline', 'label' => __('Exclude these posts later?', 'ThemeStockyard'), 'desc' => __('This option can prevent *these* posts from appearing in other instances of blog shortcodes.', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'title_size' => array('type' => 'text', 'label' => __('Title Size', 'ThemeStockyard'), 'desc' => __('Examples: H1, H2, H3, H4, H5, H6... or enter any font size (ex: 16px). Leave blank for default.', 'ThemeStockyard')), 'text_align' => array('type' => 'select', 'label' => __('Align Text', 'ThemeStockyard'), 'options' => $align_options, 'std' => ''), 'excerpt_length' => array('type' => 'text', 'label' => __('Excerpt Length (leave blank for default)', 'ThemeStockyard'), 'desc' => __('Maximum number of characters to show in the excerpt. Example: 100', 'ThemeStockyard')), 'show_category' => array('type' => 'radio_inline', 'label' => __('Show Category?', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'show_media' => array('type' => 'radio_inline', 'label' => __('Show Media?', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'show_excerpt' => array('type' => 'radio_inline', 'label' => __('Show Excerpt?', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'show_meta' => array('type' => 'radio_inline', 'label' => __('Show Meta? (category, author, etc)', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'show_read_more' => array('type' => 'radio_inline', 'label' => __('Show &#8220;Read More&#8221; text?', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'image_orientation' => array('type' => 'select', 'label' => __('Image Orientation?', 'ThemeStockyard'), 'desc' => __('Only useful with "2 Column Grid", "3 Column Grid", "4 Column Grid", and "List" layouts.', 'ThemeStockyard'), 'options' => array('' => __('Use default', 'ThemeStockyard'), '3:2' => __('3:2 (landscape)', 'ThemeStockyard'), '16:9' => __('16:9 (landscape)', 'ThemeStockyard'), '16:10' => __('16:10 (landscape)', 'ThemeStockyard'), '2:3' => __('2:3 (portrait)', 'ThemeStockyard'), '9:16' => __('16:9 (portrait)', 'ThemeStockyard'), '10:16' => __('16:10 (portrait)', 'ThemeStockyard'), '1:1' => __('1:1 (square)', 'ThemeStockyard')), 'std' => ''), 'allow_videos' => array('type' => 'radio_inline', 'label' => __('Allow Videos?', 'ThemeStockyard'), 'desc' => __('If set to &#8220;No&#8221, only featured images will be shown. (Videos are not compatible with "2", "3", and "4 Column Grid" layouts)', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'allow_galleries' => array('type' => 'radio_inline', 'label' => __('Allow Galleries?', 'ThemeStockyard'), 'desc' => __('If set to &#8220;No&#8221, only featured images (but not galleries) will be shown.', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'ignore_sticky_posts' => array('type' => 'select', 'label' => __('Ignore Sticky Posts?', 'ThemeStockyard'), 'options' => $reverse_bool_choices)), 'shortcode' => '[blog layout="{{layout}}" limit="{{posts_per_page}}" infinite_scroll="{{infinite_scroll}}" infinite_scroll_limit="{{infinite_scroll_limit}}" infinite_scroll_button_text="{{infinite_scroll_button_text}}" cat="{{cat}}" include="{{include}}" exclude="{{exclude}}" exclude_previous_posts="{{exclude_previous_posts}}" exclude_these_later="{{exclude_these_later}}" excerpt_length="{{excerpt_length}}" title_size="{{title_size}}" text_align="{{text_align}}" show_pagination="{{show_pagination}}" show_category="{{show_category}}" show_media="{{show_media}}" show_excerpt="{{show_excerpt}}" show_meta="{{show_meta}}" show_read_more="{{show_read_more}}" image_orientation="{{image_orientation}}" allow_videos="{{allow_videos}}" allow_galleries="{{allow_galleries}}" ignore_sticky_posts="{{ignore_sticky_posts}}"][/blog]', 'popup_title' => __('Blog Shortcode', 'ThemeStockyard'));
/*-----------------------------------------------------------------------------------*/
/*	Blog Banner Config
/*-----------------------------------------------------------------------------------*/
$ts_shortcodes['blog_banner'] = array('no_preview' => true, 'params' => array('columns' => array('type' => 'select', 'label' => __('Columns', 'ThemeStockyard'), 'desc' => __('Select the column number', 'ThemeStockyard'), 'options' => ts_shortcodes_range(2, false, false), 'std' => 2), 'posts_per_page' => array('type' => 'select', 'label' => __('Posts Per Page', 'ThemeStockyard'), 'desc' => __('Select number of posts per page', 'ThemeStockyard'), 'options' => ts_shortcodes_range(20, true, true), 'std' => 2), 'fullwidth' => array('type' => 'select', 'label' => __('Fullwidth?', 'ThemeStockyard'), 'desc' => __('Only works when no sidebar is present', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'show_pagination' => array('type' => 'select', 'label' => __('Show Pagination?', 'ThemeStockyard'), 'desc' => __('Not recommended for pages that have more than one instance of a blog shortcode', 'ThemeStockyard'), 'options' => $reverse_choices, 'std' => 'no'), 'infinite_scroll' => array('type' => 'select', 'label' => __('Turn on Infinite Scrolling?', 'ThemeStockyard'), 'desc' => __('Set to &#8220;Yes&#8221; to automatically hide pagination and load more posts via ajax when scrolling the page', 'ThemeStockyard'), 'options' => array('no' => __('No', 'ThemeStockyard'), 'yes' => __('Yes (load more on scroll)', 'ThemeStockyard'), 'yes_button' => __('Yes (load more on button click)', 'ThemeStockyard')), 'std' => 'no'), 'infinite_scroll_limit' => array('type' => 'select', 'label' => __('Infinite Scroll Limit', 'ThemeStockyard'), 'desc' => __('Maximum number of times the Infinite Scroll should run - only works with "load more on scroll".', 'ThemeStockyard'), 'options' => ts_shortcodes_range(30, 'unlimited'), 'std' => 0), 'infinite_scroll_button_text' => array('type' => 'text', 'label' => __('Infinite Scrolling button text', 'ThemeStockyard'), 'desc' => __('Only works if the previous setting is "Yes (load more on button click)".', 'ThemeStockyard'), 'std' => ts_option_vs_default('infinite_scroll_button_text', 'Load more posts')), 'cat' => array('type' => 'multiple_select', 'label' => __('Categories', 'ThemeStockyard'), 'desc' => __('Select a category or leave blank for all', 'ThemeStockyard'), 'options' => ts_shortcodes_categories('category')), 'include' => array('type' => 'text', 'label' => __('Post "IDs" to include...', 'ThemeStockyard'), 'desc' => __('Display only certain posts by listing their IDs here (separated by commas)', 'ThemeStockyard')), 'exclude' => array('type' => 'text', 'label' => __('Post "IDs" to <em>exclude</em>...', 'ThemeStockyard'), 'desc' => __('Prevent certain posts from displaying by listing their IDs here (separated by commas)', 'ThemeStockyard')), 'exclude_previous_posts' => array('type' => 'radio_inline', 'label' => __('Exclude previous posts?', 'ThemeStockyard'), 'desc' => __('This option can prevent posts from the slider or other instances of blog shortcodes from appearing.', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'exclude_these_later' => array('type' => 'radio_inline', 'label' => __('Exclude these posts later?', 'ThemeStockyard'), 'desc' => __('This option can prevent *these* posts from appearing in other instances of blog shortcodes.', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'excerpt_length' => array('type' => 'text', 'label' => __('Excerpt Length (leave blank for default)', 'ThemeStockyard'), 'desc' => __('Maximum number of characters to show in the excerpt. Example: 100', 'ThemeStockyard')), 'ignore_sticky_posts' => array('type' => 'select', 'label' => __('Ignore Sticky Posts?', 'ThemeStockyard'), 'options' => $reverse_bool_choices)), 'shortcode' => '[blog_banner columns="{{columns}}" limit="{{posts_per_page}}" fullwidth="{{fullwidth}}" infinite_scroll="{{infinite_scroll}}" infinite_scroll_limit="{{infinite_scroll_limit}}" infinite_scroll_button_text="{{infinite_scroll_button_text}}" cat="{{cat}}" include="{{include}}" exclude="{{exclude}}" exclude_previous_posts="{{exclude_previous_posts}}" exclude_these_later="{{exclude_these_later}}" excerpt_length="{{excerpt_length}}" show_pagination="{{show_pagination}}" ignore_sticky_posts="{{ignore_sticky_posts}}"][/blog_banner]', 'popup_title' => __('Blog Banner Shortcode', 'ThemeStockyard'));
/*-----------------------------------------------------------------------------------*/
/*	Blog Slider Config
/*-----------------------------------------------------------------------------------*/
$ts_shortcodes['blog_slider'] = array('no_preview' => true, 'params' => array('limit' => array('type' => 'select', 'label' => __('Post count', 'ThemeStockyard'), 'desc' => __('Select number of posts to show in the slider', 'ThemeStockyard'), 'options' => ts_shortcodes_range(20, true, true), 'std' => 5), 'fullwidth' => array('type' => 'select', 'label' => __('Fullwidth?', 'ThemeStockyard'), 'desc' => __('Only works when no sidebar is present', 'ThemeStockyard'), 'options' => $reverse_choices, 'std' => 'no'), 'cat' => array('type' => 'multiple_select', 'label' => __('Categories', 'ThemeStockyard'), 'desc' => __('Select a category or leave blank for all', 'ThemeStockyard'), 'options' => ts_shortcodes_categories('category')), 'include' => array('type' => 'text', 'label' => __('Post "IDs" to include...', 'ThemeStockyard'), 'desc' => __('Display only certain posts by listing their IDs here (separated by commas)', 'ThemeStockyard')), 'exclude' => array('type' => 'text', 'label' => __('Post "IDs" to <em>exclude</em>...', 'ThemeStockyard'), 'desc' => __('Prevent certain posts from displaying by listing their IDs here (separated by commas)', 'ThemeStockyard')), 'exclude_previous_posts' => array('type' => 'radio_inline', 'label' => __('Exclude previous posts?', 'ThemeStockyard'), 'desc' => __('This option can prevent posts from the slider or other instances of blog shortcodes from appearing.', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'exclude_these_later' => array('type' => 'radio_inline', 'label' => __('Exclude these posts later?', 'ThemeStockyard'), 'desc' => __('This option can prevent *these* posts from appearing in other instances of blog shortcodes.', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'title_size' => array('type' => 'text', 'label' => __('Title Size', 'ThemeStockyard'), 'desc' => __('Examples: H1, H2, H3, H4, H5, H6... or enter any font size (ex: 16px). Leave blank for default.', 'ThemeStockyard')), 'text_align' => array('type' => 'select', 'label' => __('Align Text', 'ThemeStockyard'), 'options' => $align_options, 'std' => 'center'), 'allow_videos' => array('type' => 'radio_inline', 'label' => __('Allow Videos?', 'ThemeStockyard'), 'desc' => __('If set to &#8220;No&#8221, only featured images will be shown.', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'image_size' => array('type' => 'select', 'label' => __('Image size', 'ThemeStockyard'), 'desc' => __('If using this shortcode within a small column or within the sidebar, select a smaller size to save bandwith.', 'ThemeStockyard'), 'options' => array('large' => __('Large', 'ThemeStockyard'), 'medium' => __('Medium', 'ThemeStockyard'), 'small' => __('Small', 'ThemeStockyard')), 'std' => 'large'), 'ignore_sticky_posts' => array('type' => 'select', 'label' => __('Ignore Sticky Posts?', 'ThemeStockyard'), 'options' => $reverse_bool_choices)), 'shortcode' => '[blog_slider limit="{{limit}}" fullwidth="{{fullwidth}}" cat="{{cat}}" include="{{include}}" exclude="{{exclude}}" exclude_previous_posts="{{exclude_previous_posts}}" exclude_these_later="{{exclude_these_later}}" title_size="{{title_size}}" text_align="{{text_align}}" allow_videos="{{allow_videos}}" image_size="{{image_size}}" ignore_sticky_posts="{{ignore_sticky_posts}}"][/blog_slider]', 'popup_title' => __('Blog Slider Shortcode', 'ThemeStockyard'));
/*-----------------------------------------------------------------------------------*/
/*	Blog Widget Config
/*-----------------------------------------------------------------------------------*/
$ts_shortcodes['blog_widget'] = array('no_preview' => true, 'params' => array('widget_heading' => array('type' => 'text', 'label' => __('Widget Heading', 'ThemeStockyard'), 'desc' => __('Leave blank for no heading.', 'ThemeStockyard')), 'widget_layout' => array('type' => 'select', 'label' => __('Widget Layout', 'ThemeStockyard'), 'desc' => __('This shortcode is best for columns less than 480 pixels. However, the &#8220;horizontal&#8221; layout will also work well in wider columns.', 'ThemeStockyard'), 'options' => array('vertical' => __('Vertical', 'ThemeStockyard'), 'horizontal' => __('Horizontal', 'ThemeStockyard'))), 'limit' => array('type' => 'select', 'label' => __('Limit', 'ThemeStockyard'), 'desc' => __('Select number of posts to show', 'ThemeStockyard'), 'options' => ts_shortcodes_range(30, true, true), 'std' => 4), 'cat' => array('type' => 'multiple_select', 'label' => __('Categories', 'ThemeStockyard'), 'desc' => __('Select a category or leave blank for all', 'ThemeStockyard'), 'options' => ts_shortcodes_categories('category')), 'override_widget_heading' => array('type' => 'radio_inline', 'label' => __('Override Widget Heading?', 'ThemeStockyard'), 'desc' => __('If set to &#8220;Yes&#8221 and a single Category is chosen above, the category name will be linked and used as the Widget Heading.', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'include' => array('type' => 'text', 'label' => __('Post "IDs" to include...', 'ThemeStockyard'), 'desc' => __('Display only certain posts by listing their IDs here (separated by commas)', 'ThemeStockyard')), 'exclude' => array('type' => 'text', 'label' => __('Post "IDs" to <em>exclude</em>...', 'ThemeStockyard'), 'desc' => __('Prevent certain posts from displaying by listing their IDs here (separated by commas)', 'ThemeStockyard')), 'exclude_previous_posts' => array('type' => 'radio_inline', 'label' => __('Exclude previous posts?', 'ThemeStockyard'), 'desc' => __('This option can prevent posts from the slider or other instances of blog shortcodes from appearing.', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'exclude_these_later' => array('type' => 'radio_inline', 'label' => __('Exclude these posts later?', 'ThemeStockyard'), 'desc' => __('This option can prevent *these* posts from appearing in other instances of blog shortcodes.', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'title_size' => array('type' => 'text', 'label' => __('Title Size', 'ThemeStockyard'), 'desc' => __('Examples: H1, H2, H3, H4, H5, H6... or enter any font size (ex: 16px). Leave blank for default.', 'ThemeStockyard')), 'text_align' => array('type' => 'select', 'label' => __('Align Text', 'ThemeStockyard'), 'options' => $align_options, 'std' => ''), 'excerpt_length' => array('type' => 'text', 'label' => __('Excerpt Length (leave blank for default)', 'ThemeStockyard'), 'desc' => __('Maximum number of characters to show in the excerpt. Example: 100', 'ThemeStockyard')), 'show_excerpt' => array('type' => 'radio_inline', 'label' => __('Show Excerpt?', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'show_meta' => array('type' => 'radio_inline', 'label' => __('Show Meta? (category, author, etc)', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'show_media' => array('type' => 'radio_inline', 'label' => __('Show Featured Images/Video?', 'ThemeStockyard'), 'options' => array('yes' => __('Yes', 'ThemeStockyard'), 'first' => __('Only for the first post', 'ThemeStockyard'), 'no' => __('No', 'ThemeStockyard')), 'std' => 'yes'), 'allow_videos' => array('type' => 'radio_inline', 'label' => __('Allow Videos?', 'ThemeStockyard'), 'desc' => __('If set to &#8220;No&#8221, only featured images will be shown.', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'allow_galleries' => array('type' => 'radio_inline', 'label' => __('Allow Galleries?', 'ThemeStockyard'), 'desc' => __('If set to &#8220;No&#8221, only featured images (but not galleries) will be shown.', 'ThemeStockyard'), 'options' => $choices, 'std' => 'yes'), 'ignore_sticky_posts' => array('type' => 'select', 'label' => __('Ignore Sticky Posts?', 'ThemeStockyard'), 'options' => $reverse_bool_choices)), 'shortcode' => '[blog_widget widget_heading="{{widget_heading}}" widget_layout="{{widget_layout}}" limit="{{limit}}" cat="{{cat}}" override_widget_heading="{{override_widget_heading}}" include="{{include}}" exclude="{{exclude}}" exclude_previous_posts="{{exclude_previous_posts}}" exclude_these_later="{{exclude_these_later}}" excerpt_length="{{excerpt_length}}" title_size="{{title_size}}" text_align="{{text_align}}" show_excerpt="{{show_excerpt}}" show_meta="{{show_meta}}" show_media="{{show_media}}" allow_videos="{{allow_videos}}" allow_galleries="{{allow_galleries}}" ignore_sticky_posts="{{ignore_sticky_posts}}"][/blog_widget]', 'popup_title' => __('Blog Widget Shortcode', 'ThemeStockyard'));
/*-----------------------------------------------------------------------------------*/
/*	Button Config
/*-----------------------------------------------------------------------------------*/
$ts_shortcodes['button'] = array('no_preview' => true, 'params' => array('style' => array('std' => 'standard', 'type' => 'select', 'label' => __('Button Style', 'ThemeStockyard'), 'options' => array('standard' => __('Standard', 'ThemeStockyard'), 'outline' => __('Outline', 'ThemeStockyard'), 'outline-thin' => __('Outline Thin', 'ThemeStockyard'))), 'url' => array('std' => '', 'type' => 'text', 'label' => __('Button URL', 'ThemeStockyard'), 'desc' => __('http://example.com', 'ThemeStockyard')), 'color' => array('std' => '', 'type' => 'colorpicker', 'label' => __('Button Color', 'ThemeStockyard'), 'options' => ts_color_options()), 'size' => array('type' => 'select', 'label' => __('Button Size', 'ThemeStockyard'), 'options' => array('small' => __('Small', 'ThemeStockyard'), 'medium' => __('Medium', 'ThemeStockyard'), 'large' => __('Large', 'ThemeStockyard')), 'std' => 'medium'), 'target' => array('type' => 'select', 'label' => __('Button Link Target', 'ThemeStockyard'), 'options' => array('_self' => __('Same window/tab', 'ThemeStockyard'), '_blank' => __('New window/tab', 'ThemeStockyard'))), 'content' => array('std' => __('Button Text', 'ThemeStockyard'), 'type' => 'text', 'label' => __('Button\'s Text', 'ThemeStockyard'), 'use_selection' => true)), 'shortcode' => '[button link="{{url}}" color="{{color}}" size="{{size}}" target="{{target}}" style="{{style}}"]{{content}}[/button]', 'popup_title' => __('Button Shortcode', 'ThemeStockyard'));
/*-----------------------------------------------------------------------------------*/
/*	Callout Config
/*-----------------------------------------------------------------------------------*/
Exemple #30
0
<?php

/**
 * Loop Rating
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.0.0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $product;
if (get_option('woocommerce_enable_review_rating') == 'no' || ts_option_vs_default('show_shop_reviews_on_results', 1) != 1) {
    return;
}
?>

<?php 
if ($rating_html = $product->get_rating_html()) {
    ?>
	<?php 
    echo ts_escape($rating_html);
}