function builtpress_print_styles()
 {
     $post_id = class_exists('Woocommerce') && is_woocommerce() ? get_option('woocommerce_shop_page_id') : get_the_ID();
     $logo_height = 135;
     $topbar_height = builtpress_opt('topbar_enable') ? 40 : 0;
     $padding_top = $logo_height + $topbar_height;
     $title_padding_top = builtpress_opt_page('title_padding_top', 40);
     $title_padding_bottom = builtpress_opt_page('title_padding_bottom', 40);
     $color_title = builtpress_opt_page('color_title');
     $color_subtitle = builtpress_opt_page('color_subtitle');
     $color_breadcrumb = builtpress_opt_page('color_breadcrumb');
     $general_title_hide = get_post_meta($post_id, '_st_general_title_hide', TRUE);
     ob_start();
     require_once get_template_directory() . '/assets/css/style-custom.php';
     // Title Padding
     if (!empty($title_padding_top)) {
         echo ".title-holder { padding-top: " . intval($title_padding_top) . "px; }\n";
     }
     if (!empty($title_padding_bottom)) {
         echo ".title-holder { padding-bottom: " . intval($title_padding_bottom) . "px; }\n";
     }
     // Title Color
     if (!empty($color_title)) {
         echo ".page-title { color: " . esc_attr($color_title) . " !important; }\n";
     }
     // Subtitle Color
     if (!empty($color_subtitle)) {
         echo ".page-subtitle { color: " . esc_attr($color_subtitle) . " !important; }\n";
     }
     // Breadcrumb Color
     if (!empty($color_breadcrumb)) {
         echo ".breadcrumb li, .breadcrumb li a, .breadcrumb > .active { color: " . esc_attr($color_breadcrumb) . " !important; }\n";
     }
     // Padding Top
     if (builtpress_opt('header_style') == 'v1' && builtpress_opt_page('header_transparent')) {
         if ($general_title_hide != 'on') {
             echo "#title-wrapper { padding-top: " . intval($padding_top) . "px; }\n";
             echo "#content-wrapper.is-vc .post-content > .wpb_padding:first-child { padding-top: 80px; }\n";
         } else {
             echo "#content-wrapper.not-vc { padding-top: " . (intval($padding_top) + 80) . "px; }\n";
         }
     } else {
         if (builtpress_opt('header_style') == 'v2' && $general_title_hide != 'on') {
             echo "#title-wrapper { padding-top: 205px; }\n";
         }
         echo "#content-wrapper.is-vc .post-content > .wpb_padding:first-child { padding-top: 80px; }\n";
     }
     // Background Title
     $custom_bg_title = FALSE;
     if (is_page() || is_singular(array('st_portfolio', 'st_service', 'st_team'))) {
         $custom_bg_title = TRUE;
     } elseif (class_exists('Woocommerce') && is_woocommerce()) {
         $custom_bg_title = TRUE;
     }
     $style_bg_title = builtpress_opt('style_bg_title');
     if ($custom_bg_title) {
         $general_style_bg_title = builtpress_opt_page('style_bg_title');
         if (is_array($general_style_bg_title)) {
             if (preg_match('/[A-F0-9]{6}/', strtoupper($general_style_bg_title['background-color']))) {
                 $style_bg_title['background-color'] = $general_style_bg_title['background-color'];
                 $style_bg_title['background-image'] = '';
             }
             if (preg_match('/[\\w\\-]+\\.(jpg|png|gif|jpeg)/', strtolower($general_style_bg_title['background-image']))) {
                 $style_bg_title['background-color'] = '';
                 $style_bg_title['background-image'] = $general_style_bg_title['background-image'];
             }
             if (!empty($general_style_bg_title['background-repeat'])) {
                 $style_bg_title['background-repeat'] = $general_style_bg_title['background-repeat'];
             }
             if (!empty($general_style_bg_title['background-size'])) {
                 $style_bg_title['background-size'] = $general_style_bg_title['background-size'];
             }
             if (!empty($general_style_bg_title['background-attachment'])) {
                 $style_bg_title['background-attachment'] = $general_style_bg_title['background-attachment'];
             }
             if (!empty($general_style_bg_title['background-position'])) {
                 $style_bg_title['background-position'] = $general_style_bg_title['background-position'];
             }
         }
     }
     if (is_array($style_bg_title)) {
         $output = '';
         if (!empty($style_bg_title['background-color'])) {
             $output .= "background-color: " . esc_attr($style_bg_title['color']) . ";\n";
         }
         if (!empty($style_bg_title['background-image']) && preg_match('/[\\w\\-]+\\.(jpg|png|gif|jpeg)/', strtolower($style_bg_title['background-image']))) {
             $output .= "background-image: url('" . esc_url($style_bg_title['background-image']) . "');\n";
             if (!empty($style_bg_title['background-repeat'])) {
                 $output .= "background-repeat: " . esc_attr($style_bg_title['background-repeat']) . ";\n";
             }
             if (!empty($style_bg_title['background-size'])) {
                 $output .= "background-size: " . esc_attr($style_bg_title['background-size']) . ";\n";
             }
             if (!empty($style_bg_title['background-attachment'])) {
                 $output .= "background-attachment: " . esc_attr($style_bg_title['background-attachment']) . ";\n";
             }
             if (!empty($style_bg_title['background-position'])) {
                 $output .= "background-position: " . esc_attr($style_bg_title['background-position']) . ";\n";
             }
         }
         if (!empty($output)) {
             echo "#title-wrapper {\n";
             echo htmlspecialchars_decode(esc_textarea($output), ENT_QUOTES);
             echo "}\n";
         }
     }
     if ($custom_css = builtpress_opt('custom_css')) {
         echo htmlspecialchars_decode(esc_textarea($custom_css), ENT_QUOTES) . "\n";
     }
     $print_styles = ob_get_contents();
     ob_end_clean();
     $print_styles = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $print_styles);
     $print_styles = str_replace(': ', ':', $print_styles);
     $print_styles = str_replace(array("\r\n", "\r", "\n", "\t", '  ', '    ', '    '), '', $print_styles);
     wp_add_inline_style('builtpress-style', $print_styles);
 }
