function woocommerce_output_related_products() { if (($ppp = max(3, get_custom_option('post_related_count'))) > 0) { woocommerce_related_products($ppp, 3); } }
function sc_clear_around($content) { $content = str_replace("\r\n", "\n", $content); //$content = preg_replace("/\](\s|\n)*\[/", "][", $content); $content = get_custom_option('clear_shortcodes') == 'no' ? preg_replace("/\\](\\s|\n)*\\[/", "][", $content) : preg_replace(array("/\\](\\s|\n|<p>|<\\/p>|<br>|<br\\/>|<br \\/>)+/", "/(\\s|\n|<p>|<\\/p>|<br>|<br\\/>|<br \\/>)+\\[/"), array("] ", " ["), $content); return $content; }
function trex_related_poducts_args($args) { $show_sidebar_main = in_array(get_custom_option('show_sidebar_main'), array('left', 'right')) ? true : false; if ($show_sidebar_main) { $args['posts_per_page'] = 3; } else { $args['posts_per_page'] = 3; } $args['columns'] = 3; return $args; }
/** * How to display the widget on the screen. */ function widget($args, $instance) { extract($args); /* Our variables from the widget settings. */ $title = apply_filters('widget_title', isset($instance['title']) ? $instance['title'] : ''); $advert_image = isset($instance['advert_image']) ? $instance['advert_image'] : ''; $advert_link = isset($instance['advert_link']) ? $instance['advert_link'] : ''; $advert_code = isset($instance['advert_code']) ? $instance['advert_code'] : ''; /* Before widget (defined by themes). */ echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } ?> <div class="widget_advert_inner"> <?php if ($advert_image != '') { echo ($advert_link != '' ? '<a href="' . $advert_link . '" class="image_wrapper">' : '') . '<img src="' . $advert_image . '" border="0" alt="' . $title . '" />' . ($advert_link != '' ? '</a>' : ''); } if ($advert_code != '') { if (get_custom_option('substitute_gallery') == 'yes') { $advert_code = substituteGallery($advert_code, 0, 275, 200); } $advert_code = do_shortcode($advert_code); if (get_custom_option('substitute_video') == 'yes') { $advert_code = substituteVideo($advert_code, 275, 200); } if (get_custom_option('substitute_audio') == 'yes') { $advert_code = substituteAudio($advert_code); } echo $advert_code; } ?> </div> <?php /* After widget (defined by themes). */ echo $after_widget; }
function getPostShare($arg, $post_data) { $side_bar = get_custom_option('show_sidebar_main'); if (sc_param_is_on(get_custom_option('show_post_info', null, $post_data['post_id'])) && !is_single()) { $array_info = explode(',', $arg); $array_list = array(); if ($side_bar != "wide") { $array_list['views'] = '<div class="postSpan postViews"><span class="icon icon-eye"></span><a href="' . $post_data['post_link'] . '" class="revInfo">' . $post_data['post_views'] . '</a></div>'; $array_list['likes'] = '<div class="postSpan postLikes likeButton like" data-postid="' . $post_data['post_id'] . '" data-likes="' . $post_data['post_likes'] . '"><span class="icon icon-heart"></span><a href="" class="revInfo">' . $post_data['post_likes'] . '</a></div>'; $array_list['more'] = $post_data['post_link'] ? '<div class="postSpan postMore"><span class="icon icon-link"></span><a href="' . $post_data['post_link'] . '" class="revInfo">' . __('More ', 'themerex') . '</a></div>' : ''; //review if ($post_data['post_reviews_author'] && sc_param_is_on(get_custom_option('show_reviews', null, $post_data['post_id']))) { $avg_author = $post_data['post_reviews_' . (get_theme_option('reviews_first') == 'author' ? 'author' : 'users')]; $rating_max = get_custom_option('reviews_max_level'); $array_list['reviews'] = '<div class="postSpan postReview" title="' . sprintf(__('Rating - %s/%s', 'themerex'), $avg_author, $rating_max) . '"><span class="icon icon-star"></span><a href="' . $post_data['post_link'] . '" class="revInfo">' . getReviewsSummaryStarsSharing($avg_author, false, false) . '</a></div>'; } } $array_list['comments'] = '<div class="postSpan postComment"><span class="icon icon-post"></span><a href="' . $post_data['post_comments_link'] . '" class="revInfo">' . $post_data['post_comments'] . ($side_bar == 'wide' ? ' comments' : '') . '</a></div>'; $post_share = showShareButtons(array("post_id" => $post_data["post_id"], "post_link" => $post_data["post_link"], "post_title" => $post_data["post_title"], "post_descr" => strip_tags($post_data["post_excerpt"]), "post_thumb" => $post_data["post_attachment"], "style" => "drop", "echo" => false)); if ($side_bar != "wide") { $array_list['share'] = '<div class="postSpan postShare share"><span class="icon icon-share"></span><a class="revInfo shareDrop" href="#">' . __('Share ', 'themerex') . '</a>' . $post_share . '</div>'; } else { $array_list['share'] = '<div class="postSpan postShare share">' . $post_share . '</div>'; } $post_info_html = ''; foreach ($array_info as $array_infos) { foreach ($array_list as $k => $val) { if ($k == $array_infos) { $post_info_html .= $val; } } } if ($post_info_html != '') { return '<div class="postSharing hoverUnderline">' . $post_info_html . '</div>'; } else { return ''; } } }
function marksToDisplay($marks) { $maxLevel = max(5, (int) get_custom_option('reviews_max_level')); if ($maxLevel == 100) { return $marks; } $m = explode(',', $marks); $kol = count($m); for ($i = 0; $i < $kol; $i++) { $m[$i] = round($m[$i] / 100 * $maxLevel, 1); } return implode(',', $m); }
<?php /* Template Name: Attachment page */ get_header(); $counters = get_theme_option("blog_counters"); $blog_style = 'fullpost'; //get_custom_option('blog_style'); while (have_posts()) { the_post(); // Move setPostViews to the javascript - counter will work under cache system if (get_theme_option('use_ajax_views_counter') == 'no') { setPostViews(get_the_ID()); } showPostLayout(array('layout' => 'attachment', 'thumb_size' => $blog_style, 'sidebar' => !in_array(get_custom_option('show_sidebar_main'), array('none', 'fullwidth')), 'categories_list' => false, 'tags_list' => false)); } get_footer();
function showShareButtons($post_data) { if (get_custom_option('show_share') == 'yes') { $socials = get_theme_option('share_buttons'); $arr = explode(',', $socials); $list = array(); foreach ($arr as $s) { if (empty($s)) { continue; } $s = explode('|', $s); //if (count($s)!=3 || empty($s[0])) continue; if (count($s) != 3) { continue; } $list[$s[2]] = array('url' => $s[0]); } if (count($list) > 0) { ?> <div class="post_info post_info_bottom theme_text"> <?php showShareSocialLinks(array('post_id' => $post_data['post_id'], 'post_link' => $post_data['post_link'], 'post_title' => $post_data['post_title'], 'post_descr' => $post_data['post_descr'], 'post_thumb' => $post_data['post_thumb'], 'caption' => get_theme_option('share_caption'), 'share' => $list, 'counters' => get_theme_option('show_share_counters') == 'yes', 'direction' => get_custom_option('body_style') == 'fullwidth' ? 'horizontal' : get_theme_option('share_direction'))); ?> </div> <?php } } }
echo $post_data['post_categories_links']; ?> </span> <?php } ?> </div> </div> </div> </article> <?php } else { $dir = themerex_strtoproper(get_custom_option('hover_style', null, $post_data['post_id'])); ?> <article class="isotopeElement <?php echo 'post_format_' . $post_data['post_format'] . 'hover_' . $dir . ($dir == 'Book' ? ' bookShowWrap' : '') . ($opt['number'] % 2 == 0 ? ' even' : ' odd') . ($opt['number'] == 0 ? ' first' : '') . ($opt['number'] == $opt['posts_on_page'] ? ' last' : '') . ($opt['add_view_more'] ? ' viewmore' : '') . (get_custom_option('show_filters') == 'yes' ? ' flt_' . join(' flt_', get_custom_option('filter_taxonomy') == 'categories' ? $post_data['post_categories_ids'] : $post_data['post_tags_ids']) : ''); ?> "> <div class="hover hover<?php echo $dir; ?> Show"> <?php if ($post_data['post_thumb']) { ?> <div class="thumb"><?php echo $post_data['post_thumb']; ?> </div> <?php } else {
} } } $args = addSortOrderInQuery($args); query_posts($args); $wp_query_need_restore = true; } $per_page = count($wp_query->posts); $post_number = 0; /* global $more; $oldmore = $more; $more = 0; */ $addViewMoreClass = false; $parent_cat_id = (int) get_custom_option('category_id'); while (have_posts()) { the_post(); require get_template_directory() . '/template-blog-loop.php'; } // $more = $oldmore; if (!$post_number) { if (is_404()) { require get_template_directory() . '/template-blog-404.php'; } else { if (is_search()) { require get_template_directory() . '/template-blog-no-search-results.php'; } else { require get_template_directory() . '/template-blog-no-articles.php'; } }
<div class="article_wrap"> <?php if (!in_array($post_data['post_format'], array('chat', 'link', 'status', 'quote'))) { ?> <header class="post_info infoPost"> <?php $excerpt_length = get_custom_option('post_excerpt_maxlength'); /* Reviews */ $review_type = get_custom_option('reviews_first'); $review_avg = $post_data['post_reviews_' . $review_type]; $review_first = get_custom_option('reviews_first'); $review_max = get_custom_option('reviews_max_level', '', $post_data['post_id']); $review_style = get_custom_option('reviews_style', '', $post_data['post_id']); $review_color = get_custom_option('review_color', '', $post_data['post_id']); if (!empty($review_avg) && !strpos($review_style, 'stars') !== false) { echo get_review_rating($review_style, $review_avg, $review_max, $review_color); } /* /Reviews */ if ($show_title) { ?> <h2 class="post_title"><a href="<?php echo $post_data['post_link']; ?> "><?php echo $post_data['post_title']; ?> </a></h2> <?php if (!empty($review_avg) && strpos($review_style, 'stars') !== false) {
?> <?php if (get_custom_option('show_post_counters') == 'yes') { ?> <div class="postSharing"> <?php $postinfo_buttons = array('comments', 'views', 'likes', 'share', 'markup'); require themerex_get_file_dir('/templates/page-part-postinfo.php'); ?> </div> <?php } ?> <?php if (get_custom_option('show_post_tags') == 'yes' && $post_data['post_tags_links'] != '') { ?> <div class="post_tags"> <?php _e('Tags:', 'themerex'); ?> <?php echo balanceTags($post_data['post_tags_links']); ?> </div> <?php } ?> </div> <?php
} } } ?> </div> </div> <?php } ?> <?php if (get_custom_option('googlemap_show') == 'yes') { $map_display = get_custom_option('googlemap_display'); $map_height = get_custom_option('googlemap_height'); $map_address = get_custom_option('googlemap_address'); $map_latlng = get_custom_option('googlemap_latlng'); if (!empty($map_address) || !empty($map_latlng)) { ?> <div id="main_map" class="main_map_<?php echo $map_display; ?> "> <div id="main_map_inner"> <?php echo do_shortcode("[googlemap " . (!empty($map_latlng) ? "latlng='{$map_latlng}'" : "address='{$map_address}'") . " zoom='" . get_custom_option('googlemap_zoom') . "' width='100%' height='{$map_height}']"); ?> </div> </div> <?php } }
?> /images/slider/slide3_2.png" data-rsw="707" data-rsh="471"> </div> </div> <?php } else { if ($slider == 'flex' || $slider == 'swiper') { $slider_cat = get_custom_option("slider_category"); $slider_orderby = get_custom_option("slider_orderby"); $slider_order = get_custom_option("slider_order"); $slider_count = $slider_ids = get_custom_option("slider_posts"); if (themerex_strpos($slider_ids, ',') !== false) { $slider_count = 0; } else { $slider_ids = ''; if (empty($slider_count)) { $slider_count = 3; } } $slider_info_box = get_custom_option("slider_info_box"); $slider_info_fixed = get_custom_option("slider_info_fixed"); if ($slider_count > 0 || !empty($slider_ids)) { echo do_shortcode('[slider engine="' . $slider . '" controls="0"' . ($slider_cat ? ' cat="' . $slider_cat . '"' : '') . ($slider_ids ? ' ids="' . $slider_ids . '"' : '') . ($slider_count ? ' count="' . $slider_count . '"' : '') . ($slider_orderby ? ' orderby="' . $slider_orderby . '"' : '') . ($slider_order ? ' order="' . $slider_order . '"' : '') . ' titles="' . ($slider_info_box == 'yes' ? $slider_info_fixed == 'yes' ? 2 : 1 : 0) . '"' . ']'); } } } ?> </div> <?php }
<?php $post_title_tag = $opt['style'] == 'list' ? 'li' : 'h4'; $reviewsBlock = ''; if (!in_array($opt['style'], array('accordion_1', 'accordion_2', 'accordion_3', 'list')) && $opt['reviews'] && get_custom_option('show_reviews', null, $post_data['post_id']) == 'yes') { $avg_author = $post_data['post_reviews_' . (get_theme_option('reviews_first') == 'author' ? 'author' : 'users')]; if ($avg_author > 0) { $reviewsBlock .= '<div class="reviews_summary blog_reviews">' . '<div class="criteria_summary criteria_row">' . getReviewsSummaryStars($avg_author) . '</div>' . '</div>'; } } $title = '<' . $post_title_tag . ' class="sc_blogger_title sc_title' . (in_array($opt['style'], array('accordion_1', 'accordion_2', 'accordion_3')) ? ' sc_toggl_title' : '') . '">' . (in_array($opt['style'], array('accordion_1', 'accordion_2', 'accordion_3')) ? '' : '<a href="' . $post_data['post_link'] . '">') . $post_data['post_title'] . (in_array($opt['style'], array('accordion_1', 'accordion_2', 'accordion_3')) ? '' : '</a>') . '</' . $post_title_tag . '>'; $thumb = $post_data['post_thumb'] && themerex_strpos($opt['style'], 'image') !== false ? '<div class="thumb">' . ($post_data['post_link'] != '' ? '<a href="' . $post_data['post_link'] . '">' . $post_data['post_thumb'] . '</a>' : $post_data['post_thumb']) . '</div>' : ''; $info = sc_param_is_on($opt['info']) ? '<div class="sc_blogger_info">' . (themerex_strpos($opt['style'], 'image') !== false || themerex_strpos($opt['style'], 'accordion') !== false ? '<div class="sc_blogger_author">' . __('Posted by', 'themerex') : __('by', 'themerex')) . ' <a href="' . $post_data['post_author_url'] . '" class="post_author">' . $post_data['post_author'] . '</a>' . ($opt['counters'] != 'none' ? ' <span class="separator">|</span> ' . ($opt['orderby'] == 'comments' || $opt['counters'] == 'comments' ? __('Comments', 'themerex') : __('Views', 'themerex')) . ' <span class="comments_number">' . ($opt['orderby'] == 'comments' || $opt['counters'] == 'comments' ? $post_data['post_comments'] : $post_data['post_views']) . '</span>' : '') . (themerex_strpos($opt['style'], 'image') !== false || themerex_strpos($opt['style'], 'accordion') !== false ? '</div>' . do_shortcode('[trx_button link="' . $post_data['post_link'] . '" skin="regular" size="mini"]' . ($opt['readmore'] ? $opt['readmore'] : __('More', 'themerex')) . '[/trx_button]') : '') . '</div>' : ''; if ($opt['style'] == 'list') { echo balanceTags($title); } else { if ($opt['dir'] == 'horizontal') { ?> <div class="sc_columns_item column_item_<?php echo esc_attr($opt['number']); echo ($opt['number'] % 2 == 1 ? ' odd' : ' even') . ($opt['number'] == 1 ? ' first' : '') . ($opt['number'] == $opt['posts_on_page'] ? ' last' : '') . (sc_param_is_on($opt['scroll']) ? ' sc_scroll_slide swiper-slide' : ''); ?> "> <?php } ?> <article class="sc_blogger_item <?php echo (in_array($opt['style'], array('accordion_1', 'accordion_2', 'accordion_3')) ? ' sc_toggl_item' : '') . ($opt['number'] == $opt['posts_on_page'] ? ' sc_blogger_item_last' : '') . (sc_param_is_on($opt['scroll']) && ($opt['dir'] == 'vertical' || $opt['style'] == 'date') ? ' sc_scroll_slide swiper-slide' : ''); ?> ">
</h1> <?php } require themerex_get_file_dir('/templates/page-part-reviews-block.php'); startWrapper('<div class="post_text_area" itemprop="' . ($avg_author > 0 || $avg_users > 0 ? 'reviewBody' : 'articleBody') . '">'); // Post content if ($post_data['post_protected']) { echo $post_data['post_excerpt']; } else { echo sc_gap_wrapper($post_data['post_content']); wp_link_pages(array('before' => '<div class="nav_pages_parts"><span class="pages">' . __('Pages:', 'themerex') . '</span>', 'after' => '</div>', 'link_before' => '<span class="page_num">', 'link_after' => '</span>')); if (get_custom_option('show_post_info') == 'yes') { ?> <div class="itemInfo"> <?php if (get_custom_option('show_post_counters') == 'yes') { ?> <div class="postSharing"> <?php $postinfo_buttons = array('comments', 'views', 'likes', 'share', 'rating'); require themerex_get_file_dir('/templates/page-part-postinfo.php'); ?> </div> <?php } ?> <div class="post_info infoPost"> <?php _e('Posted ', 'themerex'); ?> <a href="<?php
var THEMEREX_userLoggedIn = <?php echo is_user_logged_in() ? 'true' : 'false'; ?> ; // Show table of content for the current page var THEMEREX_menu_toc = '<?php echo get_custom_option('menu_toc'); ?> '; var THEMEREX_menu_toc_home = THEMEREX_menu_toc!='no' && <?php echo get_custom_option('menu_toc_home') == 'yes' ? 'true' : 'false'; ?> ; var THEMEREX_menu_toc_top = THEMEREX_menu_toc!='no' && <?php echo get_custom_option('menu_toc_top') == 'yes' ? 'true' : 'false'; ?> ; // Fix main menu var THEMEREX_menuFixed = <?php echo get_theme_option('menu_position') == 'fixed' ? 'true' : 'false'; ?> ; // Use responsive version for main menu var THEMEREX_menuResponsive = <?php echo max(0, (int) get_theme_option('menu_responsive')); ?> ; var THEMEREX_responsive_menu_click = <?php
} ?> <!-- <a href="#" class="scrollToTop icon-up-open-big" title="<?php _e('Back to top', 'themerex'); ?> "></a> --> </div> <div class="customHtmlSection"> <?php echo get_custom_option('custom_code'); ?> </div> <?php echo get_custom_option('gtm_code2'); ?> <script src="<?php echo get_stylesheet_directory_uri(); ?> /scripts/lib/unslider.min.js"></script> <script src="<?php echo get_stylesheet_directory_uri(); ?> /scripts/scripts.js"></script> <?php wp_footer(); ?> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
function prepareThemeCustomStyles() { // Custom fonts if (get_custom_option('typography_custom') == 'yes') { $s = ''; $fonts = getThemeFontsList(false); $fname = get_custom_option('typography_p_font'); if (isset($fonts[$fname])) { $fstyle = explode(',', get_custom_option('typography_p_style')); $fname2 = ($pos = themerex_strpos($fname, ' (')) !== false ? themerex_substr($fname, 0, $pos) : $fname; $i = in_array('i', $fstyle); $u = in_array('u', $fstyle); $c = get_custom_option('typography_p_color'); $s .= "\n\t\t\t\tbody, button, input, select, textarea {\n\t\t\t\t\tfont-family: '" . $fname2 . "'" . (isset($fonts[$fname]['family']) ? ", " . $fonts[$fname]['family'] : '') . ";\n\t\t\t\t}\n\t\t\t\tbody {\n\t\t\t\t\tfont-size: " . get_custom_option('typography_p_size') . "px;\n\t\t\t\t\tfont-weight: " . get_custom_option('typography_p_weight') . ";\n\t\t\t\t\tline-height: " . get_custom_option('typography_p_lineheight') . "px;\n\t\t\t\t\t" . ($c ? "color: " . $c . ";" : '') . "\n\t\t\t\t\t" . ($i ? "font-style: italic;" : '') . "\n\t\t\t\t\t" . ($u ? "text-decoration: underline;" : '') . "\n\t\t\t\t}\n\t\t\t"; } for ($h = 1; $h <= 6; $h++) { $fname = get_custom_option('typography_h' . $h . '_font'); if (isset($fonts[$fname])) { $fstyle = explode(',', get_custom_option('typography_h' . $h . '_style')); $fname2 = ($pos = themerex_strpos($fname, ' (')) !== false ? themerex_substr($fname, 0, $pos) : $fname; $i = in_array('i', $fstyle); $u = in_array('u', $fstyle); $c = get_custom_option('typography_h' . $h . '_color'); $s .= "\n\t\t\t\t\th" . $h . ", .h" . $h . " {\n\t\t\t\t\t\tfont-family: '" . $fname2 . "'" . (isset($fonts[$fname]['family']) ? ", " . $fonts[$fname]['family'] : '') . ";\n\t\t\t\t\t\tfont-size: " . get_custom_option('typography_h' . $h . '_size') . "px;\n\t\t\t\t\t\tfont-weight: " . get_custom_option('typography_h' . $h . '_weight') . ";\n\t\t\t\t\t\tline-height: " . get_custom_option('typography_h' . $h . '_lineheight') . "px;\n\t\t\t\t\t\t" . ($c ? "color: " . $c . ";" : '') . "\n\t\t\t\t\t\t" . ($i ? "font-style: italic;" : '') . "\n\t\t\t\t\t\t" . ($u ? "text-decoration: underline;" : '') . "\n\t\t\t\t\t}\n\t\t\t\t\th" . $h . " a, .h" . $h . " a {\n\t\t\t\t\t\t" . ($c ? "color: " . $c . ";" : '') . "\n\t\t\t\t\t}\n\t\t\t\t"; } } if (!empty($s)) { addThemeCustomStyle($s); } } // Submenu width $menu_width = (int) get_theme_option('menu_width'); if ($menu_width > 50) { addThemeCustomStyle("\n\t\t\t.topWrap .topMenuStyleLine > ul > li ul {\n\t\t\t\twidth: {$menu_width}px;\n\t\t\t}\n\t\t\t.topWrap .topMenuStyleLine > ul > li ul li ul {\n\t\t\t\tleft: " . ($menu_width + 31) . "px;\n\t\t\t}\n\t\t\t.menu_right .topWrap .topMenuStyleLine ul.submenu_left {\n\t\t\t\tleft: -" . ($menu_width + 91) . "px !important;\n\t\t\t}\n\t\t\tul#mainmenu .menu-panel ul.columns > li ul {\n\t\t\t\tmax-width: " . $menu_width . "px;\n\t\t\t}\n\n\t\t"); } // Logo height $logo_height = (int) get_custom_option('logo_height'); $logo_offset = (int) get_custom_option('logo_offset'); if ($logo_height > 10) { if (empty($logo_offset)) { $logo_offset = max(20, round((100 - $logo_height) / 2)); } $add = max(0, round(($logo_offset * 2 + $logo_height - 100) / 2)); addThemeCustomStyle("\n\t\t\theader.noFixMenu .topWrap .logo {\n\t\t\t\theight: " . $logo_height . "px;\n\t\t\t}\n\t\t\theader.noFixMenu .topWrap .logo img {\n\t\t\t\theight: " . $logo_height . "px;\n\t\t\t}\n\t\t\theader.noFixMenu .topWrap .logo .logo_text {\n\t\t\t\tline-height: " . $logo_height . "px;\n\t\t\t}\n\t\t\theader.noFixMenu.menu_right .topWrap .openRightMenu,\n\t\t\theader.noFixMenu.menu_right .topWrap .search {\n\t\t\t\tmargin-top: " . (33 + $add) . "px;\n\t\t\t\tmargin-bottom: " . (37 + $add) . "px;\n\t\t\t}\n\t\t\theader.noFixMenu.menu_right .topWrap .topMenuStyleLine > ul > li {\n\t\t\t\tpadding-top: " . (30 + $add) . "px;\n\t\t\t\tpadding-bottom: " . (30 + $add) . "px;\n\t\t\t}\n\t\t\theader.noFixMenu.menu_right .topWrap .topMenuStyleLine > ul#mainmenu > li > .menu-panel,\n\t\t\theader.noFixMenu.menu_right .topWrap .topMenuStyleLine > ul > li > ul {\n\t\t\t\ttop: " . (100 + $add) . "px;\n\t\t\t}\n\t\t"); } // Logo top offset if ($logo_offset > 0) { addThemeCustomStyle("\n\t\t\theader.noFixMenu .topWrap .logo {\n\t\t\t\tpadding: " . $logo_offset . "px 0 0 0;\n\t\t\t}\n\t\t"); } $logo_height = (int) get_theme_option('logo_image_footer_height'); if ($logo_height > 10) { addThemeCustomStyle("\n\t\t\tfooter .logo img {\n\t\t\t\theight: " . $logo_height . "px;\n\t\t\t}\n\t\t"); } // Main Slider height $slider_height = (int) get_custom_option('slider_height'); if ($slider_height > 10) { addThemeCustomStyle("\n\t\t\t.sliderHomeBullets {\n\t\t\t\theight: " . $slider_height . "px;\n\t\t\t}\n\t\t"); } // Bg custom image global $bg_custom_image_style; if ($bg_custom_image_style != '' && get_custom_option('bg_custom_image_style') != '') { addThemeCustomStyle("\n\t\t\t.sc_quote_style_1,\n\t\t\t.audio_container,\n\t\t\t.topTabsWrap,\n\t\t\t.relatedPostWrap article .wrap.no_thumb,\n\t\t\t.postAside,\n\t\t\t.postStatus,\n\t\t\t.postLink,\n\t\t\t.portfolioWrap .isotopePadding,\n\t\t\t.userFooterSection.global,\n\t\t\t.sc_testimonials_style {\n\t\t\t\tbackground-image:url(" . $bg_custom_image_style . ");\n\t\t\t}\n\t\t\t.sc_testimonials_style {\n\t\t\t\tbackground-size: 100% auto;\n\t\t\t}\n\t\t"); } // Bg custom image in header global $bg_custom_image_style_header; if ($bg_custom_image_style_header != '') { addThemeCustomStyle("\n\t\t\t.userHeaderSection.global {\n\t\t\t\tbackground-image:url(" . $bg_custom_image_style_header . ");\n\t\t\t}\n\t\t"); } else { if ($bg_custom_image_style != '' && get_custom_option('bg_custom_image_style') != '') { addThemeCustomStyle("\n\t\t\t.userHeaderSection.global {\n\t\t\t\tbackground-image:url(" . $bg_custom_image_style . ");\n\t\t\t}\n\t\t"); } } // Custom css from theme options $css = get_custom_option('custom_css'); if (!empty($css)) { addThemeCustomStyle($css); } $custom_style = ''; $customizer = get_theme_option('show_theme_customizer') == 'yes'; // Theme color from customizer $clr = ''; if ($customizer) { $clr = getValueGPC('theme_color', ''); } if (empty($clr)) { $clr = get_custom_option('theme_color'); } if (!empty($clr)) { $rgb = hex2rgb($clr); $custom_style .= ' a:hover, .theme_accent, .theme_accent:before, .topTabsWrap .speedBar a:hover, .topWrap .topMenuStyleLine > ul > li ul li a:hover, .topWrap .topMenuStyleLine .current-menu-item > a, .topWrap .topMenuStyleLine .current-menu-ancestor > a, .topWrap .topMenuStyleLine > ul li a:hover, .topWrap .topMenuStyleLine > ul li.sfHover > a, .infoPost a:hover, .tabsButton ul li a:hover, .popularFiltr ul li a:hover, .isotopeFiltr ul li a:hover, .widget_popular_posts article h3:before, .widgetTabs .widget_popular_posts article .post_info .post_date a:hover, .sidebar .widget_popular_posts article .post_info .post_date a:hover, .sidebar .widget_recent_posts article .post_info .post_date a:hover, .main .widgetWrap a:hover, .main .widgetWrap a:hover span, .widgetWrap a:hover span, .roundButton:hover a, input[type="submit"]:hover, input[type="button"]:hover, .squareButton > a:hover, .nav_pages_parts > a:hover, .nav_comments > a:hover, .comments_list a.comment-edit-link:hover, .wp-calendar tbody td.today a:hover, blockquote.sc_quote_title a:hover, blockquote.sc_quote_style_1 a:hover, blockquote.sc_quote_style_2 a:hover, .postLink a, .masonry article .masonryInfo a:hover, .masonry article .masonryInfo span.infoTags a:hover, .relatedPostWrap article .relatedInfo a:hover, .relatedPostWrap article .relatedInfo span.infoTags a:hover, .infoPost span.infoTags a:hover, .page404 p a, .page404 .searchAnimation.sFocus .searchIcon, .copyWrap a, .comments .commBody li.commItem .replyWrap .posted a:hover, .comments .commBody li.commItem h4 a:hover, .ratingItem span:before, .reviewBlock .totalRating, .widget_area .contactInfo .fContact:before, .footerStyleLight .widget_area article .post_title:before, .footerStyleLight .widget_area article .post_info a:hover, .footerStyleLight .widget_area article .post_info .post_date a:hover, .sc_list_style_arrows li:before, .sc_list_style_arrows li a:hover, .sc_list_style_iconed li a:hover, .sc_accordion.sc_accordion_style_2 .sc_accordion_item.sc_active .sc_accordion_title, .sc_accordion.sc_accordion_style_2 .sc_accordion_item.sc_active .sc_accordion_title:before, .sc_toggles.sc_toggles_style_2 .sc_toggles_item.sc_active .sc_toggles_title, .sc_toggles.sc_toggles_style_2 .sc_toggles_item.sc_active .sc_toggles_title:before, .sc_tabs .sc_tabs_titles li a:hover, .sc_highlight.sc_highlight_style_2, .sc_price_item .sc_price_money, .sc_price_item .sc_price_penny, .sc_pricing_table .sc_pricing_columns ul li .sc_icon, .sc_title_icon, .sc_scroll_controls .flex-direction-nav a:hover:before, .sc_testimonials_style_1 .flex-direction-nav a:hover:before, .sc_testimonials_style_3 .flex-direction-nav a:hover:before, .sc_testimonials_style_3 .flex-direction-nav a:active:before, .pagination .pageLibrary > li.libPage > .pageFocusBlock .flex-direction-nav a:hover:before, .topWrap .usermenu_area ul.usermenu_list li.usermenu_currency > a:hover, .topWrap .usermenu_area ul.usermenu_list li.usermenu_currency.sfHover > a, .topWrap .usermenu_area ul.usermenu_list li ul li a:hover, .topWrap .usermenu_area ul.usermenu_list li.usermenu_cart .widget_area ul li a:hover, .topWrap .usermenu_area a:hover, .topWrap .usermenu_area .sfHover a, .sidemenu_wrap .usermenu_area ul.usermenu_list li.usermenu_currency > a:hover, .sidemenu_wrap .usermenu_area ul.usermenu_list li.usermenu_currency.sfHover > a, .sidemenu_wrap .usermenu_area ul.usermenu_list li ul li a:hover, .sidemenu_wrap .usermenu_area ul.usermenu_list li.usermenu_cart .widget_area ul li a:hover, .sc_blogger a:hover, .sc_blogger.style_date .load_more:before, .sc_blogger.style_accordion .sc_blogger_info .comments_number, .widgetTabs .widgetTop ul > li:not(.tabs):before, .widgetTabs .widgetTop ul > li:not(.tabs) > a:hover, .widgetTabs .widgetTop ul > li:not(.tabs) > a:hover span, .widgetTabs .widgetTop.widget_popular_posts article .post_title:before, .swpRightPos .tabsMenuBody a:hover, .swpRightPos .tabsMenuBody a:hover:before, .swpRightPos .panelmenu_area .current-menu-item > a, .swpRightPos .panelmenu_area .current-menu-ancestor > a, .swpRightPos .panelmenu_area > ul li a:hover, .swpRightPos .panelmenu_area > ul li.sfHover > a, .swpRightPos .panelmenu_area .current-menu-item.dropMenu:before, .swpRightPos .panelmenu_area .current-menu-ancestor.dropMenu:before, .swpRightPos .panelmenu_area li.liHover.dropMenu:before, .topWrap .search:not(.searchOpen):hover:before, .topWrap .search .searchSubmit:hover .icoSearch:before, .user-popUp .formItems.loginFormBody .remember .forgotPwd, .user-popUp .formItems.loginFormBody .loginProblem, .user-popUp .formItems.registerFormBody .i-agree a, .sc_slider_pagination_area .flex-control-nav.manual .slide_info .slide_title, #toc .toc_item.current .toc_icon, #toc .toc_item:hover .toc_icon, .openResponsiveMenu:hover, .openResponsiveMenu:hover:before, .sidebarStyleLight .widgetWrap ul li.liHover:before, .sidebarStyleLight .widgetWrap a:hover, .sidebarStyleLight .widgetWrap a:active, .sidebarStyleLight.widget_area .widgetWrap a:hover span, .sidebarStyleLight.widget_area .widgetWrap a:hover, .sidebarStyleLight.widget_area .widgetWrap ul > li > a:hover, .sidebarStyleLight.widget_area .widgetWrap ul > li > a:hover span, .sidebarStyleLight.widget_area ul.tabs > li.ui-state-active > a, .sidebarStyleLight .widgetWrap .tagcloud a:hover, .sidebarStyleLight .widgetWrap .tagcloud a:active, .sidebarStyleLight.widget_area a:hover, .sidebarStyleLight.widget_area a:hover span, .sidebarStyleLight.widget_area .ui-state-active a, .sidebarStyleLight.widget_area .widgetWrap ul li a:hover, .sidebarStyleLight.widget_area .widget_twitter ul li:before, .sidebarStyleLight .wp-calendar tfoot th a:before, .sidebarStyleLight.widget_area table.wp-calendar tfoot a:hover, .sidebarStyleLight.widget_area article span:before, .sidebarStyleLight.widget_area .widgetWrap ul > li.dropMenu:hover:before, .sidebarStyleLight.widget_area .widgetWrap ul > li.dropMenu.dropOpen:before, .sc_pricing_light .sc_pricing_columns:hover ul.columnsAnimate .sc_pricing_title, .sc_pricing_light .sc_pricing_columns:hover ul.columnsAnimate .sc_pricing_data > span, .sc_pricing_light .sc_pricing_columns.active ul.columnsAnimate .sc_pricing_title, .sc_pricing_light .sc_pricing_columns.active ul.columnsAnimate .sc_pricing_data > span, .postSharing > ul > li> a:before, .post .tagsWrap .post_cats a:hover, .post .tagsWrap .post_tags a:hover, .post_text_area .tagsWrap .post_cats a:hover, .post_text_area .tagsWrap .post_tags a:hover, .infoPost > span:before, .infoPost > span a:before, .comments .commBody li.commItem .replyWrap a:hover, .relatedPostWrap .no_indent_style article .wrap a:hover, .postLink a:hover, .portfolBlock ul li a:hover, .swpRightPos .searchBlock .searchSubmit:hover:before, .twitBlock .sc_slider .swiper-slide a:hover, .twitBlockWrap .twitterAuthor a:hover, .relatedPostWrap.sc_blogger article .relatedInfo a:hover, .sc_blogger.style_date .sc_blogger_item .sc_blogger_info a:hover, ul#mainmenu .menu-panel.thumb_title > li > ul > li > ul li a:before, .footerContentWrap .googlemap_button:after ' . (!function_exists('is_woocommerce') ? '' : ', .woocommerce ul.products li.product .added_to_cart, .woocommerce-page ul.products li.product .added_to_cart, .woocommerce .woocommerce-breadcrumb a:hover, .woocommerce-page .woocommerce-breadcrumb a:hover, .topWrap .sidebar_cart .widget_shopping_cart_content .buttons .button:hover, .topWrap .sidebar_cart ul.cart_list li > a:hover, .woocommerce .star-rating span:before, .woocommerce-page .star-rating span:before, .woocommerce a.reset_variations, .woocommerce-page a.reset_variations, .shipping-calculator-button:hover ') . ' { color:' . $clr . '; } .roundButton.border_1:hover > a, .squareButton.border_1 > a:hover, .squareButton.border_1 > a:active, .topWrap .topMenuStyleLine > ul > li ul li a:hover, .flip-clock-wrapper ul li a div div.inn ' . (!function_exists('is_woocommerce') ? '' : ', .woocommerce .woocommerce-info a:after, .woocommerce-page .woocommerce-info a:after, .woocommerce .woocommerce-info a, .woocommerce-page .woocommerce-info a, .woocommerce p.stars a:hover.star-1:after, .woocommerce p.stars a:hover.star-1.active:after, .woocommerce-page p.stars a:hover.star-1:after, .woocommerce-page p.stars a.star-1.active:after, .woocommerce p.stars a:hover.star-2:after, .woocommerce p.stars a.star-2.active:after, .woocommerce-page p.stars a:hover.star-2:after, .woocommerce-page p.stars a.star-2.active:after, .woocommerce p.stars a:hover.star-3:after, .woocommerce p.stars a.star-3.active:after, .woocommerce-page p.stars a:hover.star-3:after, .woocommerce-page p.stars a.star-3.active:after, .woocommerce p.stars a:hover.star-4:after, .woocommerce p.stars a.star-4.active:after, .woocommerce-page p.stars a:hover.star-4:after, .woocommerce-page p.stars a.star-4.active:after, .woocommerce p.stars a.star-5:hover:after, .woocommerce p.stars a.star-5.active:after, .woocommerce-page p.stars a:hover.star-5:after, .woocommerce-page p.stars a.star-5.active:after, .woocommerce .widget_shopping_cart .cart_list li a.remove:hover, .woocommerce.widget_shopping_cart .cart_list li a.remove:hover ') . ' { color:' . $clr . ' !important; } .theme_accent_bgc, .theme_accent_bgc:before, .sc_video_player:active .sc_video_play_button:after, input[type="submit"]:active, input[type="button"]:active, .squareButton.active > span, .squareButton.active > a, .squareButton.ui-state-active > a, .roundButton > a:active, .squareButton > a:active, .squareButton.global > a, .nav_pages_parts > span.page_num, .nav_comments > span.current, ul > li.likeActive:active > a, .masonry article .status, .portfolio .isotopeElement .folioShowBlock:before, .post .postStatus, .itemPageFull .itemDescriptionWrap .toggleButton:active, .footerWrap .footerWidget .sc_video_player:active .sc_video_play_button:after, .topMenuStyleLine > ul .menu-panel, .sliderLogo .elastislide-wrapper nav span:active:before, .sc_dropcaps.sc_dropcaps_style_1 .sc_dropcap, .sc_highlight.sc_highlight_style_1, .sc_title_bg, .sc_testimonials_style_1 .flex-direction-nav a:active, .sc_testimonials_style_3 .sc_testimonials_items, .sc_testimonials_style_3 .flex-direction-nav li, .sc_testimonials_style_3 .flex-direction-nav a, .pagination .pageLibrary > li.libPage > .pageFocusBlock .flex-direction-nav a:active, .sc_popup_light:before, .global_bg, .widgetTabs .widgetTop .tagcloud a:hover, .widgetTabs .widgetTop .tagcloud a:active, .fullScreenSlider.globalColor .sliderHomeBullets .rsContent:before, .fullScreenSlider .sliderHomeBullets .rsContent .slide-3 .order p span, ul.sc_list_style_disk li:before, .sc_slider_pagination_area .flex-control-nav.manual .slide_date, .sc_contact_form_custom .bubble label:hover, .sc_contact_form_custom .bubble label.selected, .topWrap .cart a.cart_button, .sidebarStyleLight .widget_socials .socPage ul li a:hover, .sidebarStyleLight.widget_area .instagram-pics li a:after, .sidebarStyleLight.widget_area .flickr_images .flickr_badge_image a:after, .sidebarStyleLight .wp-calendar tbody td a:hover, .sidebarStyleLight .wp-calendar tbody td a:hover, .sidebarStyleLight .wp-calendar tbody td.today > span, .sidebarStyleLight .wp-calendar tbody td.today a, .footerStyleLight .contactFooter .contactShare ul li a:hover, .footerContentWrap .googlemap_button, .page404 .titleError > span, .isotopeFiltr ul a .data_count, .isotopeFiltr ul a .data_count:before ' . (!function_exists('is_woocommerce') ? '' : ', .woocommerce #review_form #respond .form-submit input, .woocommerce-page #review_form #respond .form-submit input, .woocommerce table.cart a.remove:hover, .woocommerce #content table.cart a.remove:hover, .woocommerce-page table.cart a.remove:hover, .woocommerce-page #content table.cart a.remove:hover, .topWrap .sidebar_cart .widget_shopping_cart_content .buttons .button.checkout ') . ' ' . (!class_exists('TribeEvents') ? '' : ', .tribe-events-calendar td.tribe-events-present div[id*="tribe-events-daynum-"], .tribe-events-calendar td.tribe-events-present div[id*="tribe-events-daynum-"] > a, #tribe_events_filters_wrapper input[type="submit"], .tribe-events-button, #tribe-events .tribe-events-button, .tribe-events-button.tribe-inactive, #tribe-events .tribe-events-button:hover, .tribe-events-button:hover, .tribe-events-button.tribe-active:hover ') . ' { background-color:' . $clr . '; } .sc_pricing_light .sc_pricing_columns:hover ul.columnsAnimate .sc_button > a, .sc_pricing_light .sc_pricing_columns.active ul.columnsAnimate .sc_button > a ' . (!function_exists('is_woocommerce') ? '' : ', .woocommerce #payment #place_order, .woocommerce-page #payment #place_order, .woocommerce .woocommerce-message a.button, .woocommerce .woocommerce-error a.button, .woocommerce .woocommerce-info a.button, .woocommerce-page .woocommerce-message a.button, .woocommerce-page .woocommerce-error a.button, .woocommerce-page .woocommerce-info a.button ') . ' { background-color: ' . $clr . ' !important; } .theme_accent_border, .squareButton.border_1 > a:hover, .squareButton.border_1 > a:active, .sidebarStyleLight .widgetWrap .tagcloud a:hover, .sidebarStyleLight .widgetWrap .tagcloud a:active, .sidebarStyleLight.widget_area .tabs_area ul.tabs > li > a:hover, .sidebarStyleLight.widget_area .tagcloud a:hover, .sidebarStyleLight.widget_area .tagcloud a:active, .sidebarStyleLight.widget_area ul.tabs > li.ui-state-active > a, .sidebarStyleLight.widget_area .wp-calendar tbody a:hover, .sc_pricing_light .sc_pricing_columns:hover ul.columnsAnimate, .sc_pricing_light .sc_pricing_columns.active ul.columnsAnimate, #toc .toc_item.current, #toc .toc_item:hover, .topWrap .search:not(.searchOpen):hover, .upToScroll a.addBookmark:hover, .sc_scroll_controls .flex-direction-nav a:active, .sc_testimonials_style_1 .flex-direction-nav a:active, .pagination .flex-direction-nav a:active .sc_scroll_controls .flex-direction-nav a:hover, .topWrap .sidebar_cart .widget_shopping_cart_content .buttons .button:hover, .openResponsiveMenu:hover { border-color: ' . $clr . '; } .theme_accent_bg, .theme_accent_bg:before { background:' . $clr . '; } ' . (!class_exists('TribeEvents') ? '' : ', #tribe-bar-form .tribe-bar-submit input[type="submit"] { background:' . $clr . '; } ') . ' .squareButton.global > a:hover, .squareButton.global > a:active, .topWrap .sidebar_cart .widget_shopping_cart_content .buttons .button.checkout:hover, .topWrap .cart .cart_button:hover ' . (!function_exists('is_woocommerce') ? '' : ', .woocommerce #review_form #respond .form-submit input:hover, .woocommerce-page #review_form #respond .form-submit input:hover, .woocommerce #payment #place_order:hover, .woocommerce-page #payment #place_order:hover, .woocommerce .woocommerce-message a.button:hover, .woocommerce .woocommerce-error a.button:hover, .woocommerce .woocommerce-info a.button:hover, .woocommerce-page .woocommerce-message a.button:hover, .woocommerce-page .woocommerce-error a.button:hover, .woocommerce-page .woocommerce-info a.button:hover ') . ' { background-color: rgba(' . $rgb['r'] . ',' . $rgb['g'] . ',' . $rgb['b'] . ',0.7) !important; } ::selection { background-color:' . $clr . ';} ::-moz-selection { background-color:' . $clr . ';} '; $custom_style = apply_filters('theme_skin_set_theme_color', $custom_style, $clr); } // Theme color 1 from customizer $clr = ''; if ($customizer) { $clr = getValueGPC('theme_color_1', ''); } if (empty($clr)) { $clr = get_custom_option('theme_color_1'); } if (!empty($clr)) { $rgb = hex2rgb($clr); $custom_style .= ' .theme_accent_1, .theme_accent_1:before, .sc_pricing_dark .sc_pricing_columns:hover ul.columnsAnimate .sc_pricing_data > span, .sc_pricing_dark .sc_pricing_columns:hover ul.columnsAnimate .sc_pricing_title, .sc_pricing_dark .sc_pricing_columns.active ul.columnsAnimate .sc_pricing_data > span, .sc_pricing_dark .sc_pricing_columns.active ul.columnsAnimate .sc_pricing_title, .postLink a { color:' . $clr . '; } .roundButton.border:hover > a, .squareButton.border > a:hover, .squareButton.border > a:active, .revlink.border:hover, .revlink.border:active { color:' . $clr . ' !important; } .theme_accent_1_bgc, .theme_accent_1_bgc:before, .sc_dropcaps.sc_dropcaps_style_4 .sc_dropcap, .squareButton.accent_1 > a, .revlink.filled { background-color: ' . $clr . '; } .sc_pricing_dark .sc_pricing_columns .sc_button > a:hover, .sc_pricing_dark .sc_pricing_columns .sc_button > a:active, .sc_pricing_dark .sc_pricing_columns:hover ul.columnsAnimate .sc_button > a ' . (!function_exists('is_woocommerce') ? '' : ', .woocommerce form .button, .woocommerce-page form .button ') . ' { background-color: ' . $clr . ' !important; } .squareButton.border > a:hover, .squareButton.border > a:active, .sc_pricing_dark .sc_pricing_columns:hover ul.columnsAnimate, .sc_pricing_dark .sc_pricing_columns.active ul.columnsAnimate, .revlink.border:hover, .revlink.border:active { border-color: ' . $clr . '; } .theme_accent_1_bg, .theme_accent_1_bg:before { background:' . $clr . '; } .squareButton.accent_1 > a:hover, .squareButton.accent_1 > a:active, .revlink.filled:hover, .revlink.filled:active { background-color: rgba(' . $rgb['r'] . ',' . $rgb['g'] . ',' . $rgb['b'] . ',0.7) !important; } ' . (!function_exists('is_woocommerce') ? '' : ' .woocommerce form .button:hover, .woocommerce-page form .button:hover { background: rgba(' . $rgb['r'] . ',' . $rgb['g'] . ',' . $rgb['b'] . ',0.7) !important; } ') . ' '; } // Theme color 2 from customizer $clr = ''; if ($customizer) { $clr = getValueGPC('theme_color_2', ''); } if (empty($clr)) { $clr = get_custom_option('theme_color_2'); } if (!empty($clr)) { $rgb = hex2rgb($clr); $custom_style .= ' .theme_accent_2, .theme_accent_2:before, .sc_tooltip_parent, .hoverIncrease .hoverIcon:hover:before, .sc_video_player .sc_video_play_button:hover:after, .sc_video_player:active .sc_video_play_button:hover:after, .sc_accordion.sc_accordion_style_1 .sc_accordion_item.sc_active .sc_accordion_title, .sc_toggles.sc_toggles_style_1 .sc_toggles_item.sc_active .sc_toggles_title, .sc_team .sc_team_item .sc_team_item_avatar .sc_team_item_socials li a:hover, .hoverIncrease .hoverIcon:hover:before, .hoverIncrease .hoverLink:hover:before { color:' . $clr . '; } .relatedPostWrap.sc_blogger article a.readmore_blogger:hover { color:' . $clr . ' !important; } .theme_accent_2_bgc, .theme_accent_2_bgc:before, .sc_tooltip_parent .sc_tooltip, .sc_tooltip_parent .sc_tooltip:before, .sc_dropcaps.sc_dropcaps_style_3 .sc_dropcap, .hoverIncrease .hoverShadow, .sc_accordion.sc_accordion_style_1 .sc_accordion_item .sc_accordion_title:before, .sc_toggles.sc_toggles_style_1 .sc_toggles_item .sc_toggles_title:before, .squareButton.accent_2 > a, .sc_skills_bar .sc_skills_item .sc_skills_count, .sc_skills_counter .sc_skills_item.sc_skills_style_3 .sc_skills_count, .sc_skills_counter .sc_skills_item.sc_skills_style_4 .sc_skills_count, .sc_skills_counter .sc_skills_item.sc_skills_style_4 .sc_skills_info, .relatedPostWrap .wrap:before, .relatedPostWrap.sc_blogger .wrap:hover:before, .portfolioWrap .isotopePadding:before, #pagination .squareButton.active span, #pagination .squareButton a:hover, #pagination .squareButton a:active, #viewmore_link:hover, #viewmore_link:active, .user-popUp .formItems .formList li .sendEnter, .user-popUp ul.loginHeadTab li.ui-tabs-active:before, .sc_blogger.style_date .sc_blogger_item .sc_blogger_date, .sc_scroll_bar .swiper-scrollbar-drag:before, .sc_blogger.sc_blogger_vertical.style_date.sc_scroll_controls ul.flex-direction-nav li a:hover ' . (!function_exists('is_woocommerce') ? '' : ', .woocommerce .widget_area aside.widgetWrap.woocommerce .button, .woocommerce-page .widget_area aside.widgetWrap.woocommerce .button, .woocommerce nav.woocommerce-pagination ul li span.current, .woocommerce nav.woocommerce-pagination ul li a:hover, .woocommerce nav.woocommerce-pagination ul li a:focus, .woocommerce #content nav.woocommerce-pagination ul li span.current, .woocommerce #content nav.woocommerce-pagination ul li a:hover, .woocommerce #content nav.woocommerce-pagination ul li a:focus, .woocommerce-page nav.woocommerce-pagination ul li span.current, .woocommerce-page nav.woocommerce-pagination ul li a:hover, .woocommerce-page nav.woocommerce-pagination ul li a:focus, .woocommerce-page #content nav.woocommerce-pagination ul li span.current, .woocommerce-page #content nav.woocommerce-pagination ul li a:hover, .woocommerce-page #content nav.woocommerce-pagination ul li a:focus ') . ' { background-color: ' . $clr . '; } .theme_accent_2_bg, .theme_accent_2_bg:before { background:' . $clr . '; } a.sc_icon.bg_icon.sc_icon_round:hover, a.sc_icon.no_bg_icon.sc_icon_round:hover { background-color: ' . $clr . ' !important; } .sc_slider_flex .sc_slider_info, .sc_slider_swiper .sc_slider_info, .squareButton.accent_2 > a:hover, .squareButton.accent_2 > a:active, .user-popUp .formItems .formList li .sendEnter:hover, .user-popUp .formItems .formList li .sendEnter:active { background-color: rgba(' . $rgb['r'] . ',' . $rgb['g'] . ',' . $rgb['b'] . ',0.7) !important; } .postSharing > ul > li > a:active, .postSharing > ul > li > span:active, .roundButton > a:active, .nav_pages_parts > span.page_num, .nav_comments > span.current, .itemPageFull .itemDescriptionWrap .toggleButton:active, .footerWidget .sc_video_player:active .sc_video_play_button:after, .sliderLogo .elastislide-wrapper nav span:active:before, pre.code, .sc_tooltip_parent { border-color: ' . $clr . '; } blockquote.sc_quote_style_2 { border-left-color: ' . $clr . '; } ' . (!function_exists('is_woocommerce') ? '' : ' .woocommerce .widget_price_filter .price_slider_amount .button, .woocommerce-page .widget_price_filter .price_slider_amount .button { background: ' . $clr . ' !important; } ') . ' ' . (!function_exists('is_woocommerce') ? '' : ' .woocommerce .widget_price_filter .price_slider_amount .button:hover, .woocommerce-page .widget_price_filter .price_slider_amount .button:hover, .woocommerce .widget_area aside.widgetWrap.woocommerce .button:hover, .woocommerce-page .widget_area aside.widgetWrap.woocommerce .button:hover { background: rgba(' . $rgb['r'] . ',' . $rgb['g'] . ',' . $rgb['b'] . ',0.7) !important; } ') . ' .sc_image_shape_round:hover figcaption, .post .sc_image_shape_round:hover figcaption { background: rgba(' . $rgb['r'] . ',' . $rgb['g'] . ',' . $rgb['b'] . ',0.6); } '; } // Theme color 3 from customizer $clr = ''; if ($customizer) { $clr = getValueGPC('theme_color_3', ''); } if (empty($clr)) { $clr = get_custom_option('theme_color_3'); } if (!empty($clr)) { $rgb = hex2rgb($clr); $custom_style .= ' .theme_accent_3, .theme_accent_3:before, .widgetWrap ul li.liHover:before, .widgetWrap a:hover, .widgetWrap a:active, .widget_area .widgetWrap ul > li > a:hover, .widget_area .widgetWrap ul > li > a:hover span, .sidebarStyleDark.widget_area a:hover, .sidebarStyleDark.widget_area a:hover span, .widget_area ul.tabs > li.ui-state-active > a, aside.widgetWrap .tagcloud a:hover, aside.widgetWrap .tagcloud a:active, .sidebarStyleDark.widget_area a:hover, .sidebarStyleDark.widget_area .ui-state-active a, .sidebarStyleDark.widget_area .widgetWrap ul li a:hover, .sidebarStyleDark.widget_area .widget_twitter ul li:before, .sidebarStyleDark .wp-calendar tfoot th a:before, .sidebarStyleDark.widget_area table.wp-calendar tfoot a:hover, .sidebarStyleDark.widget_area .widgetWrap ul > li.dropMenu:hover:before, .sidebarStyleDark.widget_area .widgetWrap ul > li.dropMenu.dropOpen:before, .copyWrap .copy .copyright > a, .widget_area article span:before, .twitBlock .sc_slider .swiper-slide a, .twitBlock .sc_slider .swiper-slide .twitterIco:before, .menuSearch .searchSubmit:hover:before, .sidemenu_wrap .sidemenu_area .current-menu-item > a, .sidemenu_wrap .sidemenu_area .current-menu-ancestor > a, .sidemenu_wrap .sidemenu_area > ul li a:hover, .sidemenu_wrap .sidemenu_area > ul li.sfHover > a, .sidemenu_wrap .sidemenu_area .current-menu-item.dropMenu:before, .sidemenu_wrap .sidemenu_area .current-menu-ancestor.dropMenu:before, .sidemenu_wrap .sidemenu_area li.liHover.dropMenu:before, .twitBlock .sc_slider .swiper-slide a, .twitBlockWrap .twitterAuthor a, .sidebarStyleDark.widget_area .widgetWrap a:hover, .sidebarStyleDark.widget_area .widgetWrap .post_info a:hover ' . (!function_exists('is_woocommerce') ? '' : ', .woocommerce ul.cart_list li > .amount, .woocommerce ul.product_list_widget li > .amount, .woocommerce-page ul.cart_list li > .amount, .woocommerce-page ul.product_list_widget li > .amount, .woocommerce ul.cart_list li span .amount, .woocommerce ul.product_list_widget li span .amount, .woocommerce-page ul.cart_list li span .amount, .woocommerce-page ul.product_list_widget li span .amount, .woocommerce ul.cart_list li ins .amount, .woocommerce ul.product_list_widget li ins .amount, .woocommerce-page ul.cart_list li ins .amount, .woocommerce-page ul.product_list_widget li ins .amount, .woocommerce .sidebarStyleDark.widget_area .widget_price_filter .price_slider_amount .button:hover, .woocommerce-page .sidebarStyleDark.widget_area .widget_price_filter .price_slider_amount .button:hover, .woocommerce .sidebarStyleDark.widget_area.widget_area aside.widgetWrap.woocommerce .button:hover, .woocommerce-page .sidebarStyleDark.widget_area.widget_area aside.widgetWrap.woocommerce .button:hover, .woocommerce div.product span.price, .woocommerce div.product p.price, .woocommerce #content div.product span.price, .woocommerce #content div.product p.price, .woocommerce-page div.product span.price, .woocommerce-page div.product p.price, .woocommerce-page #content div.product span.price, .woocommerce-page #content div.product p.price, .woocommerce .sidebarStyleDark.widget_area .widget_layered_nav ul li.chosen a, .woocommerce-page .sidebarStyleDark.widget_area .widget_layered_nav ul li.chosen a, #sidebar_main.sidebarStyleDark .widget_layered_nav ul li.chosen a:before, #sidebar_main.sidebarStyleDark .widget_layered_nav ul li a:hover:before, #sidebar_main.sidebarStyleDark .widget_layered_nav_filters ul li a:hover:before, #sidebar_main.sidebarStyleDark .widget_layered_nav_filters ul li.chosen a:before, .woocommerce.widget_shopping_cart .total .amount, .woocommerce .widget_shopping_cart .total .amount, .woocommerce-page.widget_shopping_cart .total .amount, .woocommerce-page .widget_shopping_cart .total .amount, .woocommerce ul.products li.product .price > .amount, .woocommerce ul.products li.product .price ins .amount, .woocommerce ul.products li.product .price, .woocommerce-page ul.products li.product .price ') . ' { color:' . $clr . '; } .sidebarStyleDark.widget_area a:hover span { color:' . $clr . ' !important; } .theme_accent_3_bgc, .theme_accent_3_bgc:before, .sc_dropcaps.sc_dropcaps_style_2 .sc_dropcap, .squareButton.accent_3 > a, .copyWrap .socPage ul li a:hover, .sidebarStyleDark .widget_socials .socPage ul li a:hover, .widget_area .instagram-pics li a:after, .widget_area .flickr_images .flickr_badge_image a:after, .wp-calendar tbody td a:hover, .footerStyleDark .contactFooter .contactShare ul li a:hover, ul > li.share > ul.shareDrop > li > a:hover, .author .socPage ul li a:hover, .sc_team .sc_team_item .sc_team_item_avatar:after, .wp-calendar tbody td a:hover, .wp-calendar tbody td.today > span { background-color: ' . $clr . '; } .theme_accent_3_bg, .theme_accent_3_bg:before { background:' . $clr . '; } .squareButton.accent_3 > a:hover, .squareButton.accent_3 > a:active, .squareButton.gray > a:hover, .squareButton.gray > a:active { background-color: rgba(' . $rgb['r'] . ',' . $rgb['g'] . ',' . $rgb['b'] . ',0.7);} ' . (!function_exists('is_woocommerce') ? '' : ' .woocommerce #content table.cart td.actions .button:hover, .woocommerce table.cart td.actions .button:hover, .woocommerce #content table.cart td.actions .button:active, .woocommerce table.cart td.actions .button:active, .woocommerce #content table.cart td.actions .button.checkout-button, .woocommerce table.cart td.actions .button.checkout-button, .woocommerce .shipping-calculator-form .button:hover, .woocommerce .shipping-calculator-form .button:active, .return-to-shop .button:hover, .return-to-shop .button:active, .wc-proceed-to-checkout .checkout-button, .woocommerce div.product form.cart .button, .woocommerce #content div.product form.cart .button, .woocommerce-page div.product form.cart .button, .woocommerce-page #content div.product form.cart .button { background-color:' . $clr . ' !important; } ') . ' ' . (!function_exists('is_woocommerce') ? '' : ' .woocommerce #content table.cart td.actions .button.checkout-button:hover, .woocommerce table.cart td.actions .button.checkout-button:hover, .wc-proceed-to-checkout .checkout-button:hover, .woocommerce div.product form.cart .button:hover, .woocommerce #content div.product form.cart .button:hover, .woocommerce-page div.product form.cart .button:hover, .woocommerce-page #content div.product form.cart .button:hover { background: rgba(' . $rgb['r'] . ',' . $rgb['g'] . ',' . $rgb['b'] . ',0.7) !important; } ') . ' ' . (!function_exists('is_woocommerce') ? '' : ' .woocommerce ul.products li.product:hover .button, .woocommerce-page ul.products li.product:hover .button { background: rgba(' . $rgb['r'] . ',' . $rgb['g'] . ',' . $rgb['b'] . ',0.7); } ') . ' .widgetWrap .tagcloud a:hover, .widgetWrap .tagcloud a:active, .widget_area .tabs_area ul.tabs > li > a:hover, .sidebarStyleDark.widget_area .tagcloud a:hover, .sidebarStyleDark.widget_area .tagcloud a:active, .widget_area ul.tabs > li.ui-state-active > a ' . (!function_exists('is_woocommerce') ? '' : ', .woocommerce .sidebarStyleDark.widget_area .widget_price_filter .price_slider_amount .button:hover, .woocommerce-page .sidebarStyleDark.widget_area .widget_price_filter .price_slider_amount .button:hover, .woocommerce .sidebarStyleDark.widget_area aside.widgetWrap.woocommerce .button:hover, .woocommerce-page .sidebarStyleDark.widget_area aside.widgetWrap.woocommerce .button:hover, #sidebar_main.sidebarStyleDark.widget_area .widget_layered_nav ul li a:hover:before, .woocommerce #sidebar_main .sidebarStyleDark.widget_area .widget_layered_nav ul li.chosen a:before, .woocommerce-page #sidebar_main.sidebarStyleDark.widget_area .widget_layered_nav ul li.chosen a:before, #sidebar_main.sidebarStyleDark .widget_layered_nav_filters ul li.chosen a:before, #sidebar_main.sidebarStyleDark .widget_layered_nav_filters ul li a:hover:before ') . ' { border-color: ' . $clr . '; } .sc_table table tr:hover { background-color: rgba(' . $rgb['r'] . ',' . $rgb['g'] . ',' . $rgb['b'] . ',0.15); } '; } addThemeCustomStyle(apply_filters('theme_skin_add_styles_inline', $custom_style)); return getThemeCustomStyles(); }
/** * How to display the widget on the screen. */ function widget($args, $instance) { extract($args); global $wp_query, $post; /* Our variables from the widget settings. */ $title = apply_filters('widget_title', isset($instance['title']) ? $instance['title'] : ''); $title_tabs = array(apply_filters('widget_title', isset($instance['title_author']) ? $instance['title_author'] : ''), apply_filters('widget_title', isset($instance['title_users']) ? $instance['title_users'] : '')); $number = isset($instance['number']) ? (int) $instance['number'] : ''; $show_date = isset($instance['show_date']) ? (int) $instance['show_date'] : 0; $show_image = isset($instance['show_image']) ? (int) $instance['show_image'] : 0; $show_author = isset($instance['show_author']) ? (int) $instance['show_author'] : 0; $show_counters = isset($instance['show_counters']) ? (int) $instance['show_counters'] : 0; $category = isset($instance['category']) ? (int) $instance['category'] : 0; $counters = 'stars'; $output = ''; $tabs = array(); $reviews_first_author = get_theme_option('reviews_first') == 'author'; $reviews_second_hide = get_theme_option('reviews_second') == 'hide'; for ($i = 0; $i < 2; $i++) { if ($i == 0 && !$reviews_first_author && $reviews_second_hide) { continue; } if ($i == 1 && $reviews_first_author && $reviews_second_hide) { continue; } $args = array('post_type' => 'post', 'post_status' => current_user_can('read_private_pages') && current_user_can('read_private_posts') ? array('publish', 'private') : 'publish', 'post_password' => '', 'posts_per_page' => $number, 'ignore_sticky_posts' => 1, 'order' => 'DESC', 'orderby' => 'meta_value_num', 'meta_key' => 'reviews_avg' . ($i == 0 ? '' : '2')); if ($category > 0) { $args['cat'] = $category; } $ex = get_theme_option('exclude_cats'); if (!empty($ex)) { $args['category__not_in'] = explode(',', $ex); } query_posts($args); /* Loop posts */ if (have_posts()) { $tabs[$i] = '<li><a href="#widget_top10_' . $i . '" class="theme_button"><span>' . $title_tabs[$i] . '</span></a></li>'; $output .= ' <div class="tab_content" id="widget_top10_' . $i . '"' . ($i == 1 && !$output ? ' style="display: block;"' : '') . '> '; $post_number = 0; while (have_posts()) { the_post(); $post_number++; $post_id = get_the_ID(); $post_date = getDateOrDifference(get_the_date('Y-m-d H:i:s')); $post_title = $post->post_title; $post_link = get_permalink(); $output .= ' <div class="post_item' . ($post_number == 1 ? ' first' : '') . '"> '; if ($show_image) { $post_thumb = getResizedImageTag($post_id, 60, 60); if ($post_thumb) { $output .= ' <div class="post_thumb image_wrapper">' . $post_thumb . '</div> '; } } $output .= ' <div class="post_wrapper"> <h5 class="post_title theme_title' . ($show_counters == 2 ? '' : ' title_padding') . '"><a href="' . $post_link . '">' . $post_title . '</a></h5> '; if ($show_counters) { $post_counters = marksToDisplay(get_post_meta($post_id, 'reviews_avg' . ($i == 0 ? '' : '2'), true)); if ($post_counters > 0) { if (themerex_strlen($post_counters) == 1) { $post_counters .= '.0'; } if ($show_counters == 2 && get_custom_option('show_reviews') == 'yes') { $output .= ' <div class="reviews_summary blog_reviews"> <div class="criteria_summary criteria_row"> ' . getReviewsSummaryStars($post_counters) . ' </div> </div> '; } } } if ($show_date || $show_counters || $show_author) { $output .= ' <div class="post_info theme_info"> '; if ($show_date) { $output .= ' <span class="post_date theme_text">' . $post_date . '</span> '; } if ($show_author) { $post_author_id = $post->post_author; $post_author_name = get_the_author_meta('display_name', $post_author_id); $post_author_url = get_author_posts_url($post_author_id, ''); $output .= ' <span class="post_author">' . __('by', 'themerex') . ' <a href="' . $post_author_url . '">' . $post_author_name . '</a></span> '; } if ($show_counters == 1 && $post_counters) { $output .= ' <span class="post_comments"><a href="' . $post_link . '"> <span class="comments_icon icon-star"></span><span class="post_comments_number">' . $post_counters . '</span> </a></span>'; } $output .= ' </div> '; } $output .= ' </div> </div> '; if ($post_number >= $number) { break; } } $output .= ' </div> '; } } /* Restore main wp_query and current post data in the global var $post */ wp_reset_query(); wp_reset_postdata(); if (!empty($output)) { if (!$reviews_second_hide) { wp_enqueue_script('jquery-ui-tabs', false, array('jquery', 'jquery-ui-core'), null, true); } /* Before widget (defined by themes). */ echo $before_widget; /* Display the widget title if one was input (before and after defined by themes). */ if ($title) { echo $before_title . $title . $after_title; } echo ' <div class="top10_tabs' . ($show_image ? '' : ' ordered_list') . ($show_image || $show_date || $show_author ? '' : ' flat_list') . '">' . (!$reviews_second_hide ? '<ul class="tabs">' . ($reviews_first_author ? $tabs[0] . $tabs[1] : $tabs[1] . $tabs[0]) . '</ul>' : '') . $output . (!$reviews_second_hide ? ' <script type="text/javascript"> jQuery(document).ready(function() { jQuery(\'.top10_tabs\').tabs(); }); </script>' : '') . ' </div> '; /* After widget (defined by themes). */ echo $after_widget; } }
/** * How to display the widget on the screen. */ function widget($args, $instance) { extract($args); global $wp_query, $post; /* Our variables from the widget settings. */ $title = apply_filters('widget_title', isset($instance['title']) ? $instance['title'] : ''); $number = isset($instance['number']) ? (int) $instance['number'] : ''; $show_date = isset($instance['show_date']) ? (int) $instance['show_date'] : 0; $show_image = isset($instance['show_image']) ? (int) $instance['show_image'] : 0; $show_author = isset($instance['show_author']) ? (int) $instance['show_author'] : 0; $show_counters = isset($instance['show_counters']) ? (int) $instance['show_counters'] : 0; $category = isset($instance['category']) ? (int) $instance['category'] : 0; $counters = 'stars'; //get_theme_option("blog_counters"); $output = ''; $args = array('post_type' => 'post', 'post_status' => current_user_can('read_private_pages') && current_user_can('read_private_posts') ? array('publish', 'private') : 'publish', 'post_password' => '', 'posts_per_page' => $number, 'ignore_sticky_posts' => 1, 'order' => 'DESC', 'orderby' => 'date', 'meta_query' => array(array('key' => 'reviews_avg' . (get_theme_option('reviews_first') == 'author' ? '' : '2'), 'value' => 0, 'compare' => '>', 'type' => 'NUMERIC'))); if ($category > 0) { $args['cat'] = $category; } $ex = get_theme_option('exclude_cats'); if (!empty($ex)) { $args['category__not_in'] = explode(',', $ex); } query_posts($args); /* Loop posts */ if (have_posts()) { $post_number = 0; while (have_posts()) { the_post(); $post_number++; $post_id = get_the_ID(); $post_date = getDateOrDifference(get_the_date('Y-m-d H:i:s')); $post_title = $post->post_title; $post_link = get_permalink(); $output .= ' <div class="post_item' . ($post_number == 1 ? ' first' : '') . '"> '; if ($show_image) { $post_thumb = getResizedImageTag($post_id, 60, 60); if ($post_thumb) { $output .= ' <div class="post_thumb image_wrapper">' . $post_thumb . '</div> '; } } $output .= ' <div class="post_wrapper"> <h5 class="post_title theme_title' . ($show_counters == 2 ? '' : ' title_padding') . '"><a href="' . $post_link . '">' . $post_title . '</a></h5> '; if ($show_counters) { $post_counters = marksToDisplay(get_post_meta($post_id, 'reviews_avg' . (get_theme_option('reviews_first') == 'author' ? '' : '2'), true)); if ($post_counters > 0) { if (themerex_strpos($post_counters, '.') === false) { $post_counters .= '.0'; } if ($show_counters == 2 && get_custom_option('show_reviews') == 'yes') { $output .= ' <div class="reviews_summary blog_reviews"> <div class="criteria_summary criteria_row"> ' . getReviewsSummaryStars($post_counters) . ' </div> </div> '; } } } if ($show_date || $show_counters || $show_author) { $output .= ' <div class="post_info theme_info"> '; if ($show_date) { $output .= ' <span class="post_date theme_text">' . $post_date . '</span> '; } if ($show_author) { $post_author_id = $post->post_author; $post_author_name = get_the_author_meta('display_name', $post_author_id); $post_author_url = get_author_posts_url($post_author_id, ''); $output .= ' <span class="post_author">' . __('by', 'themerex') . ' <a href="' . $post_author_url . '">' . $post_author_name . '</a></span> '; } if ($show_counters == 1 && $post_counters) { $output .= ' <a class="link_review" href="' . $post_link . '"> <span class="post_review"> <span class="post_review_number">' . $post_counters . '</span> <span class="review_icon icon-star"></span> </span> </a>'; } $output .= ' </div> '; } $output .= ' </div> </div> '; if ($post_number >= $number) { break; } } } /* Restore main wp_query and current post data in the global var $post */ wp_reset_query(); wp_reset_postdata(); if (!empty($output)) { /* Before widget (defined by themes). */ echo balanceTags($before_widget); /* Display the widget title if one was input (before and after defined by themes). */ if ($title) { echo balanceTags($before_title . $title . $after_title); } echo ' <div class="recent_reviews' . ($show_image ? '' : ' ordered_list') . ($show_image || $show_date || $show_counters > 1 || $show_author ? '' : ' flat_list') . '"> ' . $output . ' </div> '; /* After widget (defined by themes). */ echo balanceTags($after_widget); } }
function themerex_init_template() { // AJAX Queries settings global $THEMEREX_ajax_nonce, $THEMEREX_ajax_url; $THEMEREX_ajax_nonce = wp_create_nonce('ajax_nonce'); $THEMEREX_ajax_url = admin_url('admin-ajax.php'); // Set theme params from GET if (isset($_GET['set']) && $_GET['set'] == 1) { foreach ($_GET as $k => $v) { if (get_theme_option($k, null) !== null) { setcookie($k, $v, 0, '/'); $_COOKIE[$k] = $v; } } } // Get custom options from current category / page / post / shop load_custom_options(); // Reject old browsers support global $THEMEREX_jreject; $THEMEREX_jreject = false; if (!isset($_COOKIE['jreject'])) { themerex_enqueue_style('jquery_reject-style', themerex_get_file_url('/js/jreject/css/jquery.reject.css'), array(), null); themerex_enqueue_script('jquery_reject', themerex_get_file_url('/js/jreject/jquery.reject.js'), array('jquery'), null, true); setcookie('jreject', 1, 0, '/'); $THEMEREX_jreject = true; } // Main menu global $THEMEREX_mainmenu; if (get_custom_option('show_top_panel') != 'hide') { $menu_slug = get_custom_option('menu_main'); $args = array('menu' => empty($menu_slug) || $menu_slug == 'default' || is_inherit_option($menu_slug) ? '' : $menu_slug, 'container' => '', 'container_class' => '', 'container_id' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 'menu_class' => '', 'menu_id' => 'mainmenu', 'echo' => false, 'fallback_cb' => '', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'depth' => 11, 'theme_location' => 'mainmenu'); if (get_theme_option('custom_menu') == 'yes' && class_exists('themerex_walker')) { $args['walker'] = new themerex_walker(); } $THEMEREX_mainmenu = wp_nav_menu($args); } else { $THEMEREX_mainmenu = ''; } // User menu global $THEMEREX_usermenu; if (get_custom_option('show_top_panel') != 'hide' && get_custom_option('show_user_menu') == 'yes') { $menu_slug = get_custom_option('menu_user'); $THEMEREX_usermenu = wp_nav_menu(array('menu' => empty($menu_slug) || $menu_slug == 'default' || is_inherit_option($menu_slug) ? '' : $menu_slug, 'container' => '', 'container_class' => '', 'container_id' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 'menu_class' => '', 'menu_id' => 'usermenu', 'echo' => false, 'fallback_cb' => '', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'depth' => 11, 'theme_location' => 'usermenu')); } else { $THEMEREX_usermenu = ''; } // Side menu global $THEMEREX_sidemenu; if (get_custom_option('show_left_panel') == 'yes') { $menu_slug = get_custom_option('menu_side'); $THEMEREX_sidemenu = wp_nav_menu(array('menu' => empty($menu_slug) || $menu_slug == 'default' || is_inherit_option($menu_slug) ? '' : $menu_slug, 'container' => '', 'container_class' => '', 'container_id' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 'menu_class' => '', 'menu_id' => 'sidemenu', 'echo' => false, 'fallback_cb' => '', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'depth' => 11, 'theme_location' => 'sidemenu')); } else { $THEMEREX_sidemenu = ''; } // Panel menu global $THEMEREX_panelmenu; if (get_custom_option('show_right_panel') == 'yes') { $menu_slug = get_custom_option('menu_right'); $THEMEREX_panelmenu = wp_nav_menu(array('menu' => empty($menu_slug) || $menu_slug == 'default' || is_inherit_option($menu_slug) ? '' : $menu_slug, 'container' => '', 'container_class' => '', 'container_id' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 'menu_class' => '', 'menu_id' => 'panelmenu', 'echo' => false, 'fallback_cb' => '', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'depth' => 11, 'theme_location' => 'panelmenu')); } else { $THEMEREX_panelmenu = ''; } // Include current skin $skin = themerex_escape_shell_cmd(get_custom_option('theme_skin')); if (file_exists(themerex_get_file_dir('/skins/' . $skin . '/' . $skin . '.php'))) { require_once themerex_get_file_dir('/skins/' . $skin . '/' . $skin . '.php'); } // Logo image and icon from skin global $logo_text, $logo_slogan, $logo_icon, $logo_image, $logo_side, $logo_fixed, $logo_footer; $logo_text = get_custom_option('logo_text'); $logo_slogan = get_custom_option('logo_slogan'); $menu_align = get_custom_option('menu_align'); if ($logo_slogan == '') { $logo_slogan = get_bloginfo('description'); } $logo_icon = $logo_image = $logo_side = $logo_fixed = $logo_footer = ''; if (($logo_icon = get_custom_option('logo_icon')) == '' && file_exists(themerex_get_file_dir('/skins/' . $skin . '/images/logo-icon.png'))) { $logo_icon = themerex_get_file_url('/skins/' . $skin . '/images/logo-icon.png'); } if ($menu_align == 'left' || $menu_align == 'center') { if (($logo_image = get_custom_option('logo_top')) == '' && file_exists(themerex_get_file_dir('/skins/' . $skin . '/images/logo-top.png'))) { $logo_image = themerex_get_file_url('/skins/' . $skin . '/images/logo-top.png'); } } if ($logo_image == '' && ($logo_image = get_custom_option('logo_image')) == '' && file_exists(themerex_get_file_dir('/skins/' . $skin . '/images/logo.png'))) { $logo_image = themerex_get_file_url('/skins/' . $skin . '/images/logo.png'); } if (($logo_side = get_custom_option('logo_side')) == '' && file_exists(themerex_get_file_dir('/skins/' . $skin . '/images/logo-side.png'))) { $logo_side = themerex_get_file_url('/skins/' . $skin . '/images/logo-side.png'); } if ($logo_side == '') { $logo_side = $logo_image; } if (($logo_fixed = get_custom_option('logo_fixed')) == '' && file_exists(themerex_get_file_dir('/skins/' . $skin . '/images/logo-fixed.png'))) { $logo_fixed = themerex_get_file_url('/skins/' . $skin . '/images/logo-fixed.png'); } if ($logo_fixed == '') { $logo_fixed = $logo_image; } if (($logo_footer = get_custom_option('logo_image_footer')) == '' && file_exists(themerex_get_file_dir('/skins/' . $skin . '/images/logo-footer.png'))) { $logo_footer = themerex_get_file_url('/skins/' . $skin . '/images/logo-footer.png'); } if ($logo_footer == '') { $logo_footer = $logo_image; } global $THEMEREX_shop_mode; $THEMEREX_shop_mode = getValueGPC('themerex_shop_mode'); if (empty($THEMEREX_shop_mode)) { $THEMEREX_shop_mode = get_custom_option('shop_mode', ''); } if (empty($THEMEREX_shop_mode) || !is_archive()) { $THEMEREX_shop_mode = 'thumbs'; } }
<div class="article_wrap"> <?php if (!in_array($post_data['post_format'], array('chat', 'link', 'status', 'quote'))) { ?> <header class="post_info infoPost"> <?php $excerpt_length = get_custom_option('post_excerpt_maxlength'); /* Reviews */ $review_type = get_custom_option('reviews_first'); $review_avg = $post_data['post_reviews_' . $review_type]; $review_first = get_custom_option('reviews_first'); $review_max = get_custom_option('reviews_max_level'); $review_style = get_custom_option('reviews_style', '', $post_data['post_id']); $review_color = get_custom_option('review_color'); if (!empty($review_avg) && !strpos($review_style, 'stars') !== false) { echo get_review_rating($review_style, $review_avg, $review_max, $review_color); } /* /Reviews */ if ($show_title) { ?> <h2 class="post_title"><a href="<?php echo $post_data['post_link']; ?> "><?php echo $post_data['post_title']; ?> </a></h2> <?php if (!empty($review_avg) && strpos($review_style, 'stars') !== false) {
<h3 class="title404"><?php _e('404', 'themerex'); ?> </h3> <h3 class="subTitle404"><?php _e('This page could not be found!', 'themerex'); ?> </h3> <p> <?php echo sprintf(__("Can't find what you need? Take a moment and do a search below or start from our <a href='%s'>homepage</a>.", 'themerex'), home_url(), get_bloginfo()); ?> </p> </div> </article> </section> <?php echo do_shortcode('[rev_slider error]'); ?> <section style="padding-bottom: 60px; background-color: <?php echo get_custom_option('theme_color'); ?> "> <article class="sc_content"> <?php echo do_shortcode('[trx_search open="yes"]'); ?> </article> </section>
if ($post_data['post_format'] != '' && $post_data['post_format'] != 'standard') { $args['tax_query'] = array(array('taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-' . $post_data['post_format'])); } $args = addSortOrderInQuery($args, get_custom_option('post_related_sort'), get_custom_option('post_related_order')); $recent_posts = wp_get_recent_posts($args, OBJECT); if (is_array($recent_posts) && count($recent_posts) > 0) { ?> <section class="related_posts<?php echo get_custom_option("show_post_comments") == 'yes' ? ' divider' : ''; ?> "> <h2><?php _e('Related posts', 'themerex'); ?> </h2> <div class="relatedPostWrap"> <div class="columnsWrap"> <?php $i = 0; foreach ($recent_posts as $recent) { $i++; showPostLayout(array('layout' => 'related', 'number' => $i, 'add_view_more' => false, 'posts_on_page' => get_custom_option('post_related_count')), getPostData(array('thumb_size' => 'image_medium', 'strip_teaser' => false, 'sidebar' => !in_array(get_custom_option('show_sidebar_main'), array('none', 'fullwidth'))), $recent)); } ?> </div> </div> <div class="sc_divider"></div> </section> <?php } }
echo $recent['post_audio']; } } ?> </div> <?php //if ($i>=3+$thumb_idx) break; } ?> </div> <?php } } // if (blog_show_related_posts) //===================================== Comments ===================================== if (get_custom_option("show_post_comments") == 'yes') { if (comments_open() || get_comments_number() != 0) { comments_template(); } } } // if (!post_password_required()) ?> </div><!-- .itemscope --> <?php } // end of the loop. ?>
echo getPostShare(get_custom_option('set_post_info', null, $post_data['post_id']), $post_data); //read more $show_all = !isset($postinfo_buttons) || !is_array($postinfo_buttons); $show_button_format = $post_data['post_format'] != 'aside' && $post_data['post_format'] != 'chat' && $post_data['post_format'] != 'link' && $post_data['post_format'] != 'quote'; if (($show_all || in_array('more', $postinfo_buttons)) && !$post_data['post_protected'] && $show_button_format && get_custom_option('show_read_more', null, $post_data['post_id']) == 'yes') { echo balanceTags('<div class="readMore">' . do_shortcode('[trx_button skin="dark" style="bg" size="big" fullsize="no" link="' . $post_data['post_link'] . '" ]' . __('Read more', 'themerex') . '[/trx_button]') . '</div>'); } } else { //read more $show_all = !isset($postinfo_buttons) || !is_array($postinfo_buttons); $show_button_format = $post_data['post_format'] != 'aside' && $post_data['post_format'] != 'chat' && $post_data['post_format'] != 'link' && $post_data['post_format'] != 'quote'; if (($show_all || in_array('more', $postinfo_buttons)) && !$post_data['post_protected'] && $show_button_format && get_custom_option('show_read_more', null, $post_data['post_id']) == 'yes') { echo balanceTags('<div class="readMore">' . do_shortcode('[trx_button skin="dark" style="bg" size="big" fullsize="no" link="' . $post_data['post_link'] . '" ]' . __('Continue reading...', 'themerex') . '[/trx_button]') . '</div>'); } //postshare echo getPostShare(get_custom_option('set_post_info', null, $post_data['post_id']), $post_data); } //main block in full Width echo $fullwidth && $streampage_columns || $layout_isotope ? '</div><!--/.sc_columns-->' : ''; //main block echo $main_div ? '</div><!-- /.main -->' : ''; if (in_shortcode_blogger(true)) { ?> </div><?php } else { //main block in full Width echo $fullwidth && $streampage_columns || $layout_isotope ? '</div>' : ''; ?> </article> <?php }
?> </span><span class="viewmore_text_2"><?php _e('Loading ...', 'themerex'); ?> </span></a> <script type="text/javascript"> var THEMEREX_VIEWMORE_PAGE = <?php echo esc_attr((int) $page_number); ?> ; var THEMEREX_VIEWMORE_DATA = '<?php echo serialize($args); ?> '; var THEMEREX_VIEWMORE_VARS = '<?php echo serialize(array('blog_style' => esc_attr($blog_style), 'show_sidebar_main' => esc_attr($show_sidebar_main), 'parent_cat_id' => esc_attr($parent_cat_id), 'filters' => get_custom_option('show_filters') == 'yes' ? get_custom_option('filter_taxonomy') : '', 'hover' => '', 'hover_dir' => '', 'ppp' => esc_attr($ppp))); ?> '; </script> </div> <?php } } else { showPagination(array('class' => 'pagination', 'style' => 'pages', 'button_class' => 'squareButton light', 'pages_in_group' => get_theme_option('blog_pagination_style') == 'pages' ? 10 : 20)); } } if ($wp_query_need_restore) { wp_reset_query(); } wp_reset_postdata(); get_footer();
?> </a> <?php if (!empty($post_data['post_tags_links'])) { ?> <span class="separator">|</span> <span class="infoTags"><?php echo $post_data['post_tags_links']; ?> </span> <?php } ?> </div> <?php if (get_custom_option('blog_counters') != 'none') { ?> <div class="relatedMore"> <?php $postinfo_buttons = array('more', 'comments'); if ($opt['posts_visible'] < 3) { $postinfo_buttons[] = 'views'; } /* if ($opt['posts_visible'] < 3) { $postinfo_buttons[] = 'likes'; $postinfo_buttons[] = 'share'; } */ require themerex_get_file_dir('/templates/page-part-postinfo.php'); ?>
<?php /** * The Sidebar containing the main widget areas. */ ?> <?php if (in_array(get_custom_option('show_sidebar_main'), array('left', 'right'))) { ?> <div id="sidebar_main" class="widget_area sidebar_main sidebar" role="complementary"> <?php do_action('before_sidebar'); global $THEMEREX_REVIEWS_RATING; echo $THEMEREX_REVIEWS_RATING; global $THEMEREX_CURRENT_SIDEBAR; $THEMEREX_CURRENT_SIDEBAR = 'main'; if (!dynamic_sidebar(get_custom_option('sidebar_main'))) { // Put here html if user no set widgets in sidebar } ?> </div> <!-- div#sidebar_main --> <?php }