function tie_wp_head() { global $custom_typography; ?> <!--[if IE]> <script type="text/javascript">jQuery(document).ready(function (){ jQuery(".menu-item").has("ul").children("a").attr("aria-haspopup", "true");});</script> <![endif]--> <!--[if lt IE 9]> <script src="<?php echo get_template_directory_uri(); ?> /js/html5.js"></script> <script src="<?php echo get_template_directory_uri(); ?> /js/selectivizr-min.js"></script> <![endif]--> <!--[if IE 9]> <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?> /css/ie9.css" /> <![endif]--> <!--[if IE 8]> <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?> /css/ie8.css" /> <![endif]--> <!--[if IE 7]> <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?> /css/ie7.css" /> <![endif]--> <script type='text/javascript'> /* <![CDATA[ */ var tievar = {'go_to' : '<?php _e('Go to...', 'tie'); ?> '}; var tie = {"ajaxurl":"<?php echo admin_url('admin-ajax.php'); ?> " , "your_rating":"<?php _e('Your Rating:', 'tie'); ?> "}; /* ]]> */ </script> <?php global $is_IE; if ($is_IE) { ?> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <?php } if (tie_get_option('disable_responsive')) { ?> <meta name="viewport" content="width=1045" /> <?php } else { ?> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> <?php } echo "\n"; ?> <style type="text/css" media="screen"> <?php if (tie_get_option('modern_scrollbar')) { echo "::-webkit-scrollbar {width: 8px; height:8px; }\n"; } if (tie_get_option('theme_skin')) { tie_theme_color(tie_get_option('theme_skin')); } echo "\n"; if (tie_get_option('background_type') == 'pattern') { if (tie_get_option('background_pattern') || tie_get_option('background_pattern_color')) { ?> body { <?php if (tie_get_option('background_pattern_color')) { ?> background-color: <?php echo tie_get_option('background_pattern_color'); ?> !important; <?php } if (tie_get_option('background_pattern')) { ?> background-image : url(<?php echo get_template_directory_uri(); ?> /images/patterns/<?php echo tie_get_option('background_pattern'); ?> .png);<?php } ?> background-position: top center; } <?php } } elseif (tie_get_option('background_type') == 'custom') { $bg = tie_get_option('background'); if (tie_get_option('background_full')) { ?> .background-cover{<?php echo "\n"; ?> background-color:<?php echo $bg['color']; ?> !important; background-image : url('<?php echo $bg['img']; ?> ') !important;<?php echo "\n"; ?> filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $bg['img']; ?> ',sizingMethod='scale') !important;<?php echo "\n"; ?> -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $bg['img']; ?> ',sizingMethod='scale')" !important;<?php echo "\n"; ?> } <?php } else { ?> body{ <?php if (!empty($bg['color'])) { ?> background-color:<?php echo $bg['color']; ?> !important; <?php echo "\n"; } if (!empty($bg['img'])) { ?> background-image: url('<?php echo $bg['img']; ?> ') !important; <?php echo "\n"; } if (!empty($bg['repeat'])) { ?> background-repeat:<?php echo $bg['repeat']; ?> !important; <?php echo "\n"; } if (!empty($bg['attachment'])) { ?> background-attachment:<?php echo $bg['attachment']; ?> !important; <?php echo "\n"; } if (!empty($bg['hor']) || !empty($bg['ver'])) { ?> background-position:<?php echo $bg['hor']; ?> <?php echo $bg['ver']; ?> !important; <?php echo "\n"; } ?> } <?php } } foreach ($custom_typography as $selector => $value) { $option = tie_get_option($value); if (!empty($option['font']) || !empty($option['color']) || !empty($option['size']) || !empty($option['weight']) || !empty($option['style'])) { echo "\n" . $selector . "{\n"; if (!empty($option['font'])) { echo "\tfont-family: " . tie_get_font($option['font']) . ";\n"; } if (!empty($option['color'])) { echo "\tcolor :" . $option['color'] . ";\n"; } if (!empty($option['size'])) { echo "\tfont-size : " . $option['size'] . "px;\n"; } if (!empty($option['weight'])) { echo "\tfont-weight: " . $option['weight'] . ";\n"; } if (!empty($option['style'])) { echo "\tfont-style: " . $option['style'] . ";\n"; } ?> } <?php } } if (tie_get_option('global_color')) { tie_theme_color(tie_get_option('global_color')); } if (tie_get_option('highlighted_color')) { ?> ::-moz-selection { background: <?php echo tie_get_option('highlighted_color'); ?> ;} ::selection { background: <?php echo tie_get_option('highlighted_color'); ?> ; } <?php } if (tie_get_option('links_color') || tie_get_option('links_decoration')) { ?> a { <?php if (tie_get_option('links_color')) { echo 'color: ' . tie_get_option('links_color') . ';'; } ?> <?php if (tie_get_option('links_decoration')) { echo 'text-decoration: ' . tie_get_option('links_decoration') . ';'; } ?> } <?php } if (tie_get_option('links_color_hover') || tie_get_option('links_decoration_hover')) { ?> a:hover { <?php if (tie_get_option('links_color_hover')) { echo 'color: ' . tie_get_option('links_color_hover') . ';'; } ?> <?php if (tie_get_option('links_decoration_hover')) { echo 'text-decoration: ' . tie_get_option('links_decoration_hover') . ';'; } ?> } <?php } $topbar_bg = tie_get_option('topbar_background'); if (!empty($topbar_bg['img']) || !empty($topbar_bg['color'])) { ?> .top-nav, .top-nav ul ul {background:<?php if (!empty($topbar_bg['color'])) { echo $topbar_bg['color']; } ?> <?php if (!empty($topbar_bg['img'])) { ?> url('<?php echo $topbar_bg['img']; ?> ')<?php } ?> <?php if (!empty($topbar_bg['repeat'])) { echo $topbar_bg['repeat']; } ?> <?php if (!empty($topbar_bg['attachment'])) { echo $topbar_bg['attachment']; } ?> <?php if (!empty($topbar_bg['hor'])) { echo $topbar_bg['hor']; } ?> <?php if (!empty($topbar_bg['ver'])) { echo $topbar_bg['ver']; } ?> ;}<?php echo "\n"; } if (tie_get_option('topbar_links_color')) { ?> .top-nav ul li a , .top-nav ul ul a { <?php if (tie_get_option('topbar_links_color')) { echo 'color: ' . tie_get_option('topbar_links_color') . ' !important;'; } ?> } <?php } if (tie_get_option('topbar_links_color_hover')) { ?> .top-nav ul li a:hover, .top-nav ul li:hover > a, .top-nav ul :hover > a , .top-nav ul li.current-menu-item a { <?php if (tie_get_option('topbar_links_color_hover')) { echo 'color: ' . tie_get_option('topbar_links_color_hover') . ' !important;'; } ?> } <?php } if (tie_get_option('todaydate_background') || tie_get_option('todaydate_color')) { ?> .today-date { <?php if (tie_get_option('todaydate_background')) { echo 'background: ' . tie_get_option('todaydate_background') . ';'; } ?> <?php if (tie_get_option('todaydate_color')) { echo 'color: ' . tie_get_option('todaydate_color') . ';'; } ?> } <?php } $header_bg = tie_get_option('header_background'); if (!empty($header_bg['img']) || !empty($header_bg['color'])) { ?> header#theme-header {background:<?php if (!empty($header_bg['color'])) { echo $header_bg['color']; } ?> <?php if (!empty($header_bg['img'])) { ?> url('<?php echo $header_bg['img']; ?> ')<?php } ?> <?php if (!empty($header_bg['repeat'])) { echo $header_bg['repeat']; } ?> <?php if (!empty($header_bg['attachment'])) { echo $header_bg['attachment']; } ?> <?php if (!empty($header_bg['hor'])) { echo $header_bg['hor']; } ?> <?php if (!empty($header_bg['ver'])) { echo $header_bg['ver']; } ?> !important;}<?php echo "\n"; } if (tie_get_option('sub_nav_background')) { ?> #main-nav ul ul, #main-nav ul li.mega-menu .mega-menu-block {background-color:<?php echo tie_get_option('sub_nav_background') . ' !important;'; ?> ;}<?php echo "\n"; } if (tie_get_option('nav_links_color') || tie_get_option('nav_shadow_color')) { ?> #main-nav ul li a , #main-nav ul ul a , #main-nav ul.sub-menu a , #main-nav ul li.current-menu-item ul a, #main-nav ul li.current-menu-parent ul a, #main-nav ul li.current-page-ancestor ul a{ <?php if (tie_get_option('nav_links_color')) { echo 'color: ' . tie_get_option('nav_links_color') . ' !important;'; } ?> <?php if (tie_get_option('nav_shadow_color')) { echo 'text-shadow: 0 1px 1px ' . tie_get_option('nav_shadow_color') . ' !important;'; } ?> } <?php } if (tie_get_option('nav_links_color_hover') || tie_get_option('nav_shadow_color_hover')) { ?> #main-nav ul li a:hover, #main-nav ul li:hover > a, #main-nav ul :hover > a , #main-nav ul ul li:hover > a, #main-nav ul ul :hover > a { <?php if (tie_get_option('nav_links_color_hover')) { echo 'color: ' . tie_get_option('nav_links_color_hover') . ' !important;'; } ?> <?php if (tie_get_option('nav_shadow_color_hover')) { echo 'text-shadow: 0 1px 1px ' . tie_get_option('nav_shadow_color_hover') . ' !important;'; } ?> } <?php } if (tie_get_option('nav_current_links_color') || tie_get_option('nav_current_shadow_color')) { ?> #main-nav ul li.current-menu-item a { <?php if (tie_get_option('nav_current_links_color')) { echo 'color: ' . tie_get_option('nav_current_links_color') . ' !important;'; } ?> <?php if (tie_get_option('nav_current_shadow_color')) { echo 'text-shadow: 0 1px 1px ' . tie_get_option('nav_current_shadow_color') . ' !important;'; } ?> } <?php } if (tie_get_option('nav_sep1')) { ?> #main-nav ul li { border-color: <?php echo tie_get_option('nav_sep1'); ?> ; } #main-nav ul ul li, #main-nav ul ul li:first-child { border-top-color: <?php echo tie_get_option('nav_sep1'); ?> ; } #main-nav ul li .mega-menu-block ul.sub-menu { border-bottom-color: <?php echo tie_get_option('nav_sep1'); ?> ; } <?php } if (tie_get_option('nav_sep2')) { ?> #main-nav ul li a { border-left-color: <?php echo tie_get_option('nav_sep2'); ?> ; } #main-nav ul ul li, #main-nav ul ul li:first-child { border-bottom-color: <?php echo tie_get_option('nav_sep2'); ?> ; } <?php } $content_bg = tie_get_option('main_content_bg'); if (!empty($content_bg['img']) || !empty($content_bg['color'])) { ?> #main-content {background:<?php if (!empty($content_bg['color'])) { echo $content_bg['color']; } ?> <?php if (!empty($content_bg['img'])) { ?> url('<?php echo $content_bg['img']; ?> ')<?php } ?> <?php if (!empty($content_bg['repeat'])) { echo $content_bg['repeat']; } ?> <?php if (!empty($content_bg['attachment'])) { echo $content_bg['attachment']; } ?> <?php if (!empty($content_bg['hor'])) { echo $content_bg['hor']; } ?> <?php if (!empty($content_bg['ver'])) { echo $content_bg['ver']; } ?> ;}<?php echo "\n"; } $boxes_bg = tie_get_option('boxes_bg'); if (!empty($boxes_bg['img']) || !empty($boxes_bg['color'])) { ?> .cat-box-content, #sidebar .widget-container, .post-listing, .column2 li.first-news, .wide-box li.first-news {background:<?php if (!empty($boxes_bg['color'])) { echo $boxes_bg['color']; } ?> <?php if (!empty($boxes_bg['img'])) { ?> url('<?php echo $boxes_bg['img']; ?> ')<?php } ?> <?php if (!empty($boxes_bg['repeat'])) { echo $boxes_bg['repeat']; } ?> <?php if (!empty($boxes_bg['attachment'])) { echo $boxes_bg['attachment']; } ?> <?php if (!empty($boxes_bg['hor'])) { echo $boxes_bg['hor']; } ?> <?php if (!empty($boxes_bg['ver'])) { echo $boxes_bg['ver']; } ?> !important;}<?php echo "\n"; } if (tie_get_option('breaking_title_bg')) { ?> .breaking-news span {<?php if (tie_get_option('breaking_title_bg')) { echo 'background: ' . tie_get_option('breaking_title_bg') . ';'; } ?> } <?php } if (tie_get_option('post_links_color') || tie_get_option('post_links_decoration')) { ?> body.single .post .entry a, body.page .post .entry a { <?php if (tie_get_option('post_links_color')) { echo 'color: ' . tie_get_option('post_links_color') . ';'; } ?> <?php if (tie_get_option('post_links_decoration')) { echo 'text-decoration: ' . tie_get_option('post_links_decoration') . ';'; } ?> } <?php } if (tie_get_option('post_links_color_hover') || tie_get_option('post_links_decoration_hover')) { ?> body.single .post .entry a:hover, body.page .post .entry a:hover { <?php if (tie_get_option('post_links_color_hover')) { echo 'color: ' . tie_get_option('post_links_color_hover') . ';'; } ?> <?php if (tie_get_option('post_links_decoration_hover')) { echo 'text-decoration: ' . tie_get_option('post_links_decoration_hover') . ';'; } ?> } <?php } $footer_bg = tie_get_option('footer_background'); if (!empty($footer_bg['img']) || !empty($footer_bg['color'])) { ?> footer#theme-footer {background:<?php if (!empty($footer_bg['color'])) { echo $footer_bg['color']; } ?> <?php if (!empty($footer_bg['img'])) { ?> url('<?php echo $footer_bg['img']; ?> ')<?php } ?> <?php if (!empty($footer_bg['repeat'])) { echo $footer_bg['repeat']; } ?> <?php if (!empty($footer_bg['attachment'])) { echo $footer_bg['attachment']; } ?> <?php if (!empty($footer_bg['hor'])) { echo $footer_bg['hor']; } ?> <?php if (!empty($footer_bg['ver'])) { echo $footer_bg['ver']; } ?> ;}<?php echo "\n"; } if (tie_get_option('footer_title_color')) { ?> .footer-widget-top h3 { <?php if (tie_get_option('footer_title_color')) { echo 'color: ' . tie_get_option('footer_title_color') . ';'; } ?> } <?php } if (tie_get_option('footer_links_color')) { ?> footer a { <?php if (tie_get_option('footer_links_color')) { echo 'color: ' . tie_get_option('footer_links_color') . ' !important;'; } ?> } <?php } if (tie_get_option('footer_links_color_hover')) { ?> footer a:hover {<?php if (tie_get_option('footer_links_color_hover')) { echo 'color: ' . tie_get_option('footer_links_color_hover') . ' !important;'; } ?> } <?php } global $post; if (is_category() || is_singular() || function_exists('is_woocommerce') && is_woocommerce()) { if (is_category()) { $category_id = get_query_var('cat'); $cat_options = get_option("tie_cat_{$category_id}"); if (!empty($cat_options['cat_background'])) { $cat_bg = $cat_options['cat_background']; } if (!empty($cat_options['cat_color'])) { $cat_color = $cat_options['cat_color']; } if (!empty($cat_options['cat_background_full'])) { $cat_full = $cat_options['cat_background_full']; } } if (is_singular() || function_exists('is_woocommerce') && is_woocommerce()) { $current_ID = $post->ID; if (function_exists('is_woocommerce') && is_woocommerce()) { $current_ID = woocommerce_get_page_id('shop'); } $get_meta = get_post_custom($current_ID); if (!empty($get_meta["post_color"][0])) { $cat_color = $get_meta["post_color"][0]; } if (!empty($get_meta["post_background"][0])) { $cat_bg = unserialize($get_meta["post_background"][0]); } if (!empty($get_meta["post_background_full"][0])) { $cat_full = $get_meta['post_background_full']; } $categories = get_the_category($post->ID); $category_id = $categories[0]->term_id; $cat_options = get_option("tie_cat_{$category_id}"); if (empty($cat_color) && !empty($cat_options['cat_color'])) { $cat_color = $cat_options['cat_color']; } if (empty($cat_full) && !empty($cat_options['cat_background_full'])) { $cat_full = $cat_options['cat_background_full']; } if (empty($cat_bg['color']) && empty($cat_bg['img']) && !empty($cat_bg['cat_background'])) { $cat_bg = $cat_options['cat_background']; } } if ($cat_bg['color'] || $cat_bg['img']) { if ($cat_full) { ?> .background-cover{<?php echo "\n"; ?> background-color:<?php echo $cat_bg['color']; ?> !important; background-image : url('<?php echo $cat_bg['img']; ?> ') !important;<?php echo "\n"; ?> filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $cat_bg['img']; ?> ',sizingMethod='scale') !important;<?php echo "\n"; ?> -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $cat_bg['img']; ?> ',sizingMethod='scale')" !important;<?php echo "\n"; ?> } <?php } else { ?> body{ <?php if (!empty($cat_bg['color'])) { ?> background-color:<?php echo $cat_bg['color']; ?> !important; <?php echo "\n"; } if (!empty($cat_bg['img'])) { ?> background-image: url('<?php echo $cat_bg['img']; ?> ') !important; <?php echo "\n"; } if (!empty($cat_bg['repeat'])) { ?> background-repeat:<?php echo $cat_bg['repeat']; ?> !important; <?php echo "\n"; } if (!empty($cat_bg['attachment'])) { ?> background-attachment:<?php echo $cat_bg['attachment']; ?> !important; <?php echo "\n"; } if (!empty($cat_bg['hor']) || !empty($cat_bg['ver'])) { ?> background-position:<?php echo $cat_bg['hor']; ?> <?php echo $cat_bg['ver']; ?> !important; <?php echo "\n"; } ?> }<?php echo "\n"; } } if (!empty($cat_color)) { tie_theme_color($cat_color); } } $css_code = str_replace("<pre>", "", htmlspecialchars_decode(tie_get_option('css'))); echo $css_code = str_replace("</pre>", "", $css_code), "\n"; if (tie_get_option('css_tablets')) { ?> @media only screen and (max-width: 985px) and (min-width: 768px){ <?php $css_code1 = str_replace("<pre>", "", htmlspecialchars_decode(tie_get_option('css_tablets'))); echo $css_code1 = str_replace("</pre>", "", $css_code1), "\n"; ?> } <?php } if (tie_get_option('css_wide_phones')) { ?> @media only screen and (max-width: 767px) and (min-width: 480px){ <?php $css_code2 = str_replace("<pre>", "", htmlspecialchars_decode(tie_get_option('css_wide_phones'))); echo $css_code2 = str_replace("</pre>", "", $css_code2), "\n"; ?> } <?php } if (tie_get_option('css_phones')) { ?> @media only screen and (max-width: 479px) and (min-width: 320px){ <?php $css_code3 = str_replace("<pre>", "", htmlspecialchars_decode(tie_get_option('css_phones'))); echo $css_code3 = str_replace("</pre>", "", $css_code3), "\n"; ?> } <?php } ?> </style> <?php if (tie_get_option('apple_iPad_retina')) { ?> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php echo tie_get_option('apple_iPad_retina'); ?> " /> <?php } if (tie_get_option('apple_iphone_retina')) { ?> <link rel="apple-touch-icon-precomposed" sizes="120x120" href="<?php echo tie_get_option('apple_iphone_retina'); ?> " /> <?php } if (tie_get_option('apple_iPad')) { ?> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo tie_get_option('apple_iPad'); ?> " /> <?php } if (tie_get_option('apple_iphone')) { ?> <link rel="apple-touch-icon-precomposed" href="<?php echo tie_get_option('apple_iphone'); ?> " /> <?php } echo htmlspecialchars_decode(tie_get_option('header_code')), "\n"; }
function tie_wp_head() { global $custom_typography, $is_IE; ?> <!--[if IE]> <script type="text/javascript">jQuery(document).ready(function (){ jQuery(".menu-item").has("ul").children("a").attr("aria-haspopup", "true");});</script> <![endif]--> <!--[if lt IE 9]> <script src="<?php echo get_template_directory_uri(); ?> /js/html5.js"></script> <script src="<?php echo get_template_directory_uri(); ?> /js/selectivizr-min.js"></script> <![endif]--> <!--[if IE 9]> <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?> /css/ie9.css" /> <![endif]--> <!--[if IE 8]> <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?> /css/ie8.css" /> <![endif]--> <!--[if IE 7]> <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri(); ?> /css/ie7.css" /> <![endif]--> <?php if ($is_IE) { echo '<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />'; } ?> <?php if (tie_get_option('disable_responsive')) { echo '<meta name="viewport" content="width=1045" />'; } else { echo '<meta name="viewport" content="width=device-width, initial-scale=1.0" />'; } ?> <?php if (tie_get_option('apple_iPad_retina')) { ?> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php echo tie_get_option('apple_iPad_retina'); ?> " /> <?php } if (tie_get_option('apple_iphone_retina')) { ?> <link rel="apple-touch-icon-precomposed" sizes="120x120" href="<?php echo tie_get_option('apple_iphone_retina'); ?> " /> <?php } if (tie_get_option('apple_iPad')) { ?> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo tie_get_option('apple_iPad'); ?> " /> <?php } if (tie_get_option('apple_iphone')) { ?> <link rel="apple-touch-icon-precomposed" href="<?php echo tie_get_option('apple_iphone'); ?> " /> <?php } ?> <?php // Custom Header Code echo htmlspecialchars_decode(tie_get_option('header_code')), "\n"; ?> <style type="text/css" media="screen"> <?php //Fonts foreach ($custom_typography as $selector => $value) { $option = tie_get_option($value); if (!empty($option['font']) || !empty($option['color']) || !empty($option['size']) || !empty($option['weight']) || !empty($option['style'])) { echo $selector . "{\n"; if (!empty($option['font'])) { echo "\tfont-family: " . tie_get_font($option['font']) . ";\n"; } if (!empty($option['color'])) { echo "\tcolor :" . $option['color'] . ";\n"; } if (!empty($option['size'])) { echo "\tfont-size : " . $option['size'] . "px;\n"; } if (!empty($option['weight'])) { echo "\tfont-weight: " . $option['weight'] . ";\n"; } if (!empty($option['style'])) { echo "\tfont-style: " . $option['style'] . ";\n"; } ?> } <?php } } // Modern Scrollbar -------------------------------------------------------------- */ if (tie_get_option('modern_scrollbar')) { ?> ::-webkit-scrollbar { width: 8px; height:8px; } <?php } //highlighted color --------------------------------------------------------------------------- */ if (tie_get_option('highlighted_color')) { ?> ::-moz-selection { background: <?php echo tie_get_option('highlighted_color'); ?> ;} ::selection { background: <?php echo tie_get_option('highlighted_color'); ?> ; } <?php } // Theme Skin --------------------------------------------------------------------- */ if (tie_get_option('global_color')) { tie_theme_color(tie_get_option('global_color')); } elseif (tie_get_option('theme_skin')) { tie_theme_color(tie_get_option('theme_skin')); } // Bg Pattern ------------------------------------------------------------------------- */ if (tie_get_option('background_type') == 'pattern') { if (tie_get_option('background_pattern') || tie_get_option('background_pattern_color')) { ?> body { <?php if (tie_get_option('background_pattern_color')) { ?> background-color: <?php echo tie_get_option('background_pattern_color'); ?> !important; <?php } if (tie_get_option('background_pattern')) { ?> background-image : url(<?php echo get_template_directory_uri(); ?> /images/patterns/<?php echo tie_get_option('background_pattern'); ?> .png); <?php } ?> background-position: top center; } <?php } // Custom Bg ------------------------------------------------------------------------- */ } elseif (tie_get_option('background_type') == 'custom') { $bg = tie_get_option('background'); if (tie_get_option('background_full')) { ?> .background-cover{ background-color:<?php echo $bg['color']; ?> !important; background-image : url('<?php echo $bg['img']; ?> ') !important;<?php echo "\n"; ?> filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $bg['img']; ?> ',sizingMethod='scale') !important;<?php echo "\n"; ?> -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $bg['img']; ?> ',sizingMethod='scale')" !important;<?php echo "\n"; ?> } <?php } else { ?> body{ <?php if (!empty($bg['color'])) { ?> background-color:<?php echo $bg['color']; ?> !important; <?php echo "\n"; } ?> <?php if (!empty($bg['img'])) { ?> background-image: url('<?php echo $bg['img']; ?> ') !important; <?php echo "\n"; } ?> <?php if (!empty($bg['repeat'])) { ?> background-repeat:<?php echo $bg['repeat']; ?> !important; <?php echo "\n"; } ?> <?php if (!empty($bg['attachment'])) { ?> background-attachment:<?php echo $bg['attachment']; ?> !important; <?php echo "\n"; } ?> <?php if (!empty($bg['hor']) || !empty($bg['ver'])) { ?> background-position:<?php echo $bg['hor']; ?> <?php echo $bg['ver']; ?> !important; <?php echo "\n"; } ?> } <?php } } // Links ------------------------------------------------------------------------- */ $links_styling = array("a" => array('color' => 'links_color', 'decoration' => 'links_decoration'), "a:hover" => array('color' => 'links_color_hover', 'decoration' => 'links_decoration_hover'), "body.single .post .entry a, body.page .post .entry a" => array('color' => 'post_links_color', 'decoration' => 'post_links_decoration'), "body.single .post .entry a:hover, body.page .post .entry a:hover" => array('color' => 'post_links_color_hover', 'decoration' => 'post_links_decoration_hover')); foreach ($links_styling as $selector => $values) { if (tie_get_option($values["color"]) || tie_get_option($values["decoration"])) { echo "\n" . $selector . " {\n"; if (tie_get_option($values["color"])) { echo "\tcolor: " . tie_get_option($values["color"]) . ";\n"; } if (tie_get_option($values["decoration"])) { echo "\ttext-decoration: " . tie_get_option($values["decoration"]) . ";\n"; } echo '} '; } } // Colors ------------------------------------------------------------------------- */ $colors_styling = array(".top-nav ul li a:hover, .top-nav ul li:hover > a, .top-nav ul :hover > a , .top-nav ul li.current-menu-item a" => 'topbar_links_color_hover', "#main-nav ul li a:hover, #main-nav ul li:hover > a, #main-nav ul :hover > a , #main-nav ul ul li:hover > a, #main-nav ul ul :hover > a" => 'nav_links_color_hover', "#main-nav ul li a, #main-nav ul ul a, #main-nav ul.sub-menu a, #main-nav ul li.current_page_parent ul a, #main-nav ul li.current-menu-item ul a, #main-nav ul li.current-menu-parent ul a, #main-nav ul li.current-page-ancestor ul a" => 'nav_links_color', "#main-nav ul li.current-menu-item a, #main-nav ul li.current_page_parent a" => 'nav_current_links_color', ".today-date " => 'todaydate_color', ".top-nav ul li a , .top-nav ul ul a" => 'topbar_links_color', ".footer-widget-top h4" => 'footer_title_color', "#theme-footer a" => 'footer_links_color', "#theme-footer a:hover" => 'footer_links_color_hover'); foreach ($colors_styling as $selector => $values) { if (tie_get_option($values)) { echo "\n" . $selector . " {\n"; echo "\tcolor: " . tie_get_option($values) . ";\n"; echo '} '; } } // Background ------------------------------------------------------------------------- */ $bg_styling = array(".top-nav, .top-nav ul ul" => 'topbar_background', "#theme-header" => 'header_background', "#theme-footer" => 'footer_background', ".cat-box-content, #sidebar .widget-container, .post-listing, .column2 li.first-news, .wide-box li.first-news, #commentform " => 'boxes_bg'); foreach ($bg_styling as $selector => $values) { $item_bg = tie_get_option($values); if (!empty($item_bg['img']) || !empty($item_bg['color'])) { echo "\n" . $selector . " {\n"; ?> <?php if (!empty($item_bg['color'])) { ?> background-color:<?php echo $item_bg['color']; ?> !important; <?php echo "\n"; } ?> <?php if (!empty($item_bg['img'])) { ?> background-image: url('<?php echo $item_bg['img']; ?> ') !important; <?php echo "\n"; } ?> <?php if (!empty($item_bg['repeat'])) { ?> background-repeat:<?php echo $item_bg['repeat']; ?> !important; <?php echo "\n"; } ?> <?php if (!empty($item_bg['attachment'])) { ?> background-attachment:<?php echo $item_bg['attachment']; ?> !important; <?php echo "\n"; } ?> <?php if (!empty($item_bg['hor']) || !empty($item_bg['ver'])) { ?> background-position:<?php echo $item_bg['hor']; ?> <?php echo $item_bg['ver']; ?> !important; <?php echo "\n"; } ?> } <?php } } // Custom Social Networks colors ----------------------------------------------------------------- */ for ($i = 1; $i <= 5; $i++) { if (tie_get_option("custom_social_icon_{$i}") && tie_get_option("custom_social_url_{$i}") && tie_get_option("custom_social_color_{$i}")) { ?> .social-icons.social-colored .<?php echo tie_get_option("custom_social_icon_{$i}"); ?> :before { background: <?php echo tie_get_option("custom_social_color_{$i}"); ?> ; } <?php } } // Main Nav Styles ----------------------------------------------------------------- */ if (tie_get_option('main_nav_background') || tie_get_option('main_nav_border')) { ?> #main-nav { <?php if (tie_get_option('main_nav_background')) { echo 'background: ' . tie_get_option('main_nav_background') . ';'; } ?> <?php if (tie_get_option('main_nav_border')) { echo 'box-shadow: inset -1px -5px 0px -1px ' . tie_get_option('main_nav_border') . ';'; } ?> } <?php } // Main Nav Sub menus -------------------------------------------------------------- */ if (tie_get_option('sub_nav_background')) { ?> #main-nav ul ul, #main-nav ul li.mega-menu .mega-menu-block { background-color:<?php echo tie_get_option('sub_nav_background') . ' !important;'; ?> }<?php echo "\n"; } // Separators --------------------------------------------------------------------- */ if (tie_get_option('nav_sep1')) { ?> #main-nav ul li { border-color: <?php echo tie_get_option('nav_sep1'); ?> ; } #main-nav ul ul li, #main-nav ul ul li:first-child { border-top-color: <?php echo tie_get_option('nav_sep1'); ?> ; } #main-nav ul li .mega-menu-block ul.sub-menu { border-bottom-color: <?php echo tie_get_option('nav_sep1'); ?> ; } <?php } if (tie_get_option('nav_sep2')) { ?> #main-nav ul li a { border-left-color: <?php echo tie_get_option('nav_sep2'); ?> ; } #main-nav ul ul li, #main-nav ul ul li:first-child { border-bottom-color: <?php echo tie_get_option('nav_sep2'); ?> ; } <?php } // Content Bg --------------------------------------------------------------------- */ $content_bg = tie_get_option('main_content_bg'); if (!empty($content_bg['img']) || !empty($content_bg['color'])) { $content_class = "\n#wrapper, #wrapper.wide-layout, #wrapper.boxed-all"; if (tie_get_option('theme_layout') == 'boxed') { $content_class = "\n#main-content"; } echo $content_class; ?> { background:<?php if (!empty($content_bg['color'])) { echo $content_bg['color']; } ?> <?php if (!empty($content_bg['img'])) { ?> url('<?php echo $content_bg['img']; ?> ')<?php } ?> <?php if (!empty($content_bg['repeat'])) { echo $content_bg['repeat']; } ?> <?php if (!empty($content_bg['attachment'])) { echo $content_bg['attachment']; } ?> <?php if (!empty($content_bg['hor'])) { echo $content_bg['hor']; } ?> <?php if (!empty($content_bg['ver'])) { echo $content_bg['ver']; } ?> ;}<?php echo "\n"; } // Breaking News --------------------------------------------------------------------- */ if (tie_get_option('breaking_title_bg')) { ?> .breaking-news span.breaking-news-title {<?php if (tie_get_option('breaking_title_bg')) { echo 'background: ' . tie_get_option('breaking_title_bg') . ';'; } ?> } <?php } // Show Cat Colors in the News Blocks -------------------------------------------------- */ if (tie_get_option('homepage_cats_colors')) { $tie_cats_options = get_option('tie_cats_options'); if (!empty($tie_cats_options) && is_array($tie_cats_options)) { foreach ($tie_cats_options as $cat => $options) { if (!empty($options['cat_color'])) { $cat_custom_color = $options['cat_color']; ?> .tie-cat-<?php echo $cat; ?> a.more-link {background-color:<?php echo $cat_custom_color; ?> ;} .tie-cat-<?php echo $cat; ?> .cat-box-content {border-bottom-color:<?php echo $cat_custom_color; ?> ; } <?php } } } } // Categories Custom Bg and color ----------------------------------------------------- */ global $post; if (is_category() || is_singular() || function_exists('is_woocommerce') && is_woocommerce()) { if (is_category()) { $tie_cats_options = get_option('tie_cats_options'); $category_id = get_query_var('cat'); if (!empty($tie_cats_options[$category_id])) { $cat_options = $tie_cats_options[$category_id]; } if (!empty($cat_options['cat_background'])) { $cat_bg = $cat_options['cat_background']; } if (!empty($cat_options['cat_color'])) { $cat_color = $cat_options['cat_color']; } if (!empty($cat_options['cat_background_full'])) { $cat_full = $cat_options['cat_background_full']; } } if (is_singular() || function_exists('is_woocommerce') && is_woocommerce()) { $current_ID = $post->ID; if (function_exists('is_woocommerce') && is_woocommerce()) { $current_ID = woocommerce_get_page_id('shop'); } $get_meta = get_post_custom($current_ID); if (!empty($get_meta["post_color"][0])) { $cat_color = $get_meta["post_color"][0]; } if (!empty($get_meta["post_background"][0])) { $cat_bg = unserialize($get_meta["post_background"][0]); } if (!empty($get_meta["post_background_full"][0])) { $cat_full = $get_meta['post_background_full']; } if (is_single()) { $tie_cats_options = get_option('tie_cats_options'); $categories = get_the_category($current_ID); $category_id = $categories[0]->term_id; if (!empty($tie_cats_options[$category_id])) { $cat_options = $tie_cats_options[$category_id]; } if (empty($cat_color) && !empty($cat_options['cat_color'])) { $cat_color = $cat_options['cat_color']; } if (empty($cat_full) && !empty($cat_options['cat_background_full'])) { $cat_full = $cat_options['cat_background_full']; } if (empty($cat_bg['color']) && empty($cat_bg['img']) && !empty($cat_options['cat_background'])) { $cat_bg = $cat_options['cat_background']; } } } if (!empty($cat_bg['color']) || !empty($cat_bg['img'])) { if ($cat_full) { ?> .background-cover{<?php echo "\n"; ?> background-color:<?php echo $cat_bg['color']; ?> !important; background-image : url('<?php echo $cat_bg['img']; ?> ') !important;<?php echo "\n"; ?> filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $cat_bg['img']; ?> ',sizingMethod='scale') !important;<?php echo "\n"; ?> -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $cat_bg['img']; ?> ',sizingMethod='scale')" !important;<?php echo "\n"; ?> } <?php } else { ?> body{ <?php if (!empty($cat_bg['color'])) { ?> background-color:<?php echo $cat_bg['color']; ?> !important; <?php echo "\n"; } if (!empty($cat_bg['img'])) { ?> background-image: url('<?php echo $cat_bg['img']; ?> ') !important; <?php echo "\n"; } if (!empty($cat_bg['repeat'])) { ?> background-repeat:<?php echo $cat_bg['repeat']; ?> !important; <?php echo "\n"; } if (!empty($cat_bg['attachment'])) { ?> background-attachment:<?php echo $cat_bg['attachment']; ?> !important; <?php echo "\n"; } if (!empty($cat_bg['hor']) || !empty($cat_bg['ver'])) { ?> background-position:<?php echo $cat_bg['hor']; ?> <?php echo $cat_bg['ver']; ?> !important; <?php echo "\n"; } ?> }<?php echo "\n"; } } if (!empty($cat_color)) { tie_theme_color($cat_color); } } $pre_code = array("<pre>", "</pre>"); // Custom CSS Codes ----------------------------------------------------- */ echo "\n" . str_replace($pre_code, "", htmlspecialchars_decode(tie_get_option('css'))); if (tie_get_option('css_tablets')) { ?> @media only screen and (max-width: 985px) and (min-width: 768px){ <?php echo "\t" . str_replace($pre_code, "", htmlspecialchars_decode(tie_get_option('css_tablets'))); ?> } <?php } if (tie_get_option('css_wide_phones')) { ?> @media only screen and (max-width: 767px) and (min-width: 480px){ <?php echo "\t" . str_replace($pre_code, "", htmlspecialchars_decode(tie_get_option('css_wide_phones'))); ?> } <?php } if (tie_get_option('css_phones')) { ?> @media only screen and (max-width: 479px) and (min-width: 320px){ <?php echo "\t" . str_replace($pre_code, "", htmlspecialchars_decode(tie_get_option('css_phones'))); ?> } <?php } ?> </style> <?php }