function Ya_SelectMenu_Filter($args)
 {
     //var_dump($args);
     $args['container'] = false;
     $ya_theme_locate = ya_options()->getCpanelValue('menu_location');
     $ya_menu_class = ya_options()->getCpanelValue('menu_visible');
     if (strcmp($ya_theme_locate, $args['theme_location']) == 0) {
         $args['menu_class'] = 'ya_selectmenu ' . $ya_menu_class;
         $args['walker'] = new YA_Menu_Select();
         $args['items_wrap'] = '<select class="%2$s">%3$s</select>';
     }
     return $args;
 }
Example #2
0
function ya_google_analytics()
{
    ?>
<script>
	var _gaq=[['_setAccount','<?php 
    echo ya_options()->getCpanelValue('google_analytics_id');
    ?>
'],['_trackPageview']];
	(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
    g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
    s.parentNode.insertBefore(g,s)}(document,'script'));
    
</script>
<?php 
}
Example #3
0
/**
 * Clean up wp_nav_menu_args
 *
 * Remove the container
 * Use YA_Menu_Walker() by default
*/
function ya_nav_menu_args($args = '')
{
    $ya_nav_menu_args['container'] = false;
    if (!$args['items_wrap']) {
        $ya_nav_menu_args['items_wrap'] = '<ul class="%2$s">%3$s</ul>';
    }
    if (!$args['walker']) {
        if ('mega' == ya_options()->getCpanelValue('menu_type')) {
            $ya_nav_menu_args['walker'] = new YA_Mega_Menu_Walker();
        } else {
            $ya_nav_menu_args['walker'] = new YA_Menu_Walker();
        }
    }
    return array_merge($args, $ya_nav_menu_args);
}
Example #4
0
/**
 * Add and remove body_class() classes
 */
function ya_body_class($classes)
{
    $direction = ya_options()->getCpanelValue('direction');
    if ($direction == 'rtl') {
        $classes[] = 'rtl';
    }
    // Add post/page slug
    if (is_single() || is_page() && !is_front_page()) {
        $classes[] = basename(get_permalink());
    }
    // Remove unnecessary classes
    $home_id_class = 'page-id-' . get_option('page_on_front');
    $remove_classes = array('page-template-default', $home_id_class);
    $classes = array_diff($classes, $remove_classes);
    return $classes;
}
    function Ya_MenuRes_Filter($args)
    {
        //var_dump($args);
        $args['container'] = false;
        $ya_theme_locate = ya_options()->getCpanelValue('menu_location');
        $ya_menu_class = ya_options()->getCpanelValue('menu_visible');
        if (strcmp($ya_theme_locate, $args['theme_location']) == 0) {
            $args['container'] = 'div';
            $args['container_class'] .= 'resmenu-container ' . $ya_menu_class;
            $args['items_wrap'] = '<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#ResMenu">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button><div id="ResMenu" class="collapse menu-responsive-wrapper"><ul id="%1$s" class="%2$s">%3$s</ul></div>';
            $args['menu_class'] = 'ya_resmenu';
            $args['walker'] = new YA_ResMenu_Walker();
        }
        return $args;
    }
Example #6
0
function ya_parse_request(&$wp)
{
    global $add_query_vars, $options_args;
    if (is_array($add_query_vars)) {
        foreach ($add_query_vars as $field) {
            if (array_key_exists($field, $wp->query_vars)) {
                $current_value = ya_options()->get($field);
                $request_value = $wp->query_vars[$field];
                $field_name = $options_args['opt_name'] . '_' . $field;
                if ($request_value != $current_value) {
                    setcookie($field_name, $request_value, time() + 86400, '/', COOKIE_DOMAIN, 0);
                    if (!isset($_COOKIE[$field_name]) || $request_value != $_COOKIE[$field_name]) {
                        $_COOKIE[$field_name] = $request_value;
                    }
                    //$url = curPageURL();
                    //header("Refresh: 0; url=$url");
                    //exit();
                }
            }
        }
    }
}
Example #7
0
    public function in_widget_form($widget, $r = null, $instance = array())
    {
        //Logger::log(__CLASS__.'::'.__FUNCTION__);
        //Logger::log( array_merge( array('instance' => get_class($widget)), $instance) );
        $widget_advanced = ya_options()->getCpanelValue('widget-advanced');
        if (!$widget_advanced) {
            return;
        }
        $this->widget =& $widget;
        //$widget_class_suffix = isset($instance['widget_class_suffix']) ? $instance['widget_class_suffix'] : '';
        $widget_style = isset($instance['widget_style']) ? trim($instance['widget_style']) : '';
        $adoptions = isset($instance['adoptions']) ? $instance['adoptions'] : false;
        $adoptions_checked = $adoptions ? 'checked="checked"' : '';
        $adoptions_on_class = $adoptions ? 'on' : '';
        //Widgets Style
        $styles = $this->getWidgetStyles();
        $styles = array_merge(array('default' => 'Default'), $styles);
        $styles = array_unique($styles);
        //Widget Display
        $widget_display = isset($instance['widget_display']) ? $instance['widget_display'] : array();
        ?>

		<div class="advanced-opt <?php 
        echo $adoptions_on_class;
        ?>
">
			<div class="advanced-opt-controls" >
				<label class="button toggle" for="<?php 
        echo $widget->get_field_id('adoptions');
        ?>
">Advanced Options
					<input type="checkbox" class="pane-toggler" <?php 
        echo $adoptions_checked;
        ?>
 style="display: none;" name="<?php 
        echo $widget->get_field_name('adoptions');
        ?>
" id="<?php 
        echo $widget->get_field_id('adoptions');
        ?>
">
				</label>
			</div>
			<div class="advanced-opt-pane">
				<div class="advanced-opt-pane-inner">
					<div class="pane-content">
						<div class="pane-left">
							<p>
								<label for="<?php 
        echo $widget->get_field_id('widget_style');
        ?>
"><?php 
        _e('Widget Style', 'yatheme');
        ?>
								</label> <select class="widefat"
									id="<?php 
        echo $widget->get_field_id('widget_style');
        ?>
"
									name="<?php 
        echo $widget->get_field_name('widget_style');
        ?>
">
									<?php 
        foreach ($styles as $key => $value) {
            $selected = '';
            if ($key == $widget_style) {
                $selected = 'selected="selected"';
            }
            ?>
									<option <?php 
            echo 'value="' . $key . '" ' . $selected;
            ?>
>
										<?php 
            echo $value;
            ?>
									</option>
									<?php 
        }
        ?>
								</select>
							</p>
							<?php 
        echo $this->render_wdisplay($widget_display);
        ?>
						</div>
						<div class="pane-right"></div>
					</div>
				</div>
			</div>
			<br class="clear">
		</div>

	<?php 
    }
/**
 * Adds sections to the customizer
 * @param WP_Customize_Control $wp_customize
 */
function ya_customize_register($wp_customize)
{
    $priority = 200;
    $sections = array();
    $ya_options = ya_options();
    $i = 0;
    foreach ($ya_options->sections as $section) {
        if (isset($section['fields']) && is_array($section['fields'])) {
            foreach ($section['fields'] as $field) {
                $customize = $field['id'] . '_customize_allow';
                if ($ya_options->get($customize)) {
                    if (isset($field['options'])) {
                        $field['choices'] = $field['options'];
                    }
                    if ($field['type'] == 'upload') {
                        $field['type'] = 'image';
                    }
                    if ($field['type'] == 'radio_img') {
                        $field['type'] = 'select';
                        $field['choices'] = array();
                        foreach ($field['options'] as $key => $choices) {
                            $field['choices'][$key] = $choices['title'];
                        }
                    }
                    $field['label'] = $field['title'];
                    $field['section'] = sanitize_title($section['title']);
                    $field['settings'] = $ya_options->args['opt_name'] . '[' . $field['id'] . ']';
                    $field['priority'] = $priority++;
                    $sections[$i]['fields'][] = $field;
                }
            }
            if (isset($sections[$i]['fields'])) {
                $sections[$i]['title'] = $section['title'];
                $sections[$i]['priority'] = $priority++;
                $sections[$i]['capability'] = 'edit_theme_options';
                $i++;
            }
        }
    }
    foreach ($sections as $section) {
        // Add Section
        $wp_customize->add_section(sanitize_title($section['title']), $section);
        foreach ($section['fields'] as $field) {
            //Add Setting
            $wp_customize->add_setting($ya_options->args['opt_name'] . '[' . $field['id'] . ']', array('default' => $ya_options->get($field['id']), 'type' => 'option', 'transport' => 'postMessage', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'customize_option'));
            // Add Control
            switch ($field['type']) {
                case 'color':
                    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, $field['id'], $field));
                    break;
                case 'image':
                    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, $field['id'], $field));
                    break;
                case 'textarea':
                    $wp_customize->add_control(new WP_Customize_Textarea_Control($wp_customize, $field['id'], $field));
                    break;
                default:
                    $wp_customize->add_control($field['id'], $field);
            }
            //$wp_customize->get_setting($ya_options->args['opt_name'].'['.$field['id'].']')->transport = 'postMessage';
        }
    }
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
}
Example #9
0
require_once locate_template('/lib/plugins/currency-converter/currency-converter.php');
// currency converter
if (ya_options()->getCpanelValue('menu_type') == 'mega') {
    function stop_removing_core_classes()
    {
        remove_filter('nav_menu_css_class', 'ya_nav_menu_css_class', 10, 2);
        remove_filter('nav_menu_item_id', '__return_null');
    }
    add_action('init', 'stop_removing_core_classes');
    require_once locate_template('/lib/ubermenu/ubermenu.php');
}
require_once locate_template('/lib/less.php');
// Custom functions
//active revolution slider
$revslider = get_template_directory() . '/lib/revslider/revslider.php';
if (!ya_options()->getCpanelValue('revslide_active')) {
    include $revslider;
    // Activate the plugin if necessary
    if (get_option('ya_revslider_activated', '0') == '0') {
        if (!class_exists('RevSliderAdmin')) {
            $revslider_admin_script = get_template_directory() . '/lib/revslider/revslider_admin.php';
            include $revslider_admin_script;
        }
        // Run activation script
        $revslider_admin = new RevSliderAdmin($revslider);
        $revslider_admin->onActivate();
        // Save a flag that it is activated, so this won't run again
        update_option('ya_revslider_activated', '1');
    }
}
/* Disable WordPress Admin Bar for all users but admins. */
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.4.0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $product, $woocommerce_loop, $post;
if (empty($woocommerce_loop['loop'])) {
    $woocommerce_loop['loop'] = 0;
}
$col_lg = ya_options()->getCpanelValue('product_col_large');
$col_md = ya_options()->getCpanelValue('product_col_medium');
$col_sm = ya_options()->getCpanelValue('product_col_sm');
$column1 = 12 / $col_md;
$column2 = 12 / $col_sm;
$class_col = "";
$col_large = 0;
// Store column count for displaying the grid
if (empty($woocommerce_loop['columns'])) {
    $col_large = 12 / $col_lg;
} else {
    $col_large = 12 / $woocommerce_loop['columns'];
}
// Ensure visibility
if (!$product || !$product->is_visible()) {
    return;
}
// Increase loop count
Example #11
0
function ya_layout_class($classes)
{
    $header = ya_options()->getCpanelValue('box_layout');
    if ($header == 'box') {
        $classes[] = 'boxed';
    }
    // return the $classes array
    return $classes;
}
Example #12
0
}
?>

