/** * Get Page Custom Options CSS * * @since roen 1.0 */ function roen_get_page_custom_options_css() { if (class_exists('woocommerce') && is_shop() || is_page() || is_single() || is_home() || is_front_page()) { if (class_exists('woocommerce') && is_shop()) { $post_id = woocommerce_get_page_id('shop'); } else { if (is_home() && !is_front_page() && intval(get_option('page_for_posts')) > 0) { $post_id = get_option('page_for_posts'); } else { $post_id = get_the_ID(); } } $options = get_post_custom($post_id); ?> <style id="roen-custom-page-css" type="text/css"> <?php roen_add_background_style('page', 'body.boxed-layout', 1, false, $options); roen_add_background_style('page-header', '#header-wrap', 1, false, $options); roen_add_background_style('page-title', '#page-header-wrap', 1, false, $options); roen_add_background_style('page-content', '#page-content-wrap', 1, false, $options); roen_add_background_style('page-footer', '#footer-wrap', 1, false, $options); if (intval(penguin_get_post_meta_key('page-sticky-type', $post_id, 0)) == 1) { ?> @media (min-width: 768px) { <?php if (penguin_get_post_meta_key('page-sticky-bg-image', $post_id) != '') { ?> #page-header-wrap { background: url(<?php echo esc_url(penguin_get_post_meta_key('page-sticky-bg-image', $post_id)); ?> ) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } <?php } if (intval(penguin_get_post_meta_key('page-sticky-title-padding-top', $post_id)) >= 0 && intval(penguin_get_post_meta_key('page-sticky-title-padding-bottom', $post_id)) >= 0) { ?> #page-header-wrap.page-sticky-with-title #page-header {padding:<?php echo intval(penguin_get_post_meta_key('page-sticky-title-padding-top', $post_id)); ?> px 0 <?php echo intval(penguin_get_post_meta_key('page-sticky-title-padding-bottom', $post_id)); ?> px;} } <?php } if (penguin_get_post_meta_key('page-sticky-title-breadcrumb', $post_id) == 'on') { ?> #page-header-wrap.page-sticky-with-title #page-header .page-header-content #page-breadcrumb {display:none;} <?php } } if (penguin_get_post_meta_key('post-css-style', $post_id) != "") { echo penguin_get_post_meta_key('post-css-style', $post_id); } ?> @media only screen and (-Webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (min-device-pixel-ratio: 1.5) { <?php roen_add_background_style('page', 'body.boxed-layout', 1, true, $options); roen_add_background_style('page-header', '#header-wrap', 1, true, $options); roen_add_background_style('page-title', '#page-header-wrap', 1, true, $options); roen_add_background_style('page-content', '#page-content-wrap', 1, true, $options); roen_add_background_style('page-footer', '#footer-wrap', 1, true, $options); if (penguin_get_post_meta_key('post-css-retina-style', $post_id) != "") { echo penguin_get_post_meta_key('post-css-retina-style', $post_id); } ?> } </style> <?php } }
roen_add_background_style('global-footer', '#footer-wrap'); ?> /* ---------------------------------------------------------------------------------------------- RETINA ---------------------------------------------------------------------------------------------- */ @media only screen and (-Webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (min-device-pixel-ratio: 1.5) { <?php /* body */ if (intval(penguin_get_options_key('global-layout')) != 1) { roen_add_background_style('global', 'body.boxed-layout', 0, true); } /* header */ roen_add_background_style('global-header', '#roen-header', 0, true); /* title */ roen_add_background_style('global-title', '#page-header-wrap', 0, true); /* content */ roen_add_background_style('global-content', '#page-content-wrap', 0, true); /* footer */ roen_add_background_style('global-footer', '#footer-wrap', 0, true); ?> } <?php } /* search */ roen_add_background_style('search', '#search-form-wrap');