Esempio n. 1
0
function dh_get_mailchimplist()
{
    $options = array(__('Nothing Found...', DH_DOMAIN));
    if ($mailchimp_api = dh_get_theme_option('mailchimp_api', '')) {
        if (!class_exists('MCAPI')) {
            include_once DHINC_DIR . '/lib/MCAPI.class.php';
        }
        $api = new MCAPI($mailchimp_api);
        $lists = $api->lists();
        if ($api->errorCode) {
            $options = array(__("Unable to load MailChimp lists, check your API Key.", DH_DOMAIN));
        } else {
            if ($lists['total'] == 0) {
                $options = array(__("You have not created any lists at MailChimp", DH_DOMAIN));
            } else {
                $options = array(__('Select a list', DH_DOMAIN));
                foreach ($lists['data'] as $list) {
                    $options[$list['id']] = $list['name'];
                }
            }
        }
    }
    return $options;
}
Esempio n. 2
0
<?php

$brand_success = dh_format_color(dh_get_theme_option('brand-success', '#262626'));
$brand_success = apply_filters('dh_brand_success', dhecho($brand_success));
if ($brand_success === '#262626') {
    return '';
}
$darken_10_brand_success = darken(dh_format_color($brand_success), '10%');
$darken_12_brand_success = darken(dh_format_color($brand_success), '12%');
?>
.text-success {
  color: <?php 
echo dhecho($brand_success);
?>
;
}
.blockquote-success {
  border-color: <?php 
echo dhecho($brand_success);
?>
;
}
.btn-success {
  background-color: <?php 
echo dhecho($brand_success);
?>
;
  border-color: <?php 
echo dhecho($brand_success);
?>
;
Esempio n. 3
0
function dh_page_title($echo = true)
{
    $title = "";
    if (is_category()) {
        $title = single_cat_title('', false);
    } elseif (is_day()) {
        $title = __('Archive for date:', DH_DOMAIN) . " " . get_the_time('F jS, Y');
    } elseif (is_month()) {
        $title = __('Archive for month:', DH_DOMAIN) . " " . get_the_time('F, Y');
    } elseif (is_year()) {
        $title = __('Archive for year:', DH_DOMAIN) . " " . get_the_time('Y');
    } elseif (is_search()) {
        global $wp_query;
        if (!empty($wp_query->found_posts)) {
            if ($wp_query->found_posts > 1) {
                $title = $wp_query->found_posts . " " . __('search results for', DH_DOMAIN) . ' <span class="search-query">' . esc_attr(get_search_query()) . '</span>';
            } else {
                $title = $wp_query->found_posts . " " . __('search result for', DH_DOMAIN) . ' <span class="search-query">' . esc_attr(get_search_query()) . '</span>';
            }
        } else {
            if (!empty($_GET['s'])) {
                $title = __('Search results for', DH_DOMAIN) . ' <span class="search-query">' . esc_attr(get_search_query()) . '</span>';
            } else {
                $title = __('To search the site please enter a valid term', DH_DOMAIN);
            }
        }
    } elseif (is_author()) {
        $curauth = get_query_var('author_name') ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
        if (isset($curauth->nickname)) {
            $title = $curauth->nickname;
        }
    } elseif (is_tag()) {
        $title = single_tag_title('', false);
    } elseif (is_tax()) {
        $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
        $title = $term->name;
    } elseif (is_front_page() && !is_home()) {
        $title = get_the_title(get_option('page_on_front'));
    } elseif (is_home() && !is_front_page()) {
        $title = get_the_title(get_option('page_for_posts'));
    } elseif (is_404()) {
        $title = __('404 - Page not found', DH_DOMAIN);
    } else {
        $title = get_the_title();
    }
    if (isset($_GET['paged']) && !empty($_GET['paged'])) {
        $title .= " (" . __('Page', DH_DOMAIN) . " " . $_GET['paged'] . ")";
    }
    if (defined('WOOCOMMERCE_VERSION') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) {
        // 		if( ! is_product() ) {
        // 			$title = woocommerce_page_title( false );
        // 		}else{
        // 			$title =
        // 		}
        $title = woocommerce_page_title(false);
    }
    if (is_post_type_archive('portfolio')) {
        $title = esc_html(dh_get_theme_option('portfolio-archive-title', __('My Portfolio', DH_DOMAIN)));
    }
    if ($echo) {
        echo dhecho($title);
    } else {
        return $title;
    }
}
 * @hooked woocommerce_template_single_meta - 40
 * @hooked woocommerce_template_single_sharing - 50
 */
if (dh_get_theme_option('woo-product-layout', 'full-width') === 'full-width') {
    woocommerce_template_single_title();
    woocommerce_template_single_rating();
    woocommerce_template_single_excerpt();
} else {
    do_action('woocommerce_single_product_summary');
}
?>
		
			</div><!-- .summary -->
		</div>
		<?php 
if (dh_get_theme_option('woo-product-layout', 'full-width') === 'full-width') {
    ?>
		<div class="col-md-3 col-sm-6 action-summary">
			<div class="summary">
				<?php 
    do_action('woocommerce_single_product_summary');
    ?>
			</div>
		</div>
		<?php 
}
?>
	</div>
	<?php 
/**
 * woocommerce_after_single_product_summary hook
Esempio n. 5
0
<?php

$brand_danger = dh_format_color(dh_get_theme_option('brand-danger', '#bb5857'));
$brand_danger = apply_filters('dh_brand_danger', $brand_danger);
if ($brand_danger === '#bb5857') {
    return '';
}
$darken_10_brand_danger = darken(dh_format_color(dh_get_theme_option('brand-danger', '#bb5857')), '10%');
$darken_12_brand_danger = darken(dh_format_color(dh_get_theme_option('brand-danger', '#bb5857')), '12%');
?>
.text-danger {
  color: <?php 
echo dhecho($brand_danger);
?>
;
}
.blockquote-danger {
  border-color: <?php 
echo dhecho($brand_danger);
?>
;
}
.btn-danger {
  background-color: <?php 
echo dhecho($brand_danger);
?>
;
  border-color: <?php 
echo dhecho($brand_danger);
?>
;
Esempio n. 6
0
        public function end_el(&$output, $item, $depth = 0, $args = array())
        {
            $output .= "</li>\n";
            $header_style = dh_get_theme_option('header-style', 'below');
            if (dh_get_theme_option('site-style', 'default') == 'creative') {
                $header_style = 'center';
            }
            if ($header_style == 'center') {
                static $static_nav_count = 0;
                if ($depth === 0) {
                    $logo_url = dh_get_theme_option('logo');
                    $logo_fixed_url = dh_get_theme_option('logo-fixed', '');
                    $logo_transparent_url = dh_get_theme_option('logo-transparent', '');
                    $logo_mobile_url = dh_get_theme_option('logo-mobile', '');
                    if (empty($logo_fixed_url)) {
                        $logo_fixed_url = $logo_url;
                    }
                    if (empty($logo_mobile_url)) {
                        $logo_mobile_url = $logo_url;
                    }
                    $menu_transparent = dh_get_theme_option('menu-transparent', 0);
                    if ($menu_transparent) {
                        $logo_url = $logo_transparent_url;
                    }
                    $logo_html = '';
                    if (empty($logo_html)) {
                        ob_start();
                        ?>
						<a class="navbar-brand" data-itemprop="url" title="<?php 
                        esc_attr(bloginfo('name'));
                        ?>
" href="<?php 
                        echo esc_url(home_url('/'));
                        ?>
">
							<?php 
                        if (!empty($logo_url)) {
                            ?>
							<img class="logo" alt="<?php 
                            bloginfo('name');
                            ?>
" src="<?php 
                            echo esc_url($logo_url);
                            ?>
">
							<?php 
                        } else {
                            ?>
							<?php 
                            echo bloginfo('name');
                            ?>
							<?php 
                        }
                        ?>
							<img class="logo-fixed" alt="<?php 
                        bloginfo('name');
                        ?>
" src="<?php 
                        echo esc_url($logo_fixed_url);
                        ?>
">
							<img class="logo-mobile" alt="<?php 
                        bloginfo('name');
                        ?>
" src="<?php 
                        echo esc_url($logo_mobile_url);
                        ?>
">
							<meta itemprop="name" content="<?php 
                        bloginfo('name');
                        ?>
">
						</a>
						<?php 
                        $logo_html = ob_get_clean();
                    }
                    $static_nav_count++;
                    if ($static_nav_count == round($this->_number_of_root_elements / 2, 0, PHP_ROUND_HALF_DOWN)) {
                        $output .= '<li class="menu-item-navbar-brand">' . $logo_html . '</li>';
                    }
                }
            }
        }
Esempio n. 7
0
 * @version     2.2.2
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $wp_query;
$woo_products_pagination = dh_get_theme_option('woo-products-pagination', 'page_num');
?>
<nav class="woocommerce-pagination">
  <?php 
woocommerce_result_count();
?>
  <?php 
if ($wp_query->max_num_pages > 1) {
    dh_paginate_links();
}
?>
</nav>
<?php 
if ($woo_products_pagination === 'loadmore' && 1 < $wp_query->max_num_pages) {
    ?>
<div class="loadmore-action">
	<div class="loadmore-loading"><div class="fade-loading"><i></i><i></i><i></i><i></i></div></div>
	<button type="button" class="btn-loadmore"><?php 
    echo esc_html(dh_get_theme_option('woo-products-loadmore-text', 'Load More'));
    ?>
</button>
</div>
<?php 
}
Esempio n. 8
0
								<?php 
        }
        ?>
							<?php 
    }
    ?>
						</div>
					</div>
				</div>
			</div>
		<?php 
}
?>

		<?php 
if ($footer_info = dh_get_theme_option('footer-info')) {
    ?>
			<div class="footer-copyright text-center"><?php 
    echo $footer_info;
    ?>
</div>
    	<?php 
}
?>
	</footer>
	
</div>
<?php 
wp_footer();
?>
</body>
Esempio n. 9
0
<?php

$brand_warning = dh_format_color(dh_get_theme_option('brand-warning', '#f0ad4e'));
$brand_warning = apply_filters('dh_brand_warning', $brand_warning);
if ($brand_warning === '#f0ad4e') {
    return '';
}
$darken_10_brand_warning = darken(dh_format_color($brand_warning), '10%');
$darken_12_brand_warning = darken(dh_format_color($brand_warning), '12%');
?>
.text-warning {
  color: <?php 
echo dhecho($brand_warning);
?>
;
}
.blockquote-warning {
  border-color: <?php 
echo dhecho($brand_warning);
?>
;
}
.btn-warning {
  background-color: <?php 
echo dhecho($brand_warning);
?>
;
  border-color: <?php 
echo dhecho($brand_warning);
?>
;
Esempio n. 10
0
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version    2.4.0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
/**
 * Filter tabs and allow third parties to add their own
 *
 * Each tab is an array containing title, callback and priority.
 * @see woocommerce_default_product_tabs() 0905032132
 */
$tabs = apply_filters('woocommerce_product_tabs', array());
$layout = dh_get_theme_option('woo-product-layout', 'full-width');
if (!empty($tabs)) {
    ?>
<div class="woocommerce-tab-container woocommerce-tab-<?php 
    echo $layout;
    ?>
">
	<?php 
    if ($layout == 'full-width') {
        ?>
	<div class="<?php 
        dh_container_class();
        ?>
">
		<div class="row">
			<div class="col-md-12">
 entry-summary">
				<div class="summary">
			
					<?php 
/**
 * woocommerce_single_product_summary hook
 *
 * @hooked woocommerce_template_single_title - 5
 * @hooked woocommerce_template_single_rating - 10
 * @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
 */
if (!dh_get_theme_option('show-woo-meta', 1)) {
    remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40);
}
do_action('woocommerce_single_product_summary');
?>
			
					<div>
						<a href="#product-enquiry" class="btn btn-black">Product Enquiry</a>
					</div>
				</div><!-- .summary -->
			</div>
		</div>
	<?php 
if ($layout == 'full-width') {
    ?>
	</div>
/**
 * Single Product Thumbnails
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.3.0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $post, $product, $woocommerce;
$selected = false;
$attachment_ids = $product->get_gallery_attachment_ids();
$style = dh_get_theme_option('single-product-style', 'style-1');
if ($attachment_ids) {
    ?>
<div class="single-product-thumbnails" data-item_template = "<?php 
    echo esc_attr('<li class="caroufredsel-item' . ($style != 'style-1' ? ' col-sm-3 col-xs-6' : '') . '"><div class="thumb"><a href="#" title="__image_title__">__image__</a></div></li>');
    ?>
">
	<div class="caroufredsel product-thumbnails-slider" data-visible-min="2" data-visible-max="4" data-scrollduration="500"  <?php 
    if ($style == 'style-1') {
        ?>
 data-direction="up" data-height="100%" data-responsive="0" data-circular="1" <?php 
    } else {
        ?>
 data-circular="0" data-scroll-fx="scroll" data-responsive="1" <?php 
    }
    ?>
Esempio n. 13
0
			            	<div class="col-sm-6">
			            		<?php 
    if (dh_get_theme_option('footer-menu', 1)) {
        ?>
									<div class="footer-menu">
										<?php 
        if (has_nav_menu('footer')) {
            wp_nav_menu(array('theme_location' => 'footer', 'container' => false, 'depth' => 1, 'menu_class' => 'footer-nav', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 'walker' => new DHWalker()));
        }
        ?>
									</div>
								<?php 
    }
    ?>
								<?php 
    if ($footer_copyright = dh_get_theme_option('footer-copyright')) {
        ?>
									<div class="copyright"><?php 
        echo dhecho($footer_copyright);
        ?>
</div>
				            	<?php 
    }
    ?>
			            	</div>
			            </div>
			         </div>
				</div>
			</div>
		</footer>
	<?php 
Esempio n. 14
0
    ?>
					<?php 
    if (is_active_sidebar('sidebar-header')) {
        dynamic_sidebar('sidebar-header');
    }
    ?>
				<?php 
}
?>
				
			</div>
		</div>
	</div>
	<div class="navbar-container">
		<div class="navbar navbar-default <?php 
if (dh_get_theme_option('sticky-menu', 1)) {
    ?>
 navbar-scroll-fixed<?php 
}
?>
">
			<div class="navbar-primary-nav">
				<div class="<?php 
dh_container_class();
?>
">
					<div class="navbar-wrap">
						<nav class="collapse navbar-collapse primary-navbar-collapse" itemtype="<?php 
echo dh_get_protocol();
?>
://schema.org/SiteNavigationElement" itemscope="itemscope" role="navigation">
Esempio n. 15
0
 public function enqueue_theme_styles()
 {
     $protocol = dh_get_protocol();
     $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
     $main_css_id = basename(get_template_directory());
     //Playfair Display
     dh_enqueue_google_font();
     if ('off' !== _x('on', 'Google font: on or off', 'jakiro')) {
         wp_enqueue_style('dh-google-font-montserrat', 'http://fonts.googleapis.com/css?family=Montserrat:400,700|Droid+Serif:400,700');
     }
     wp_enqueue_style('vendor-elegant-icon');
     wp_enqueue_style('vendor-font-awesome');
     wp_register_style($main_css_id, get_template_directory_uri() . '/assets/css/style.css', false, DH_THEME_VERSION);
     if (class_exists('WPCF7_ContactForm')) {
         wp_deregister_style('contact-form-7');
     }
     wp_enqueue_style($main_css_id);
     if (defined('WOOCOMMERCE_VERSION')) {
         wp_enqueue_style($main_css_id . '-woocommerce', get_template_directory_uri() . '/assets/css/woocommerce' . $suffix . '.css', array($main_css_id), DH_THEME_VERSION);
     }
     wp_register_style($main_css_id . '-wp', get_stylesheet_uri(), false, DH_THEME_VERSION);
     do_action('dh_main_inline_style', $main_css_id);
     if ($custom_css = dh_get_theme_option('custom-css')) {
         wp_add_inline_style($main_css_id . '-wp', $custom_css);
     }
     $fix_el_apper = '@media (max-width: ' . apply_filters('dh_js_breakpoint', 992) . 'px) {.animate-box.animated{visibility: visible;}.column[data-fade="1"]{opacity: 1;filter: alpha(opacity=100);}.el-appear{opacity: 1;filter: alpha(opacity=100);-webkit-transform: scale(1);-ms-transform: scale(1);-o-transform: scale(1);transform: scale(1);}}';
     wp_add_inline_style($main_css_id . '-wp', $fix_el_apper);
     wp_enqueue_style($main_css_id . '-wp');
 }
Esempio n. 16
0
					<?php 
if (dh_get_theme_option('show-postnav', 1)) {
    dh_post_nav();
}
?>
					<?php 
if (dh_get_theme_option('show-authorbio', 1) && get_the_author_meta('description')) {
    ?>
						<?php 
    get_template_part('author-bio');
    ?>
					<?php 
}
?>
					<?php 
if (dh_get_theme_option('show-related', 1)) {
    dh_related_post();
}
?>
					<?php 
if (comments_open()) {
    ?>
						 <?php 
    comments_template('', true);
    ?>
					<?php 
}
?>
					</div>
				</div>
				<?php 
Esempio n. 17
0
    ?>
.heading-container{
	background-image:url(<?php 
    echo dhecho($heading_bg);
    ?>
);
}
<?php 
}
?>

<?php 
$footer_custom_color = array();
$custom_colors = array();
if (dh_get_theme_option('footer-color', 0)) {
    $footer_custom_color = dh_get_theme_option('footer-custom-color');
}
$custom_colors['footer-widget-bg'] = isset($footer_custom_color['footer-widget-bg']) ? dh_format_color($footer_custom_color['footer-widget-bg']) : '';
$custom_colors['footer-widget-color'] = isset($footer_custom_color['footer-widget-color']) ? dh_format_color($footer_custom_color['footer-widget-color']) : '';
$custom_colors['footer-widget-link'] = isset($footer_custom_color['footer-widget-link']) ? dh_format_color($footer_custom_color['footer-widget-link']) : '';
$custom_colors['footer-widget-link-hover'] = isset($footer_custom_color['footer-widget-link-hover']) ? dh_format_color($footer_custom_color['footer-widget-link-hover']) : '';
$custom_colors['footer-bg'] = isset($footer_custom_color['footer-bg']) ? dh_format_color($footer_custom_color['footer-bg']) : '';
$custom_colors['footer-color'] = isset($footer_custom_color['footer-color']) ? dh_format_color($footer_custom_color['footer-color']) : '';
$custom_colors['footer-link-color'] = isset($footer_custom_color['footer-link']) ? dh_format_color($footer_custom_color['footer-link']) : '';
$custom_colors['footer-link-hover'] = isset($footer_custom_color['footer-link-hover']) ? dh_format_color($footer_custom_color['footer-link-hover']) : '';
if (!empty($custom_colors['footer-widget-bg'])) {
    ?>
.footer-widget {
  background: <?php 
    echo dhecho($custom_colors['footer-widget-bg']);
    ?>
Esempio n. 18
0
        do_action('dh_facebook_login_button');
        ?>
		<?php 
    }
    ?>
		<div class="tab-pane active" id="tab-customer_login">
<?php 
} else {
    ?>
		
				<h2 class="woocommerce-account-heading"><?php 
    esc_html_e('Login', 'woow');
    ?>
</h2>
				<?php 
    if (dh_get_theme_option('facebook_login', 0) && get_option('users_can_register')) {
        ?>
					<?php 
        do_action('dh_facebook_login_button');
        ?>
				<?php 
    }
}
?>
						
				<form method="post" class="login">
		
					<?php 
do_action('woocommerce_login_form_start');
?>
		
Esempio n. 19
0
				</div>
			</div>
		</div>
	<?php 
} elseif ($page_heading == 'default') {
    ?>
	<div<?php 
    echo !empty($heading_menu_anchor) ? ' id ="' . esc_attr($heading_menu_anchor) . '"' : '';
    ?>
 class="heading-container">
		<div class="<?php 
    dh_container_class();
    ?>
 heading-standar">
			<?php 
    if (dh_get_theme_option('breadcrumb', 1)) {
        ?>
				<div class="page-breadcrumb" itemprop="breadcrumb">
					<?php 
        dh_the_breadcrumb();
        ?>
				</div>
			<?php 
    }
    ?>
		</div>
	</div>
	<?php 
}
?>
	<?php 
													S105.088,104,231,104z M231,505.625c94.295,0,171-77.208,171-172.125s-76.705-172.125-171-172.125
													c-94.295,0-171,77.208-171,172.125S136.705,505.625,231,505.625z"/>
											</g>
										</g>
									</g>
								</svg>
							</a>
						</div>
					</div>
					<?php 
}
?>
					<div class="navcart">
						<div class="navcart-wrap navbar-minicart-topbar">
							<?php 
if (class_exists('DH_Woocommerce') && defined('WOOCOMMERCE_VERSION') && dh_get_theme_option('woo-cart-nav', 1)) {
    echo '<div class="navbar-minicart navbar-minicart-topbar">' . DH_Woocommerce::instance()->get_minicart() . '</div>';
}
?>
						</div>
					</div>
					<?php 
$login_url = wp_login_url();
$logout_url = wp_logout_url();
$register_url = wp_registration_url();
if (defined('WOOCOMMERCE_VERSION')) {
    $login_url = get_permalink(get_option('woocommerce_myaccount_page_id'));
    $logout_url = wp_logout_url(get_permalink(woocommerce_get_page_id('myaccount')));
}
?>
					
Esempio n. 21
0
 protected function _product_get_frist_thumbnail()
 {
     global $product, $post;
     $image = '';
     $current_view_mode = get_option('dh_woocommerce_view_mode', dh_get_theme_option('dh_woocommerce_view_mode', 'grid'));
     $thumbnail_size = 'shop_catalog';
     if (version_compare(WOOCOMMERCE_VERSION, "2.0.0") >= 0) {
         $attachment_ids = $product->get_gallery_attachment_ids();
         $image_count = 0;
         if ($attachment_ids) {
             foreach ($attachment_ids as $attachment_id) {
                 if (get_post_meta($attachment_id, '_woocommerce_exclude_image')) {
                     continue;
                 }
                 $image = wp_get_attachment_image($attachment_id, $thumbnail_size);
                 $image_count++;
                 if ($image_count == 1) {
                     break;
                 }
             }
         }
     } else {
         $attachments = get_posts(array('post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID, 'post__not_in' => array(get_post_thumbnail_id()), 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC'));
         $image_count = 0;
         if ($attachments) {
             foreach ($attachments as $attachment) {
                 if (get_post_meta($attachment->ID, '_woocommerce_exclude_image') == 1) {
                     continue;
                 }
                 $image = wp_get_attachment_image($attachment->ID, $thumbnail_size);
                 $image_count++;
                 if ($image_count == 1) {
                     break;
                 }
             }
         }
     }
     return $image;
 }
Esempio n. 22
0
									<div class="loop-add-to-wishlist">
										<?php 
        DH_Woocommerce::instance()->template_loop_wishlist();
        ?>
									</div>
								<?php 
    }
    ?>
							</div>
							-->
						<?php 
}
?>
						
						<?php 
if (dh_get_theme_option('woo-grid-product-style') == 'style-2') {
    ?>
							<div class="loop-action">
								<div class="loop-add-to-cart">
									<?php 
    woocommerce_template_loop_add_to_cart();
    ?>
								</div>
							</div>
						<?php 
}
?>
					</div>
					
					<div class="info-excerpt">
						<?php 
Esempio n. 23
0
            echo '<input type="hidden" name="' . esc_attr($key) . '[]" value="' . esc_attr($innerVal) . '" />';
        }
    } else {
        echo '<input type="hidden" name="' . esc_attr($key) . '" value="' . esc_attr($val) . '" />';
    }
}
?>
	<div class="woocommerce-ordering-select">
		<label><?php 
_e('Show:', DH_THEME_DOMAIN);
?>
</label>
		<div class="form-flat-select">
			<select name="per_page" class="per_page">
				<?php 
$catalog_per_page = dh_get_theme_option('woo-per-page', 12);
$pager_page = isset($_GET['per_page']) ? $_GET['per_page'] : $catalog_per_page;
?>
				<option value="<?php 
echo esc_attr($catalog_per_page);
?>
" <?php 
selected($pager_page, $catalog_per_page);
?>
><?php 
echo sprintf('%1$s', $catalog_per_page);
?>
</option>
				<option value="<?php 
echo esc_attr($catalog_per_page * 2);
?>
Esempio n. 24
0
 public function excerpt_length($length)
 {
     $excerpt_length = dh_get_theme_option('excerpt-length', 60);
     return empty($excerpt_length) ? 60 : $excerpt_length;
 }
Esempio n. 25
0
								<div class="navbar-header">
									<button <?php 
/*data-target=".primary-navbar-collapse" data-toggle="collapse"*/
?>
 type="button" class="navbar-toggle">
										<span class="sr-only"><?php 
echo esc_html__('Toggle navigation', 'jakiro');
?>
</span>
										<span class="icon-bar bar-top"></span> 
										<span class="icon-bar bar-middle"></span> 
										<span class="icon-bar bar-bottom"></span>
									</button>
									<a class="navbar-search-button search-icon-mobile" href="#"><i class="fa fa-search"></i></a>
							    	<?php 
if (defined('WOOCOMMERCE_VERSION') && dh_get_theme_option('woo-cart-mobile', 1)) {
    ?>
							     	<?php 
    global $woocommerce;
    if (version_compare(WOOCOMMERCE_VERSION, "2.1.0") >= 0) {
        $cart_url = apply_filters('woocommerce_get_checkout_url', WC()->cart->get_cart_url());
    } else {
        $cart_url = esc_url($woocommerce->cart->get_cart_url());
    }
    ?>
									<a class="cart-icon-mobile" href="<?php 
    echo esc_url($cart_url);
    ?>
"><i class="elegant_icon_bag"></i><span><?php 
    echo absint($woocommerce->cart->cart_contents_count);
    ?>
Esempio n. 26
0
                echo esc_html($attribute->name);
                ?>
</span>
															</div>
															<?php 
            }
        }
        ?>
													</div>
												</div>
												<?php 
        if (dh_get_theme_option('show-portfolio-share', 1)) {
            ?>
												<div class="portfolio-share">
													<?php 
            dh_share('', dh_get_theme_option('portfolio-fb-share', 1), dh_get_theme_option('portfolio-tw-share', 1), dh_get_theme_option('portfolio-go-share', 1), dh_get_theme_option('portfolio-pi-share', 0), dh_get_theme_option('portfolio-li-share', 1));
            ?>
												</div>
												<?php 
        }
        ?>
											</div>
										</div>
									</div>
								</div>
								<?php 
        if (get_the_content()) {
            ?>
								<div class="portfolio-content">
									<?php 
            the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', DH_THEME_DOMAIN));
?>
">
			<div class="row">
				<div class="col-md-9 main-wrap" data-itemprop="mainContentOfPage" role="main">
					<div class="main-content">
						<?php 
if (have_posts()) {
    ?>
							<?php 
    while (have_posts()) {
        the_post();
        the_content();
    }
    ?>
							 <?php 
    if (dh_get_theme_option('comment-page', 0) && comments_open(get_the_ID())) {
        comments_template('', true);
    }
    ?>
						<?php 
}
?>
					</div>
				</div>
				<?php 
get_sidebar();
?>
			</div>
		</div>
	</div>
<?php 
Esempio n. 28
0
function dh_enqueue_theme_styles()
{
    $protocol = dh_get_protocol();
    $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
    $main_css_id = basename(get_template_directory());
    dh_enqueue_google_font();
    if (dh_get_theme_option('site-style', 'default') == 'creative') {
        wp_enqueue_style('dh-google-font-montserrat', 'http://fonts.googleapis.com/css?family=Montserrat:400,700');
    }
    wp_enqueue_style('vendor-elegant-icon');
    wp_enqueue_style('vendor-font-awesome');
    wp_register_style($main_css_id, get_template_directory_uri() . '/assets/css/style-' . dh_get_theme_option('site-style', 'default') . $suffix . '.css', false, DH_THEME_VERSION);
    if (class_exists('WPCF7_ContactForm')) {
        wp_deregister_style('contact-form-7');
    }
    wp_enqueue_style($main_css_id);
    if (defined('WOOCOMMERCE_VERSION')) {
        if (is_woocommerce() || is_cart()) {
            wp_enqueue_style('vendor-magnific-popup');
            wp_enqueue_script('vendor-magnific-popup');
            wp_enqueue_script('vendor-carouFredSel');
        }
        wp_enqueue_style($main_css_id . '-woocommerce', get_template_directory_uri() . '/assets/css/woocommerce-' . dh_get_theme_option('site-style', 'default') . $suffix . '.css', array($main_css_id), DH_THEME_VERSION);
    }
    wp_register_style($main_css_id . '-wp', get_stylesheet_uri(), false, DH_THEME_VERSION);
    if ($custom_css = dh_get_theme_option('custom-css')) {
        wp_add_inline_style($main_css_id . '-wp', $custom_css);
    }
    $fix_el_apper = '@media (max-width: ' . apply_filters('dh_js_breakpoint', 992) . 'px) {.animate-box.animated{visibility: visible;}.column[data-fade="1"]{opacity: 1;filter: alpha(opacity=100);}.el-appear{opacity: 1;filter: alpha(opacity=100);-webkit-transform: scale(1);-ms-transform: scale(1);-o-transform: scale(1);transform: scale(1);}}';
    wp_add_inline_style($main_css_id . '-wp', $fix_el_apper);
    wp_enqueue_style($main_css_id . '-wp');
}
Esempio n. 29
0
$main_class = dh_get_main_class();
$layout = dh_get_theme_option('blogs-style', 'masonry');
$pagination = dh_get_theme_option('blogs-pagination', 'infinite_scroll');
$loadmore_text = dh_get_theme_option('blogs-loadmore-text', __('Load More', DH_THEME_DOMAIN));
$columns = dh_get_theme_option('blogs-columns', 4);
$show_tag = dh_get_theme_option('blogs-show-tag', '0') == '1' ? 'yes' : '';
$link_post_title = dh_get_theme_option('blogs-link-post-title', '1') == '1' ? 'yes' : '';
$hide_post_title = dh_get_theme_option('blogs-show-post-title', '1') == '1' ? '' : 'yes';
$hide_thumbnail = dh_get_theme_option('blogs-show-featured', '1') == '1' ? '' : 'yes';
$hide_date = dh_get_theme_option('blogs-show-date', '1') == '1' ? '' : 'yes';
$hide_comment = dh_get_theme_option('blogs-show-comment', '1') == '1' ? '' : 'yes';
$hide_category = dh_get_theme_option('blogs-show-category', '1') == '1' ? '' : 'yes';
$hide_author = dh_get_theme_option('blogs-show-author', '1') == '1' ? '' : 'yes';
$hide_readmore = dh_get_theme_option('blogs-show-readmore', '1') == '1' ? '' : 'yes';
$excerpt_length = absint(dh_get_theme_option('blogs-excerpt-length', 30));
$show_date = empty($hide_date) ? true : false;
$show_comment = empty($hide_comment) ? true : false;
$show_category = empty($hide_category) ? true : false;
$show_author = empty($hide_author) ? true : false;
global $wp_query;
if ($layout == 'masonry') {
    /**
     * script
     * {{
     */
    wp_enqueue_script('vendor-isotope');
}
if ($pagination === 'infinite_scroll') {
    /**
     * script
Esempio n. 30
0
/**
 * woocommerce_before_single_product hook
 *
 * @hooked wc_print_notices - 10
 */
do_action('woocommerce_before_single_product');
if (post_password_required()) {
    echo get_the_password_form();
    return;
}
wp_enqueue_style('vendor-magnific-popup');
wp_enqueue_script('vendor-magnific-popup');
wp_enqueue_script('vendor-carouFredSel');
$img_col = 'col-md-6';
$sum_col = 'col-md-6';
$header_style = dh_get_theme_option('header-style', 'classic');
if ($header_style == 'sidebar') {
    $img_col = 'col-md-7';
    $sum_col = 'col-md-5';
}
?>
<div itemscope itemtype="<?php 
echo woocommerce_get_product_schema();
?>
" id="product-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>