<div class="single main <?php 
ya_content_blog();
?>
" >
	<?php 
get_template_part('templates/content', 'single');
?>
</div>
<?php 
if (is_active_sidebar_YA('right-blog') && $sidebar_template != 'left_sidebar' && $sidebar_template != 'full') {
    $right_span_class = 'col-lg-' . ya_options()->getCpanelValue('sidebar_right_expand');
    $right_span_class .= ' col-md-' . ya_options()->getCpanelValue('sidebar_right_expand_md');
    $right_span_class .= ' col-sm-' . ya_options()->getCpanelValue('sidebar_right_expand_sm');
    ?>
<aside id="right" class="sidebar <?php 
    echo esc_attr($right_span_class);
    ?>
">
	<?php 
    dynamic_sidebar('right-blog');
    ?>
</aside>
<?php 
}
?>
</div>	
</div>
</div>
Example #13
0
 function colorset($atts)
 {
     $value = ya_options()->getCpanelValue('scheme');
     return $value;
 }
<?php

if (!have_posts()) {
    get_template_part('templates/no-results');
}
$blog_columns = ya_options()->getCpanelValue('blog_column');
$col = 'col-sm-' . 12 / $blog_columns . ' theme-clearfix';
global $instance;
?>
<div class="row grid-blog">
<?php 
while (have_posts()) {
    the_post();
    $format = get_post_format();
    global $post;
    ?>
	<div id="post-<?php 
    the_ID();
    ?>
" <?php 
    post_class($col);
    ?>
>
		<div class="entry clearfix">
			<?php 
    if ($format == '') {
        ?>
				<?php 
        if (get_the_post_thumbnail()) {
            ?>
				<div class="entry-thumb">	
?>
	</div>
</div>

	<div class="container">
		<?php 
$portfolio = array();
$attributes = '';
$number = 8;
$orderby = 'date';
$order = '';
$portfolio_id = ya_options()->getCpanelValue('portfolio_id');
$style = ya_options()->getCpanelValue('p_style');
$col1 = ya_options()->getCpanelValue('p_col_large');
$col2 = ya_options()->getCpanelValue('p_col_medium');
$col3 = ya_options()->getCpanelValue('p_col_sm');
$col4 = ya_options()->getCpanelValue('p_col_xs');
$pf_id = 'ya_portfolio';
if (count($portfolio_id) > 0) {
    $portfolio = $portfolio_id;
} else {
    $terms = get_terms('portfolio_cat');
    foreach ($terms as $k => $term) {
        $portfolio[$k] = $term->term_id;
    }
}
include plugin_dir_path(__FILE__) . 'portfolio-item.php';
?>
	</div>
<?php 
get_footer();
Example #16
0
/**
 * Enqueue scripts and stylesheets
 *
 */
function ya_scripts()
{
    $scheme = ya_options()->getCpanelValue('scheme');
    if ($scheme) {
        $app_css = get_template_directory_uri() . '/css/app-' . $scheme . '.css';
    } else {
        $app_css = get_template_directory_uri() . '/css/app-default.css';
    }
    wp_register_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), null);
    wp_register_style('ya_photobox_css', get_template_directory_uri() . '/css/photobox.css', array(), null);
    wp_register_style('rtl_css', get_template_directory_uri() . '/css/rtl.css', array(), null);
    wp_register_style('yatheme_css', $app_css, array(), null);
    wp_register_style('flexslider_css', get_template_directory_uri() . '/css/flexslider.css', array(), null);
    wp_register_style('respslider_css', get_template_directory_uri() . '/css/slick.css', array(), null);
    wp_register_style('lightbox_css', get_template_directory_uri() . '/css/jquery.fancybox.css', array(), null);
    wp_register_style('animate_css', get_template_directory_uri() . '/css/animate.css', array(), null);
    wp_register_style('yatheme_responsive_css', get_template_directory_uri() . '/css/app-responsive.css', array('yatheme_css'), null);
    /* register script */
    wp_register_script('modernizr', get_template_directory_uri() . '/js/modernizr-2.6.2.min.js', false, null, false);
    wp_register_script('bootstrap_js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), null, true);
    wp_register_script('bootstrap_responsive_js', get_template_directory_uri() . '/js/responsive-tabs.js', array('jquery'), null, true);
    wp_register_script('gallery_load_js', get_template_directory_uri() . '/js/load-image.min.js', array('bootstrap_js'), null, true);
    wp_register_script('bootstrap_gallery_js', get_template_directory_uri() . '/js/bootstrap-image-gallery.min.js', array('gallery_load_js'), null, true);
    wp_register_script('flexslider_js', get_template_directory_uri() . '/js/jquery.flexslider-min.js', array('jquery'), null, true);
    wp_register_script('photobox_js', get_template_directory_uri() . '/js/photobox.js', array('jquery'), null, true);
    wp_register_script('plugins_js', get_template_directory_uri() . '/js/plugins.js', array('jquery'), null, true);
    wp_register_script('lightbox_js', get_template_directory_uri() . '/js/jquery.fancybox.pack.js', array('jquery'), null, true);
    wp_register_script('ya_circle_skill', get_template_directory_uri() . '/js/jquery.circliful.min.js', array(), null, true);
    wp_register_script('ya_accordion', get_template_directory_uri() . '/js/jquery.accordion.js', array(), null, true);
    wp_register_script('ya_countup', get_template_directory_uri() . '/js/jquery.counterup.js', array(), null, true);
    wp_register_script('slick_slider_js', get_template_directory_uri() . '/js/slick.min.js', array(), null, true);
    wp_register_script('woo_countdown_js', get_template_directory_uri() . '/js/jquery.countdown.min.js', array(), null, true);
    wp_register_script('cloud-zoom', get_template_directory_uri() . '/js/cloud-zoom.1.0.2.min.js', array(), null, true);
    wp_register_script('masonry_js', get_template_directory_uri() . '/js/isotope.js', array(), null, true);
    wp_register_script('number_js', get_template_directory_uri() . '/js/number-polyfill.min.js', array('jquery'), null, true);
    wp_register_script('animate_js', get_template_directory_uri() . '/js/wow.min.js', array(), null, true);
    wp_register_script('quantity_js', get_template_directory_uri() . '/js/wc-quantity-increment.min.js', array('jquery'), null, true);
    wp_register_script('hoverdir', get_template_directory_uri() . '/js/jquery.hoverdir.js', array(), null, true);
    wp_register_script('megamenu_js', get_template_directory_uri() . '/js/megamenu.js', array(), null, true);
    wp_register_script('yatheme_js', get_template_directory_uri() . '/js/main.js', array('bootstrap_js', 'plugins_js'), null, true);
    /* enqueue script & style */
    if (!is_admin()) {
        wp_dequeue_style('tabcontent_styles');
        wp_enqueue_style('bootstrap');
        if (is_rtl() || ($ya_direction = 'rtl')) {
            wp_enqueue_style('rtl_css');
        }
        wp_enqueue_script('lightbox_js');
        wp_enqueue_script('lightbox_js');
        wp_enqueue_script('ya_circle_skill');
        wp_enqueue_script('ya_countup');
        wp_enqueue_style('flexslider_css');
        wp_enqueue_style('slick_css');
        wp_enqueue_style('lightbox_css');
        wp_enqueue_style('yatheme_css');
        wp_enqueue_style('animate_css');
        wp_enqueue_script('flexslider_js');
        wp_enqueue_script('slick');
        wp_enqueue_script('masonry_js');
        wp_enqueue_script('cloud-zoom');
        wp_enqueue_script('number_js');
        wp_enqueue_script('animate_js');
        wp_enqueue_script('quantity_js');
        wp_enqueue_script('hoverdir');
        wp_enqueue_script('bootstrap_responsive_js');
        if (ya_options()->getCpanelValue('responsive_support')) {
            /*	wp_enqueue_style('bootstrap_responsive_css'); */
            wp_enqueue_style('yatheme_responsive_css');
        }
        /* is_rtl() && wp_enqueue_style('bootstrap_rtl_css'); */
        /* Load style.css from child theme */
        if (is_child_theme()) {
            wp_enqueue_style('yatheme_child_css', get_stylesheet_uri(), false, null);
        }
    }
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    $is_category = is_category() && !is_category('blog');
    if (!is_admin()) {
        wp_enqueue_script('modernizr');
        wp_enqueue_script('yatheme_js');
    }
    if (ya_options()->getCpanelValue('effect_active') == 1) {
        if (is_home() || is_front_page()) {
            wp_enqueue_script('scroll_js');
        }
    }
    if (ya_options()->getCpanelValue('menu_type') == 'mega') {
        wp_enqueue_script('megamenu_js');
    }
}
<?php

while (have_posts()) {
    the_post();
    $related_post_column = ya_options()->getCpanelValue('sidebar_blog');
    ?>
  <?php 
    setPostViews(get_the_ID());
    ?>
  <div <?php 
    post_class();
    ?>
>
	<?php 
    $pfm = get_post_format();
    ?>
    <header class="header-single">
    </header>
    <div class="entry-content">
	<?php 
    if ($pfm == '' || $pfm == 'image') {
        ?>
	  <?php 
        if (has_post_thumbnail()) {
            ?>
	  <div class="single-thumb">
		<?php 
            the_post_thumbnail('ya_detail_thumb');
            ?>
	  </div>
	  <?php 
Example #18
0
function ya_popup()
{
    $ya_popup = ya_options()->getCpanelValue('popup_active');
    $ya_popup_content = ya_options()->getCpanelValue('popup_shortcode');
    if ($ya_popup) {
        echo stripslashes(do_shortcode($ya_popup_content));
        ?>
		<script>
			(function($) {
				$(document).ready(function() {
					var check_cookie = $.cookie('subscribe_popup');
					if(check_cookie == null || check_cookie == 'shown') {
						 popupNewsletter();
					 }
					$('#subscribe_popup input#popup_check').on('click', function(){
						if($(this).parent().find('input:checked').length){        
							var check_cookie = $.cookie('subscribe_popup');
						   if(check_cookie == null || check_cookie == 'shown') {
								$.cookie('subscribe_popup','dontshowitagain');            
							}
							else
							{
								$.cookie('subscribe_popup','shown');
								popupNewsletter();
							}
						} else {
							$.cookie('subscribe_popup','shown');
						}
					}); 
				});

				function popupNewsletter() {
					jQuery.fancybox({
						href: '#subscribe_popup',
						autoResize: true
					});
					jQuery('#subscribe_popup').trigger('click');
					jQuery('#subscribe_popup').parents('.fancybox-overlay').addClass('popup-fancy');
				};
			}(jQuery));
		</script>
<?php 
    }
}
Example #19
0
 function ya_direction($doctype = 'html')
 {
     $ya_direction = ya_options()->getCpanelValue('direction');
     if (function_exists('is_rtl') && is_rtl() || $ya_direction == 'rtl') {
         $ya_attribute[] = 'dir="rtl"';
     }
     $ya_direction === 'rtl' ? $lang = 'ar' : ($lang = get_bloginfo('language'));
     if ($lang) {
         if (get_option('html_type') == 'text/html' || $doctype == 'html') {
             $ya_attribute[] = "lang=\"{$lang}\"";
         }
         if (get_option('html_type') != 'text/html' || $doctype == 'xhtml') {
             $ya_attribute[] = "xml:lang=\"{$lang}\"";
         }
     }
     $ya_output = implode(' ', $ya_attribute);
     return $ya_output;
 }
function ya_product_category_class($classes, $category = null)
{
    $ya_product_sidebar = ya_options()->getCpanelValue('sidebar_product');
    if ($ya_product_sidebar == 'left' || $ya_product_sidebar == 'right') {
        $classes[] = 'col-lg-4 col-md-4 col-sm-6 col-xs-6 col-mb-12';
    } else {
        if ($ya_product_sidebar == 'lr') {
            $classes[] = 'col-lg-6 col-md-6 col-sm-6 col-xs-6 col-mb-12';
        } else {
            if ($ya_product_sidebar == 'full') {
                $classes[] = 'col-lg-3 col-md-4 col-sm-6 col-xs-6 col-mb-12';
            }
        }
    }
    return $classes;
}
Example #21
0
<?php

do_action('before');
if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
    $ya_header = ya_options()->getCpanelValue('header_style');
    if ($ya_header == 'style2') {
        get_template_part('woocommerce/minicart-ajax');
    } else {
        get_template_part('woocommerce/minicart-ajax-style1');
    }
}
<?php

get_header();
$p_imgintro = ya_options()->getCpanelValue('portfolio_imgintro');
?>
<div class="container">
	<div class="portfolio-intro">
		
	<?php 
if ($p_imgintro != '') {
    echo '<img src="' . $p_imgintro . '"/>';
}
echo '<h1 class="p-title">' . __('Portfolio', 'smartaddons') . '</h1>';
if (function_exists('ya_breadcrumb')) {
    ya_breadcrumb('<div class="breadcrumbs theme-clearfix">', '</div>');
}
?>
	</div>
</div>
<div class="container">
	<div id="main" class="main">
	<?php 
while (have_posts()) {
    the_post();
    global $post;
    $skill = get_post_meta($post->ID, 'skill', true);
    $p_url = get_post_meta($post->ID, 'p_url', true);
    $copyright = get_post_meta($post->ID, 'copyright', true);
    $terms = get_the_terms($post->ID, 'portfolio_cat');
    $term_str = '';
    foreach ($terms as $key => $term) {
Example #23
0
require_once locate_template('/lib/3rdparty/lessc.inc.php');
if (class_exists('lessc') && ya_options()->getCpanelValue('developer_mode')) {
    define('LESS_PATH', get_template_directory() . '/assets/less');
    define('CSS__PATH', get_template_directory() . '/assets/css');
    $scheme = ya_options()->getCpanelValue('scheme');
    $scheme_vars = get_template_directory() . '/templates/presets/default.php';
    $output_cssf = CSS__PATH . '/app-default.css';
    if ($scheme && file_exists(get_template_directory() . '/templates/presets/' . $scheme . '.php')) {
        $scheme_vars = get_template_directory() . '/templates/presets/' . $scheme . '.php';
        $output_cssf = CSS__PATH . "/app-{$scheme}.css";
    }
    if (file_exists($scheme_vars)) {
        include $scheme_vars;
        try {
            // less variables by theme_mod
            // $less_variables['sidebar-width'] = ya_options()->sidebar_collapse_width.'px';
            $less = new lessc();
            $less->setImportDir(array(LESS_PATH . '/app/', LESS_PATH . '/bootstrap/'));
            $less->setVariables($less_variables);
            $cache = $less->cachedCompile(LESS_PATH . '/app.less');
            file_put_contents($output_cssf, $cache["compiled"]);
            if (ya_options()->getCpanelValue('responsive_support')) {
                $responsive_cache = $less->cachedCompile(LESS_PATH . '/app-responsive.less');
                file_put_contents(CSS__PATH . '/app-responsive.css', $responsive_cache["compiled"]);
            }
        } catch (Exception $e) {
            var_dump($e);
            exit;
        }
    }
}
<?php

if (is_active_sidebar_YA('primary')) {
    $primary_span_class = 'span' . ya_options()->getCpanelValue('sidebar_primary_expand');
    ?>
<aside id="primary" class="sidebar <?php 
    echo esc_attr($primary_span_class);
    ?>
">
	<?php 
    dynamic_sidebar('primary');
    ?>
</aside>
<?php 
}
Example #25
0
<?php

$ya_direction = ya_options()->getCpanelValue('direction');
$default = array('post_type' => 'partner', 'orderby' => $orderby, 'order' => $order, 'post_status' => 'publish', 'showposts' => $numberposts);
$id = rand() . time();
$list = new WP_Query($default);
if ($list->have_posts()) {
    ?>
	<div id="sw_partner_<?php 
    echo esc_attr($id);
    ?>
" class="responsive-slider sw-partner-container-slider <?php 
    echo esc_html($style);
    ?>
 loading clearfix" data-lg="<?php 
    echo esc_attr($columns);
    ?>
" data-md="<?php 
    echo esc_attr($columns1);
    ?>
" data-sm="<?php 
    echo esc_attr($columns2);
    ?>
" data-xs="<?php 
    echo esc_attr($columns3);
    ?>
" data-mobile="<?php 
    echo esc_attr($columns4);
    ?>
" data-speed="<?php 
    echo esc_attr($speed);
Example #26
0
				<input type="hidden" name="search_posttype" value="product" />
			</div>
		</form>
		<?php 
} else {
    ?>
			<?php 
    get_template_part('templates/searchform');
    ?>
		<?php 
}
?>
	</div>
</div>
<?php 
$ya_psearch = ya_options()->getCpanelValue('popular_search');
if ($ya_psearch != '') {
    ?>
<div class="popular-search-keyword">
	<div class="keyword-title"><?php 
    esc_html_e('Popular Keywords', 'yatheme');
    ?>
: </div>
	<?php 
    $ya_psearch = explode(',', $ya_psearch);
    foreach ($ya_psearch as $key => $item) {
        echo $key == 0 ? '' : ',';
        echo '<a href="' . esc_url(home_url('/')) . '?s=' . esc_attr($item) . '">' . $item . '</a>';
    }
    ?>
		
Example #27
0
		</div>
	</div>
</header>
<?php 
if (has_nav_menu('primary_menu')) {
    ?>
	<!-- Primary navbar -->
<section id="main-menu" class="main-menu">
	<nav id="primary-menu" class="primary-menu" role="navigation">
		<div class="container">
			<div class="mid-header clearfix">
				<a href="#" class="phone-icon-menu"></a>
				<div class="navbar-inner navbar-inverse">
						<?php 
    $menu_class = 'nav navbar-nav nav-pills';
    if ('mega' == ya_options()->getCpanelValue('menu_type')) {
        $menu_class .= ' nav-mega';
    } else {
        $menu_class .= ' nav-css';
    }
    ?>
						<?php 
    wp_nav_menu(array('theme_location' => 'primary_menu', 'menu_class' => $menu_class));
    ?>
				</div>
				<?php 
    if (is_active_sidebar_YA('top-menu')) {
        ?>
					<div id="sidebar-top-menu" class="sidebar-top-menu">
							<?php 
        dynamic_sidebar('top-menu');
Example #28
0
<?php

get_template_part('templates/head');
$box_layout = ya_options()->getCpanelValue('box_layout');
?>
<body <?php 
body_class();
?>
>
	<div class="body-wrapper<?php 
echo $box_layout == 'box' ? ' box-layout' : '';
?>
">

	<?php 
if (!is_404()) {
    ?>
		<?php 
    do_action('get_header');
    ?>
			<?php 
    get_template_part('templates/header');
    ?>

			<section id="main" role="document">
				<?php 
    if (!is_front_page()) {
        if (function_exists('ya_breadcrumb')) {
            ya_breadcrumb('<div class="breadcrumbs"><div class="container">', '</div></div>');
        }
    }
Example #29
0
    }
    ?>
		<?php 
}
?>
		</div>
	</div>
</footer>
<?php 
if (ya_options()->getCpanelValue('back_active') == '1') {
    ?>
<a id="ya-totop" href="#" ></a>
<?php 
}
$check_popup = ya_options()->getCpanelValue('popup_active');
$popup_content = ya_options()->getCpanelValue('popup_content');
if ($check_popup == 1) {
    ?>
<style type="text/css">
    .fancybox-custom .fancybox-skin {
        box-shadow: 0 0 50px #222;
    }
.box-newsletter{display: none;}

</style>
<script type="text/javascript">

	jQuery(document).ready(function() {

		var check_cookie = jQuery.cookie('newsletter_popup');
		if(check_cookie == null || check_cookie == 'shown') {
<?php

/**
 * Single Product Image
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.0.14
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $post, $woocommerce, $product;
$ya_direction = ya_options()->getCpanelValue('direction');
$sidebar_product = ya_options()->getCpanelValue('sidebar_product');
$attachments = $product->get_gallery_attachment_ids();
?>
<div id="product_img_<?php 
echo esc_attr($post->ID);
?>
" class="product-images loading" data-rtl="<?php 
echo is_rtl() || $ya_direction == 'rtl' ? 'true' : 'false';
?>
" data-vertical="<?php 
echo $sidebar_product == 'full' ? 'true' : 'false';
?>
">
	<div class="product-images-container clearfix <?php 
echo $sidebar_product == 'full' ? 'thumbnail-left' : 'thumbnail-bottom';
?>