get_template_part('parts/partial', 'blog-media');
?>
	
	<div class="post-content">
		<?php 
the_content();
wp_link_pages(array('before' => '<div class="pagination"><strong>' . esc_html__('Pages:', 'builtpress') . '</strong>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>'));
edit_post_link('<i class="fa fa-pencil"></i>' . esc_html__('Edit Page', 'builtpress'), '<div class="edit-link">', '</div>');
if (builtpress_opt('post_tags')) {
    the_tags('<div class="post-tags"><i class="fa fa-tags"></i> <strong>' . esc_html__('Tags:', 'builtpress') . '</strong>', ', ', '</div>');
}
?>
	</div>
	
	<?php 
if (builtpress_opt('post_author')) {
    ?>
	<div class="post-authors">
		<h3 class="st-subheading"><?php 
    esc_html_e('About Author', 'builtpress');
    ?>
</h3>
		<div class="author-left pull-left">
			<?php 
    echo get_avatar(get_the_author_meta('email'), 75);
    ?>
		</div>
		<div class="author-right">
			<h4><?php 
    the_author_posts_link();
    ?>
		
			<div class="title-holder">
			<div class="title-holder-cell text-<?php 
echo esc_attr(builtpress_opt('title_align'));
?>
">
			
			<?php 
if (is_archive()) {
    the_archive_title('<h1 class="page-title"><span>', '</span></h1>');
} elseif (is_search()) {
    echo '<h1 class="page-title"><span>' . sprintf(esc_html__('Search Results for: %s', 'builtpress'), esc_html(get_search_query())) . '</span></h1>';
} elseif (is_home() || is_singular('post')) {
    echo '<h1 class="page-title"><span>' . esc_attr(builtpress_opt('post_page_title')) . '</span></h1>';
} elseif (is_404()) {
    echo '<h1 class="page-title"><span>' . esc_html__('Page Not Found', 'builtpress') . '</span></h1>';
}
if (builtpress_opt('title_breadcrumb')) {
    builtpress_breadcrumb();
}
?>
			
			</div>
			</div>
				
		</div>
	
	</div>
	</div>

</section>
 function builtpress_woo_related_products_args()
 {
     $cols = builtpress_opt('woo_layout') == 'fw' ? 4 : 3;
     $args = array('posts_per_page' => intval($cols), 'columns' => intval($cols));
 }
if (builtpress_opt('header_button_link') && builtpress_opt('header_button_value')) {
    echo '<a class="header-button" href="' . get_permalink(intval(builtpress_opt('header_button_link'))) . '">' . esc_attr(builtpress_opt('header_button_value')) . '</a>';
}
?>
							</div>
						</div>
						
						<div class="header-bottom">
							<nav id="primary-nav" role="navigation">
								<?php 
builtpress_theme_menu('header');
?>
							</nav>					
							<div class="header-right-inner">
								<?php 
if (builtpress_opt('header_search', true)) {
    echo '<div class="header-search">';
    builtpress_theme_search();
    echo '</div>';
}
?>
							</div>						
						</div>
					
					</div>
					
				</div>
				
			</div>
		
		</div>
			<div class="topbar-left">
				<ul class="list-inline">
				<?php 
$topbar_info = builtpress_opt('topbar_info');
for ($i = 1; $i <= 2; $i++) {
    if ($topbar_info['label_' . $i] && $topbar_info['value_' . $i]) {
        printf('<li><span class="topbar-label">%s</span><span class="topbar-hightlight">%s</span></li>', wp_kses_post($topbar_info['label_' . $i]), wp_kses_post($topbar_info['value_' . $i]));
    }
}
?>
				</ul>
			</div>
			
		</div>
		
		<div class="col-md-4 col-sm-4 hidden-xs">
			
			<div class="topbar-right text-right">
				<?php 
if (builtpress_opt('topbar_social')) {
    builtpress_theme_socials(builtpress_opt('topbar_social_show'));
}
?>
			</div>
			
		</div>
	
	</div>
	</div>
	
</div>
<!-- main-container -->
<section id="content-wrapper" class="<?php 
echo builtpress_theme_isvc() ? 'is-vc' : 'not-vc';
?>
">

	<?php 
$page_layout = 'fw';
if (is_page() || is_singular(array('st_portfolio', 'st_service', 'st_team'))) {
    $page_layout = get_post_meta(get_the_ID(), '_st_page_layout', TRUE);
} elseif (is_home() || is_archive() || is_search() || is_singular('post')) {
    $page_layout = builtpress_opt('post_layout', 'rb');
}
if (class_exists('Woocommerce') && is_woocommerce()) {
    $page_layout = builtpress_opt('woo_layout', 'rb');
}
switch ($page_layout) {
    case 'rb':
        ?>
			<div class="container">
			<div class="row">
			<main id="main-wrapper" class="col-md-9" role="main">
			<?php 
        break;
    case 'lb':
        ?>
			<div class="container">
			<div class="row">
			<main id="main-wrapper" class="col-md-9 col-md-push-3" role="main">
			<?php 
        break;
示例#8
0
				<?php 
    $copyright_column = builtpress_opt('footer_copyright_menu') ? 'col-md-6 col-sm-12 col-xs-12' : 'col-md-12 text-center';
    ?>
				<div class="<?php 
    echo esc_attr($copyright_column);
    ?>
">
					<?php 
    $copyright_text = builtpress_opt('footer_copyright_text', sprintf('&copy; Copyright 2015. <a href="%s">WordPress Theme</a> by SliceTheme', 'http://www.slicetheme.com/'));
    echo '<div>' . wp_kses_post($copyright_text) . '</div>';
    ?>
					
				</div>
				
				<?php 
    if (builtpress_opt('footer_copyright_menu')) {
        ?>
				<div class="col-md-6 col-sm-12 col-xs-12">
					<nav id="secondary-nav" class="text-right" role="navigation">
						<?php 
        builtpress_theme_menu('footer');
        ?>
					</nav>
				</div>
				<?php 
    }
    ?>
							
			</div>
			</div>
			
<?php

/**
 * Product Loop Start
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.0.0
 */
$cols = builtpress_opt('woo_layout') == 'fw' ? 4 : 3;
echo '<ul class="products column-' . intval($cols) . '">';
<?php

/*******************************************************************
Primary Color Skins
********************************************************************/
$style_skin_primary = builtpress_opt('style_skin_primary', '#ffb300');
if (!empty($style_skin_primary)) {
    echo "\nbody .vc_progress_bar .vc_single_bar .vc_bar,\nbody .vc_images_carousel .vc_carousel-indicators .vc_active,\n.btn, \nbutton,\n.button,\nhtml input[type='button'], \ninput[type='reset'], \ninput[type='submit'],\ninput.button,\n.load-more a,\na.button,\n.wc-forward,\n.address .edit,\n.header-button,\n.portfolio-link a:hover,\n.woocommerce #respond input#submit, \n.woocommerce a.button, \n.woocommerce button.button, \n.woocommerce input.button,\n.woocommerce #respond input#submit.alt, \n.woocommerce a.button.alt, \n.woocommerce button.button.alt, \n.woocommerce input.button.alt,\n.woocommerce .widget_price_filter .ui-slider .ui-slider-handle,\n.st-button.style-1:hover,\n.st-button.style-2:hover,\n.wpb_color .st-button.style-1:hover,\n.wpb_color .st-button.style-2:hover,\n.st-pricingbox.style-1 .box-link a:hover,\n.st-pricingbox.style-1.box-featured .box-link a,\n.st-pricingbox.style-1.box-featured .box-link a:hover,\n.st-social a::after,\n.st-iconbox.style-3:hover,\n.st-iconbox.style-1 .box-icon::after,\n.widget.widget_tag_cloud a:hover, \n.widget.widget_product_tag_cloud a:hover,\n.owl-theme .owl-controls .owl-page.active span{\n\tbackground-color:" . esc_attr($style_skin_primary) . ";\n}\n\n.st-button.style-1:hover,\n.st-button.style-2:hover,\n.wpb_color .st-button.style-1:hover,\n.wpb_color .st-button.style-2:hover,\n.st-pricingbox.style-1:hover, \n.st-pricingbox.style-1.box-featured,\n.st-pricingbox.style-1 .box-link a:hover,\n.st-pricingbox.style-1.box-featured .box-link a,\n.st-pricingbox.style-1.box-featured .box-link a:hover,\n.widget-title::before,\n.format-standard .blog-container .post-thumb::before,\n.format-standard .blog-container .post-thumb::after,\n.st-blog .blog-container .post-thumb::before,\n.st-blog .blog-container .post-thumb::after,\n.portfolio-container.style-2 .portfolio-image::before,\n.portfolio-container.style-2 .portfolio-image::after,\n.service-container.style-2 .service-image::before,\n.service-container.style-2 .service-image::after,\n.load-filter li a::after,\n.portfolio-link a:hover,\n.st-metabox,\n.sticky .blog-container,\n.owl-theme .owl-controls .owl-page.active span{\n\tborder-color:" . esc_attr($style_skin_primary) . ";\n}\n\nh1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,\n.header-style-v1 .header-skin-default ul.primary-menu > li > a:hover,\n.header-style-v1 .header-skin-default ul.primary-menu > li:hover > a,\n.header-style-v1 .header-skin-default ul.primary-menu > li.current_page_item > a,\n.header-style-v1 .header-skin-default ul.primary-menu > li.current-menu-parent > a,\n.header-style-v1 .header-skin-default ul.primary-menu > li.current-menu-ancestor > a,\n.header-skin-transparent ul.primary-menu > li > a:hover,\n.header-skin-transparent ul.primary-menu > li:hover > a,\n.header-skin-transparent ul.primary-menu > li.current_page_item > a,\n.header-skin-transparent ul.primary-menu > li.current-menu-parent > a,\n.header-skin-transparent ul.primary-menu > li.current-menu-ancestor > a,\n#header-wrapper .header-left-info li .header-label,\n.st-iconbox .box-icon,\n.st-countdown .countdown-amount,\n.service-link a, .more-link a,\n.blog-container:hover .post-meta i, \n.blog-container:hover .post-meta strong,\n.woocommerce .star-rating span::before,\n.woocommerce p.stars a:hover,\n.st-social a,\n.service-container.style-1:hover .service-content h4,\n.blog-container .post-title a:hover{\n\tcolor:" . esc_attr($style_skin_primary) . ";\n}\n";
}