static function custom_js() { $custom_js = Bw::get_option('custom_js'); if ($custom_js) { echo "<script type='text/javascript'>{$custom_js}</script>"; } }
public function widget($args, $instance) { $title = apply_filters('widget_title', $instance['title']); echo $args['before_widget']; if (!empty($title)) { echo $args['before_title'] . $title . $args['after_title']; } $category = $instance['category']; $unserialized_categories = unserialize($category); $cat_string = is_array($unserialized_categories) ? join(',', $unserialized_categories) : ''; $max_posts = (int) $instance['max_posts']; $autoheight = (int) $instance['autoheight']; $autoplay = (int) $instance['autoplay']; // the query $q = new WP_Query(array('orderby' => 'date', 'posts_per_page' => $max_posts > 0 && $max_posts <= 10 ? $max_posts : 5, 'category__in' => $unserialized_categories, 'meta_key' => '_thumbnail_id')); $list = '<div class="bw-widget-slider-holder">'; $list .= '<ul class="bw-widget-slider ' . ($autoplay ? 'auto-play' : '') . '" ' . ($autoplay ? 'data-speed="3000"' : '') . '>'; while ($q->have_posts()) { $q->the_post(); $size = $autoheight ? 'bw_350' : 'bw_350x300'; if (Bw::get_option('enable_lazy_image')) { $thumbnail = '<img class="lazy" data-src="' . Bw::get_image_src($size) . '" src="' . Bw::empty_img('350x300') . '" alt="">'; } else { $thumbnail = '<img src="' . Bw::get_image_src($size) . '" alt="">'; } $list .= "<li>\n\t\t\t\t<a class='image' href='" . get_permalink() . "'>\n\t\t\t\t\t{$thumbnail}\n\t\t\t\t</a>\n\t\t\t\t<div class='box'>\n\t\t\t\t\t<h4 class='bb'><a href='" . get_permalink() . "' title='" . get_the_title() . "'>" . get_the_title() . "</a></h4>\n\t\t\t\t</div>\n\t\t\t</li>"; } wp_reset_query(); $list .= "</ul>"; $list .= "</div>"; echo $list; echo $args['after_widget']; }
static function generate_fonts() { if (is_array(self::$fonts)) { $protocol = is_ssl() ? 'https' : 'http'; $generate_font_req = ''; $generate_font_css = ''; foreach (self::$fonts as $name => $font) { $custom = false; # check for ot default google fonts $ot_font = Bw::get_option($name . '_font'); if (!empty($ot_font)) { $font['font'] = $ot_font; } # check for ot declared fonts $ot_font_declaration = Bw::get_option($name . '_font_declaration'); if (!empty($ot_font_declaration)) { $font['font'] = $ot_font_declaration; $custom = true; } if ($font['font']) { $generate_font_req[] = str_replace(" ", "+", $font['font']); $rule = join(',', $font['selectors']); $generate_font_css .= $custom ? "{$rule}{font:{$font['font']}}" : "{$rule}{font-family:'{$font['font']}'}"; } } $output_css = join('|', $generate_font_req); wp_enqueue_style('google-fonts', "{$protocol}://fonts.googleapis.com/css?family={$output_css}"); Bw::add_css($generate_font_css); } }
static function style($ot) { # category styling if (is_category()) { if (is_object(get_queried_object()) and !empty(get_queried_object()->term_id)) { $term = get_term(get_queried_object()->term_id, 'category'); $cat_color = get_field('category_color', $term); if (!empty($cat_color)) { $ot['main_color'] = $cat_color; } } } # signle article inherit first category style if (is_single()) { $cat_object = current(get_the_category()); if (is_object($cat_object) and !empty($cat_object->term_id)) { $term = get_term($cat_object->term_id, 'category'); $cat_color = get_field('category_color', $term); if (!empty($cat_color)) { $ot['main_color'] = $cat_color; } } } $style = "\n\t\t\t::selection {background:{$ot['main_color']};color:#fff;}\n\t\t\t::-moz-selection {background:{$ot['main_color']};color:#fff;}\n\t\t"; # bg elements $style .= ".bargraph li span, .post-categories a, .post-tags a, .billboard-slider .info .read-more a:hover, .bw-slider .owl-buttons div:hover, .article-thumb:hover .icon, .woocommerce #content input.button.alt, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce-page #content input.button.alt, .woocommerce-page #respond input#submit.alt, .woocommerce-page a.button.alt, .woocommerce-page button.button.alt, .woocommerce-page input.button.alt, #footer .reviews article .bar .progress, .reviews article .bar .progress, .widget_tag_cloud a, #header.version-3 .right-content.black .search-submit:hover, #header.version-3 .search-form .search-submit, .page .search-form .search-submit:hover, #header.version-3 .search-form .search-submit:hover, .cat-tags a, .score-box .score, .review-score .bar .progress, .article-thumb .rate, #header .social a:hover {background-color:{$ot['main_color']}!important}"; $style .= "#footer .widget_tag_cloud a:hover {background-color:{$ot['main_color']}!important;}"; # color elements $style .= ".bw-button, .bw-slider .title h3:hover, .article-title h3.bb a:hover, #sidebar .reviews article .bar .score-label a:hover, .bw-megamenu .article-title span:hover, .bw-megamenu .megamenu-slider .item:hover .title h3, .bw-megamenu .small-link:hover, .woocommerce .cart-collaterals .shipping_calculator .shipping-calculator-button, .woocommerce-page .cart-collaterals .shipping_calculator .shipping-calculator-button, .woocommerce .product_meta a, #footer .bw-popular-widget-nav a.active, .widget_archive ul a, .widget_categories ul a, .widget_pages ul a, #content .post table th, .post-author .cont h4 a:hover, .cat-tags-list a, .header-parallax .date strong a:hover, .post-subtitle a:hover, a, a:visited {color:{$ot['main_color']}}"; # other $style .= ".post-tags a:before, .cat-tags a:before {border-right-color:{$ot['main_color']}}"; $style .= "blockquote {border-left:8px solid:{$ot['main_color']}}"; $style .= "#footer #wp-calendar tbody td {border-top:1px solid {$ot['main_color']}}"; $style .= "#footer #wp-calendar tfoot tr td {border-top:1px solid {$ot['main_color']}}"; $style .= ".billboard-slider .info .read-more a:hover, .bw-slider .owl-buttons div:hover, .article-thumb:hover .icon {border-color:{$ot['main_color']}}"; $style .= "blockquote {border-color:{$ot['main_color']}}"; $style .= "\n\t\t\tbody {background-color:{$ot['background_color']}}\n\t\t\t#header .row-holder {background-color:{$ot['header_nav_color']}}\n\t\t\tbody.boxed #header .row-holder .row.for-sub-header {background-color:{$ot['header_nav_color']};}\n\t\t"; $style .= ".papa-grid h3 a {color:#000}"; $style .= ".post-categories a:hover, .post-tags a:hover {background-color:#000!important}"; $style .= ".article-thumb .rate:after {border-color:rgba(" . Bw::color_saturation(Bw::hex2rgb($ot['main_color']), -60) . ",1) transparent}"; if (Bw::get_option('header_white')) { $style .= '#header {background-color:#fff;}'; } if (Bw::get_option('header_nav_color') or Bw::get_option('invert_header_nav_color')) { $style .= '.bw-megamenu {padding-top:15px;}'; } if (Bw::get_option('header_color') and !Bw::get_option('header_white')) { $style .= "#header {background-color:{$ot['header_color']};}"; } if ($ot['background_image']) { $style .= "#bw-bg {background:url('{$ot['background_image']}') no-repeat center center;background-size:cover;background-attachment:fixed;}"; } $style .= self::get_shadow($ot['container_shadow']); printf("<style>%s</style>", $style); }
function widget($args, $instance) { global $comments, $comment; $cache = wp_cache_get('widget_recent_comments', 'widget'); if (!is_array($cache)) { $cache = array(); } if (!isset($args['widget_id'])) { $args['widget_id'] = $this->id; } if (isset($cache[$args['widget_id']])) { echo $cache[$args['widget_id']]; return; } extract($args, EXTR_SKIP); $output = ''; $title = !empty($instance['title']) ? $instance['title'] : __('Recent Comments'); $title = apply_filters('widget_title', $title, $instance, $this->id_base); $number = !empty($instance['number']) ? absint($instance['number']) : 5; if (!$number) { $number = 5; } $comments = get_comments(apply_filters('widget_comments_args', array('number' => $number, 'status' => 'approve', 'post_status' => 'publish'))); $output .= $before_widget; if ($title) { $output .= $before_title . $title . $after_title; } $output .= '<ul id="recentcomments" class="bw-sidebar-posts">'; if ($comments) { // Prime cache for associated posts. (Prime post term cache if we need it for permalinks.) $post_ids = array_unique(wp_list_pluck($comments, 'comment_post_ID')); _prime_post_caches($post_ids, strpos(get_option('permalink_structure'), '%category%'), false); foreach ((array) $comments as $comment) { if (Bw::get_option('enable_lazy_image')) { $bw_image = "<img class='lazy' data-src='" . get_avatar_url($comment->user_id) . "' src='" . Bw::empty_img() . "' alt='' >"; } else { $bw_image = "<img src='" . get_avatar_url($comment->user_id) . "' alt='' >"; } $output .= '<li class="recentcomments">'; $output .= '<div class="thumb"><a href="' . esc_url(get_comment_link($comment->comment_ID)) . '">' . $bw_image . '</a></div>'; $output .= '<div class="cont"><a href="' . esc_url(get_comment_link($comment->comment_ID)) . '">' . get_comment_author_link() . '</a>'; $output .= '<p>' . Bw::truncate($comment->comment_content, 7) . '</p></div>'; $output .= '</li>'; } } $output .= '</ul>'; $output .= $after_widget; echo $output; $cache[$args['widget_id']] = $output; wp_cache_set('widget_recent_comments', $cache, 'widget'); }
static function logo() { $ot_logo = Bw::get_option('logo'); $output = ''; $output .= '<div id="logo"><a href="' . esc_url(home_url('/')) . '">'; if (!empty($ot_logo)) { $output .= '<img class="desktop" src="' . Bw::get_option('logo') . '" alt="' . get_bloginfo('name') . '">'; $output .= Bw::get_option('logo_mobile') ? '<img class="mobile" src="' . Bw::get_option('logo_mobile') . '" alt="">' : '<h4 class="bb mobile plain">' . get_bloginfo('name') . '</h4>'; } else { $output .= '<h1>' . get_bloginfo('name') . '</h1><h2>' . get_bloginfo('description') . '</h2>'; } $output .= '</a></div>'; return $output; }
static function verify_user() { # proceed if automatic updates are enabled $enable_updates = Bw::get_option('enable_updates'); if (!$enable_updates) { return; } # use credentials used in toolkit plugin $credentials = get_option('envato-wordpress-toolkit'); if (empty($credentials['user_name']) || empty($credentials['api_key'])) { # display a notice in the admin to remind the user to enter their credentials add_action('admin_notices', array('Bw_updater', 'admin_notices')); return; } else { if (!self::set_timeout()) { self::check_for_updates($credentials); } } }
static function enqueue_assets() { # css Bw_assets::addStyle('style', 'style.css'); Bw_assets::addStyle('bw-owl-carousel', 'assets/css/vendors/jquery.owl.carousel/owl.carousel.all.css'); Bw_assets::addStyle('bw-magnific-popup', 'assets/css/vendors/jquery.magnific-popup/magnific-popup.css'); Bw_assets::addStyle('bw-animate', 'assets/css/vendors/animate/animate.css'); Bw_assets::addStyle('bw-style', 'assets/css/style.css'); Bw_assets::addStyle('bw-media', 'assets/css/media.css'); # js if (Bw::get_option('enable_smooth_scroll')) { Bw_assets::addScript('bw-smooth-scroll', 'assets/js/vendors/jquery.smooth-scroll/jquery.smooth-scroll.js', array(), BW_VERSION, false); } Bw_assets::addScript('bw-unveil-master', 'assets/js/vendors/jquery.unveil-master/jquery.unveil.min.js'); Bw_assets::addScript('bw-owl-transitions', 'assets/js/vendors/jquery.owl.slider/owl.carousel.js'); Bw_assets::addScript('bw-magnific-popup-js', 'assets/js/vendors/jquery.magnific-popup/jquery.magnific-popup.min.js'); Bw_assets::addScript('bw-hover-intent', 'assets/js/vendors/jquery.hover-intent/jquery.hover-intent.min.js'); Bw_assets::addScript('bw-masonry', 'assets/js/vendors/jquery.masonry/isotope.pkgd.min.js'); Bw_assets::addScript('bw-tween-max', 'assets/js/vendors/tween-max/tweenmax.min.js'); Bw_assets::addScript('bw-main', 'assets/js/main.js', array('jquery')); }
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Posts', BW_THEME) : $instance['title'], $instance, $this->id_base); if (empty($instance['number']) || !($number = absint($instance['number']))) { $number = 10; } $r = new WP_Query(apply_filters('widget_posts_args', array('posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true))); if ($r->have_posts()) { echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } ?> <ul class="bw-sidebar-posts"> <?php while ($r->have_posts()) { $r->the_post(); ?> <li class="<?php if (!has_post_thumbnail()) { echo 'auto'; } ?> "> <?php if (has_post_thumbnail()) { ?> <div class="thumb"> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "> <?php if (Bw::get_option('enable_lazy_image')) { ?> <img class="lazy" data-src="<?php echo Bw::get_image_src('thumbnail'); ?> " src="<?php echo Bw::empty_img(); ?> " alt="" > <?php } else { ?> <img src="<?php echo Bw::get_image_src('thumbnail'); ?> " alt="" > <?php } ?> </a> </div> <?php } ?> <div class="cont <?php if (!has_post_thumbnail()) { echo ' no-thumb'; } ?> "> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "> <?php the_title(); ?> </a> <p><?php echo Bw::truncate(get_the_excerpt(), 6); ?> </p> </div> </li> <?php } ?> </ul> <?php echo $after_widget; wp_reset_postdata(); } }
<?php get_search_form(); ?> </div> <?php } ?> </div> </div> <div class="row-holder <?php echo Bw::get_option('sticky_header') ? 'enable-sticky' : ''; ?> <?php echo Bw::get_option('invert_header_nav_color') ? 'invert' : ''; ?> "> <div class="row for-sub-header"> <nav id="navigation"> <?php Bw_megamenu::main_nav(); ?> </nav> <!-- social icons --> <?php Bw::go_social(); ?> </div> </div>
static function go_social() { // mono social icons unicode $unicode = array("aboutme" => "", "aol" => "", "amazon" => "", "apple" => "", "appstore" => "", "bebo" => "", "behance" => "", "bing" => "", "blogger" => "", "dribble" => "", "delicious" => "", "diggalt" => "", "ebay" => "", "email" => "", "facebook" => "", "googleplus" => "", "pinterest" => "", "instagram" => "", "linkedin" => "", "skype" => "", "tumblr" => "", "github" => "", "flickr" => "", "foodspotting" => "", "googlebuzz" => "", "gowallapin" => "", "grooveshark" => "", "heart" => "", "icq" => "", "imessage" => "", "itunes" => "", "lastfm" => "", "mobileme" => "", "myspace" => "", "picasa" => "", "soundcloud" => "", "star" => "", "twitter" => "", "vimeo" => "", "wordpress" => "", "yahoo" => "", "youtube" => "", "fivehundredpx" => ""); $social_icons = Bw::get_option('social_icons'); if (is_array($social_icons)) { $output = '<ul class="social">'; foreach ($social_icons as $media) { $output .= '<li><a href="' . $media['social_url'] . '" target="_blank" title="' . $media['title'] . '"><span class="icon">' . $unicode[$media['social_media']] . '</span></a></li>'; } $output .= '</ul>'; echo $output; } }
<div id="mobile-menu"> <?php if (Bw::get_option('mobile_nav_search')) { ?> <div class="field"> <?php get_search_form(); ?> </div> <?php } ?> <div class="field"> <?php wp_nav_menu(array('theme_location' => 'primary')); ?> </div> <div class="field"> <?php wp_nav_menu(array('theme_location' => 'top_left')); ?> </div> <div class="field"> <?php wp_nav_menu(array('theme_location' => 'top_right')); ?> </div>
public function query_by_id($time, $instance) { global $wpdb; global $post; $limit = (int) $instance['max_posts'] > 0 && (int) $instance['max_posts'] <= 10 ? (int) $instance['max_posts'] : 5; //$categories = unserialize( $instance['category'] ); //$joined_categories = is_array( $categories ) ? join( ',', $categories ) : null; if ($time !== 'bw-all-time' && $time > 0) { $joins = "\r\n\t\t\t\tLEFT JOIN {$wpdb->term_relationships} ON({$wpdb->posts}.ID = {$wpdb->term_relationships}.object_id)\r\n\t\t\t\tLEFT JOIN {$wpdb->term_taxonomy} ON({$wpdb->term_relationships}.term_taxonomy_id = {$wpdb->term_taxonomy}.term_taxonomy_id)\r\n\t\t\t\tLEFT JOIN {$wpdb->terms} ON({$wpdb->term_taxonomy}.term_id = {$wpdb->terms}.term_id)\r\n\t\t\t"; $where = "\r\n\t\t\t\tAND {$wpdb->term_taxonomy}.taxonomy = 'category'\r\n\t\t\t\tAND {$wpdb->terms}.term_id = '" . $time . "'\r\n\t\t\t"; } else { $joins = ''; $where = ''; } $querystr = "\r\n\t\t\t\r\n\t\t\tSELECT *, CAST({$wpdb->posts}.post_date AS DATE) as bw_date\r\n\t\t\tFROM {$wpdb->posts}\r\n\t\t\tLEFT JOIN {$wpdb->postmeta} ON({$wpdb->posts}.ID = {$wpdb->postmeta}.post_id)\r\n\t\t\t\t\r\n\t\t\t\t" . $joins . "\r\n\t\t\t\r\n\t\t\tWHERE {$wpdb->postmeta}.meta_key = 'post_views_count'\r\n\t\t\tAND {$wpdb->posts}.post_status = 'publish'\r\n\t\t\tAND {$wpdb->posts}.post_date < NOW()\r\n\t\t\tAND {$wpdb->posts}.post_type = 'post'\r\n\t\t\t\t\r\n\t\t\t\t" . $where . "\r\n\t\t\t\r\n\t\t\tORDER BY bw_date desc, {$wpdb->postmeta}.meta_value+0 desc\r\n\t\t\t\r\n\t\t\tLIMIT " . $limit . "\r\n\t\t\t\r\n\t\t"; $pageposts = $wpdb->get_results($querystr, object); $c = 1; echo '<ul class="bw-sidebar-posts ' . trim($time) . '">'; foreach ($pageposts as $post) { setup_postdata($post); ?> <li> <!--div class="position"> <?php echo sprintf("%02d", $c); ?> </div--> <?php if (has_post_thumbnail()) { ?> <div class="thumb"> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "> <?php if (Bw::get_option('enable_lazy_image')) { ?> <img class="lazy" data-src="<?php echo Bw::get_image_src('thumbnail'); ?> " src="<?php echo Bw::empty_img(); ?> " alt="" > <?php } else { ?> <img src="<?php echo Bw::get_image_src('thumbnail'); ?> " alt="" > <?php } ?> </a> </div> <?php } ?> <div class="cont <?php if (!has_post_thumbnail()) { echo ' no-thumb'; } ?> "> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "> <?php the_title(); ?> </a> <p><?php echo Bw::truncate(get_the_excerpt(), 7); ?> </p> </div> </li><?php $c++; } wp_reset_postdata(); echo '</ul>'; }
"> <?php if (have_posts()) { ?> <div class="heading"> <h1 class="page-title"> <?php echo __('Looking for: ', BW_THEME) . get_search_query(); ?> </h1> </div> <?php $layout = Bw::get_option('blog_layout') ? Bw::get_option('blog_layout') : 'list'; ?> <div class="posts-<?php echo $layout; ?> -holder"> <div class="posts-<?php echo $layout; ?> bw-over"> <?php while (have_posts()) { the_post(); ?>
while (have_posts()) { the_post(); ?> <?php get_template_part('templates/content/content-page'); ?> <?php if (Bw::get_option('comment_type_page') == 'facebook') { ?> <?php get_template_part('templates/comments/facebook'); ?> <?php } elseif (Bw::get_option('comment_type_page') == 'wp_comments') { ?> <?php if (comments_open() || '0' != get_comments_number()) { comments_template(); } ?> <?php } else { ?> <!-- comments are disabled --> <?php } ?> <?php
<?php $post_args = array('numberposts' => 15, 'offset' => 0, 'post_type' => 'post', 'post_status' => 'publish', 'category' => get_query_var('cat')); $post_args['meta_query'] = array(array('key' => 'bw_category_slider', 'value' => '1'), array('key' => '_thumbnail_id', 'compare' => 'EXISTS')); $slideposts = get_posts($post_args); $effect = Bw::get_option('category_slider_effect'); $autoplay = Bw::get_option('category_slider_autoplay'); if (count($slideposts)) { ?> <div class="bw-slider-holder"> <div class="category-slider-loader"> <div class="category-slider bw-slider <?php echo $autoplay ? 'auto-play' : ''; ?> " data-speed="3000" data-transition="<?php echo !$effect ? 'slide' : $effect; ?> "> <?php foreach ($slideposts as $post) { setup_postdata($post); $thumb_img = Bw::get_image_src('bw_700x450'); if (!empty($thumb_img)) { ?> <article class="item"> <div class="article-thumb"> <img src="<?php echo $thumb_img; ?>
$author_list = array('url', 'facebook', 'twitter', 'google_plus'); foreach ($author_list as $author_item) { if (get_the_author_meta($author_item, $author_id)) { echo '<li><a href="' . get_the_author_meta($author_item, $author_id) . '" target="_blank">' . __(Bw::humanize($author_item == 'url' ? 'Website' : $author_item), BW_THEME) . '</a></li>'; } } ?> </ul> </div> </div> <?php } ?> <?php if (is_single() && Bw::get_option('display_also_like')) { ?> <?php get_template_part('templates/related-articles'); ?> <?php } ?> <?php wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', BW_THEME), 'after' => '</div>')); ?> </article> <!-- // article -->
?> "> <?php /** * Wordpress Head. This is REQUIRED! Never remove the wp_head */ wp_head(); ?> </head> <?php $extra_classes = (get_field('enable_parallax_header') and is_single()) ? ' h-parallax' : ''; $extra_classes .= wp_is_mobile() ? ' bw-is-mobile' : ''; $extra_classes .= (Bw::get_option('boxed_layout') and !get_field('enable_parallax_header')) ? ' boxed' : ''; ?> <body <?php body_class(Bw::body_class($extra_classes)); ?> > <div id="bw-bg"></div> <?php get_template_part('templates/mobile-menu'); ?> <div id="wrapper">
<?php get_template_part('templates/content/content', str_replace('bw_', '', get_post_type())); ?> <?php Bw::post_nav(); ?> <?php if (Bw::get_option('comment_type_blog') == 'facebook') { ?> <?php get_template_part('templates/comments/facebook'); ?> <?php } elseif (Bw::get_option('comment_type_blog') == 'none') { ?> <!-- comments are disabled --> <?php } else { ?> <?php if (comments_open() || '0' != get_comments_number()) { comments_template(); } ?> <?php } ?> <?php
<?php if (get_field('enable_parallax_header') and is_single()) { ?> <?php $img_obj = get_field('parallax_image'); ?> <div class="header-parallax" style="background:#dcdcdc url('<?php echo $img_obj['url']; ?> ') no-repeat center 0;background-attachment:fixed;"> <div class="row"> <div class="parallax-title"> <span class="date bl"> <?php if (Bw::get_option('display_blog_author')) { ?> <strong><?php the_author_posts_link(); ?> </strong> <?php echo __('on', BW_THEME); ?> <?php } ?> <?php the_date(); ?> </span>
<?php if (has_post_thumbnail()) { $thumbsize = 'bw_350x300'; // grab the desired thumb size from the query params if present global $wp_query; if (isset($wp_query->query_vars['thumbnail_size'])) { $thumbsize = $wp_query->query_vars['thumbnail_size']; } ?> <div class="image-hide"> <div class="image-wrap"> <?php if (Bw::get_option('enable_lazy_image')) { ?> <img class="lazy" data-src="<?php echo Bw::get_image_src($thumbsize); ?> " src="<?php echo Bw::empty_img(); ?> " alt="<?php the_title(); ?> " > <?php } else { ?> <img src="<?php
<?php $post_type = get_post_type(); $share_buttons_types = Bw::get_option('share_buttons_settings'); if (Bw::get_option('share_links_' . $post_type) and $share_buttons_types) { ?> <div id="bw-share"> <div class="bw-share-content"> <!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <?php $share_buttons_types = preg_replace('/\\s+/', '', $share_buttons_types); $buttons = explode(',', $share_buttons_types); $preferred_count = 0; $display_share_buttons = ''; if (!empty($buttons)) { for ($k = 0; $k < count($buttons); $k++) { switch ($buttons[$k]) { case 'preferred': $preferred_count++; $display_share_buttons .= '<a class="addthis_button_' . $buttons[$k] . '_' . $preferred_count . '"></a>'; break; case 'more': $display_share_buttons .= '<a class="addthis_button_compact"></a>'; break; case 'counter': $display_share_buttons .= '<a class="addthis_counter addthis_bubble_style"></a>'; break; default: $display_share_buttons .= '<a class="addthis_button_' . $buttons[$k] . '"></a>';
_e('Audios', BW_THEME); } elseif (is_tax('post_format', 'post-format-chat')) { _e('Chats', BW_THEME); } else { _e('Archives', BW_THEME); } ?> </h1> </div> <?php if (have_posts()) { ?> <?php $layout = Bw::get_option('blog_layout') ? Bw::get_option('blog_layout') : 'grid'; ?> <?php // overwrite the blog layout from category layout options if (is_object(get_queried_object()) and !empty(get_queried_object()->term_id)) { $term = get_term(get_queried_object()->term_id, 'category'); $cat_layout = get_field('category_layout', $term); if ($cat_layout == 'grid' or $cat_layout == 'list') { $layout = $cat_layout; } } ?> <div class="posts-<?php echo $layout;