File: /var/www/html/nsci/wp-content/themes/soledad/inc/template-function-critical-backup.php
<?php
add_filter('hpp_critical_css', function($css, $file){
$demo_header = isset( $_GET['header'] ) ? esc_html( trim( $_GET['header'] ) ) : '';
$css .= '#navigation.header-layout-bottom{box-shadow: 0px 0px 0px transparent;border-top: 1px solid #ECECEC;}@media only screen and (min-width: 961px){#navigation .menu { display: inline-block !important; }#navigation.header-6 .container{text-align: right;}}@media only screen and (min-width: 1170px){.penci-headline .pctopbar-item:last-child:not(:first-child){float: right;}}.penci-mag-featured-content,.overlay-icon-format{opacity: 0;}#navigation ul.menu > li.menu-item-has-children > a:after, #navigation ul.menu > li.penci-mega-menu > a:after{width: 9xp;}.penci-post-gallery-container .caption { opacity:0; }.penci-owl-carousel:not(.owl-loaded){display:block}.penci-owl-carousel:not(.owl-loaded)>div,.penci-owl-carousel:not(.owl-loaded)>img,.penci-owl-carousel:not(.owl-loaded)>figure,.penci-owl-carousel:not(.owl-loaded) .penci-featured-content-right{display:none}.penci-owl-carousel:not(.owl-loaded)>div:first-child,.penci-owl-carousel:not(.owl-loaded)>figure:first-child,.penci-owl-carousel:not(.owl-loaded)>img:first-child{display:block}.featured-style-2 .penci-owl-carousel:not(.owl-loaded)>.item{width:900px;margin-left:auto;margin-right:auto}.featured-style-38 .penci-owl-carousel:not(.owl-loaded)>.item{width:450px;width:25vw;margin-left:auto;margin-right:auto;position:relative}@media only screen and (max-width:1200px){.featured-style-38 .penci-owl-carousel:not(.owl-loaded)>.item{width:400px}}@media only screen and (max-width:960px){.featured-style-2 .penci-owl-carousel:not(.owl-loaded)>.item{width:760px}}@media only screen and (max-width:767px){.featured-style-2 .penci-owl-carousel:not(.owl-loaded)>.item{width:480px}}@media only screen and (max-width:479px){.featured-style-2 .penci-owl-carousel:not(.owl-loaded)>.item,.featured-style-38 .penci-owl-carousel:not(.owl-loaded)>.item{width:360px}}.penci-owl-carousel:not(.owl-loaded) .penci-featured-content{display:none}.penci-owl-carousel:not(.owl-loaded):before,.penci-owl-carousel:not(.owl-loaded):after{content:"";clear:both;display:table}.penci-owl-carousel.penci-headline-posts:not(.owl-loaded):before,.penci-owl-carousel.penci-headline-posts:not(.owl-loaded):after{content:none;clear:none;display:none}@media only screen and (min-width:1170px){.penci-owl-carousel:not(.owl-loaded)[data-item="4"]>div{width:25%;float:left}.penci-owl-carousel:not(.owl-loaded)[data-item="4"]>div:nth-child(2),.penci-owl-carousel:not(.owl-loaded)[data-item="4"]>div:nth-child(3),.penci-owl-carousel:not(.owl-loaded)[data-item="4"]>div:nth-child(4){display:block}.penci-owl-carousel:not(.owl-loaded)[data-item="3"]>div{width:33.3333%;float:left}.penci-owl-carousel:not(.owl-loaded)[data-item="3"]>div:nth-child(2),.penci-owl-carousel:not(.owl-loaded)[data-item="3"]>div:nth-child(3){display:block}.penci-owl-carousel:not(.owl-loaded)[data-item="2"]>div{width:50%;float:left}.penci-owl-carousel:not(.owl-loaded)[data-item="2"]>div:nth-child(2){display:block}}@media only screen and (max-width:1169px) and (min-width:769px){.penci-owl-carousel:not(.owl-loaded)[data-tablet="4"]>div{width:25%;float:left}.penci-owl-carousel:not(.owl-loaded)[data-tablet="4"]>div:nth-child(2),.penci-owl-carousel:not(.owl-loaded)[data-tablet="4"]>div:nth-child(3),.penci-owl-carousel:not(.owl-loaded)[data-tablet="4"]>div:nth-child(4){display:block}.penci-owl-carousel:not(.owl-loaded)[data-tablet="3"]>div{width:33.3333%;float:left}.penci-owl-carousel:not(.owl-loaded)[data-tablet="3"]>div:nth-child(2),.penci-owl-carousel:not(.owl-loaded)[data-tablet="3"]>div:nth-child(3){display:block}.penci-owl-carousel:not(.owl-loaded)[data-tablet="2"]>div{width:50%;float:left}.penci-owl-carousel:not(.owl-loaded)[data-tablet="2"]>div:nth-child(2){display:block}}@media only screen and (max-width:768px) and (min-width:481px){.penci-owl-carousel:not(.owl-loaded)[data-tabsmall="4"]>div{width:25%;float:left}.penci-owl-carousel:not(.owl-loaded)[data-tabsmall="4"]>div:nth-child(2),.penci-owl-carousel:not(.owl-loaded)[data-tabsmall="4"]>div:nth-child(3),.penci-owl-carousel:not(.owl-loaded)[data-tabsmall="4"]>div:nth-child(4){display:block}.penci-owl-carousel:not(.owl-loaded)[data-tabsmall="3"]>div{width:33.3333%;float:left}.penci-owl-carousel:not(.owl-loaded)[data-tabsmall="3"]>div:nth-child(2),.penci-owl-carousel:not(.owl-loaded)[data-tabsmall="3"]>div:nth-child(3){display:block}.penci-owl-carousel:not(.owl-loaded)[data-tabsmall="2"]>div{width:50%;float:left}.penci-owl-carousel:not(.owl-loaded)[data-tabsmall="2"]>div:nth-child(2){display:block}}.penci-go-to-top-floating{transform:translate3d(0,60px,0);-webkit-transform:translate3d(0,60px,0)}.penci-rlt-popup{-webkit-transform:translate(0,100%);transform:translate(0,100%)}.pctopbar-login-btn{display:inline-block;vertical-align:top;}@media only screen and (min-width: 1170px){.penci-top-bar{height: 32px;}}';
if( 'header-3' == get_theme_mod( 'penci_header_layout' ) ){
$css .= '#header .inner-header{height: 155px;}@media only screen and (max-width: 479px){#header .inner-header { height: 207px; }}';
}
if( 'header-4' == $demo_header || 'header-5' == $demo_header ){
$css .= '#navigation.header-4 .main-nav-social, #navigation.header-5 .main-nav-social { float: none; vertical-align: top; margin: 0 0 0 30px; }#navigation.header-4 .pcheader-icon, #navigation.header-5 .pcheader-icon{margin-left: 15px;}';
}
if( 'header-6' == $demo_header || 'header-9' == $demo_header ) {
$css .= '#navigation.header-6 #logo { float: left; display: block; text-align: left; }#navigation.header-6 #logo img{padding: 12px 0; max-height: 80px; width: auto;}#navigation.header-6 .menu { float: none; } @media only screen and (min-width: 961px){ #navigation.header-6 { height: 82px; } #navigation.header-6 .menu > li > a, #navigation.header-6 ul.menu > li > a { line-height: 80px; } #navigation.header-6 .penci-menuhbg-toggle, #navigation.header-6 .show-search { height: 80px; } #navigation.header-6 .pcheader-icon > a, #navigation.header-6 .show-search a.close-search { height: 80px; line-height: 80px; }.main-nav-social{ line-height: 80px; margin-left: 30px; } } #navigation.header-6 .penci-menuhbg-toggle,#navigation.header-6 .pcheader-icon { margin-left: 15px; }';
}
if( 'header-3' == $demo_header ){
$css .= '.container.align-left-logo #logo { text-align: left; }.container.has-banner .header-banner{text-align: right;}.penci-top-bar{ background: #313131; height: auto; overflow: hidden;}@media only screen and (min-width: 1170px){ .penci-top-bar { height: 32px; } }.container.has-banner .header-banner img{max-height: 95px;}.penci-headline .pctopbar-item { display: inline-block; margin: 0 15px; float: left; line-height: 32px; color: #fff; } .penci-headline .pctopbar-item:first-child { margin-left: 0; } @media only screen and (min-width: 1170px){ .penci-headline .pctopbar-item:last-child:not(:first-child) { float: right; } } .penci-topbar-social > div { display: inline-block; vertical-align: top; } .penci-topbar-social a { float: left; display: inline-block; vertical-align: top; margin-left: 13px; font-size: 13px; color: #fff; line-height: 32px; } .penci-topbar-social a:first-child { margin-left: 0; } ul.penci-topbar-menu { display: inline-block; vertical-align: top; padding: 0; margin: 0; } ul.penci-topbar-menu > li{ display: inline-block; float: left; margin-right: 20px; } ul.penci-topbar-menu>li a { color: #fff; background: 0 0; font-size: 11px; text-transform: uppercase; line-height: 32px; display: inline-block; vertical-align: top; } .penci-topbar-trending { display: inline-block; float: left; overflow: hidden; width: 100%; max-width: 420px; text-align: left; text-overflow: ellipsis; white-space: nowrap; } @media only screen and (max-width: 767px){ .penci-top-bar .pctopbar-item.penci-topbar-trending { display: none; } } .headline-title { height: 32px; line-height: 32px; padding: 0 15px; font-size: 12px; color: #fff; float: left; text-transform: uppercase; z-index: 10; position: relative; display: inline-block; } .penci-topbar-trending .penci-trending-nav { float: left; position: relative; z-index: 100; padding-left: 8px; padding-right: 8px; width: 51px; } .penci-trending-nav a { font-size: 16px; line-height: inherit; padding-left: 5px; padding-right: 5px; cursor: pointer; display: inline-block; vertical-align: top; text-decoration: none !important; color: #999; position: relative; width: 15px; } .penci-headline-posts.penci-owl-carousel:not(.owl-loaded) { display: none; }ul.penci-topbar-menu > li:last-child { margin-right: 0; } @media only screen and (max-width: 1169px){ .penci-headline { text-align: center; padding: 15px 0 8px; } .penci-headline .pctopbar-item { float: none; margin-left: 0; margin-right: 0; display: block; margin-bottom: 10px; line-height: normal; } ul.penci-topbar-menu > li > a { line-height: 1.6; } .penci-headline .pctopbar-item.penci-topbar-social { margin-bottom: 6px; } .penci-topbar-social a { line-height: normal; float: none; margin-bottom: 5px; } }@media only screen and (max-width: 960px){ .container.has-banner #logo { text-align: center; display: block; width: auto; } .container.has-banner .header-banner { display: block; margin-top: 30px; width: 100%; text-align: center; } }';
}
if( get_theme_mod( 'penci_speed_criticalcss' ) ){
$add_criticalcss = get_theme_mod( 'penci_speed_criticalcss' );
$minify_criticalcss = trim(preg_replace('/\s+/', ' ', $add_criticalcss));
$css .= $minify_criticalcss;
}
return $css;
}, 10, 2);