{border-color: #' . $custom_set['color2'] . '!important }'; echo 'a:hover, .box-vid ul li .list_post_thumb a:hover, .list_post_content h2 a:hover, ul.list-mini li h3 a:hover, .list_post_content p.panel a:hover, .list_home_content h2 a:hover, div.list-more ul li a:hover, .tab_list_content h2 a:hover, article.post_list_mini h2 a:hover, article.post_list div.entry h2 a:hover, .content-vid-v3 h2:hover, .content-v1 h2 a:hover, .list_mini p a:hover { color:#' . $custom_set['color2'] . '}'; $rgba = hex2rgba($custom_set['color2'], '0.9'); echo ' .slider .pager-nav a:hover, .slider3 .pager-nav a:hover { background:' . $rgba . '}'; } /* END COLOR 2*/ /* = content ****************************************************/ if (!empty($custom_set['content'])) { echo '._content{ background:#' . $custom_set['content'] . ' }'; } /* = layout_style **********************************************/ if ('wide' == $smof_data['layout_style']) { echo '.boxed ._content{background:transparent!important}';
function get_pops() { global $post; $options = get_option('pops_options'); $targettingOptions = get_option('pops_secondary_options'); $ipOptions = get_option('pops_tertiary_options'); $exitOptions = get_option('pops_quaternary_options'); $publish = $options['pops_text_publish_popup']; $targettingPublish = $targettingOptions['pops_text_publish_popup']; $ipPublish = $ipOptions['pops_text_publish_popup']; $exitPublish = $exitOptions['pops_text_publish_popup']; $pageTarget = $options['pops_targetting_pages']; $targettingPageTarget = $targettingOptions['pops_targetting_pages']; $ipPageTarget = $ipOptions['pops_targetting_pages']; $targettingLocation = $targettingOptions['pops_targetting_location']; $targettingIp = $ipOptions['pops_targetting_ip']; $headers = apache_request_headers(); $rawAkamaiHeaders = explode(",", $headers['X-Akamai-Edgescape']); foreach ($rawAkamaiHeaders as $headerLine) { $keypair = explode("=", $headerLine); $headerArray[$keypair[0]] = $keypair[1]; } $currentRegion = $headerArray['region_code']; $currentIP = $headers['True-Client-IP']; if ($targettingPublish == 'published' && (is_page(icl_object_id($targettingPageTarget, 'page')) || $targettingPageTarget == 'all') && $targettingLocation == $currentRegion) { $options = get_option('pops_secondary_options'); $image = $options['pops_image']; $content = $options['pops_text_content']; $button1Text = $options['pops_text_button1_text']; $button1Link = $options['pops_text_button1_link']; $button2Text = $options['pops_text_button2_text']; $button2Link = $options['pops_text_button2_link']; $length = $options['pops_targetting_cookie_length']; $button1Color = $options['pops_text_button1_color']; $button2Color = $options['pops_text_button2_color']; $bghex = $options['pops_text_content_bg']; $bgrgba = hex2rgba($bghex, 0.6); $popup .= ' <div class="black-drop"></div> <div class="pops"> <button title="Close (Esc)" type="button" class="pops-close">×</button> <img src="' . $image . '"> <div class="content"> <div style="background-color:' . $bgrgba . ';" class="info-box">' . __($content, 'popup') . ' <div class="button-box">'; if (!empty($button1Text)) { $popup .= '<a style="background-color:' . $button1Color . ';" href="' . __($button1Link, 'popup') . '" onclick="ga(\'send\', \'event\', \'Geo Target Popup\', \'' . $button1Text . '\', \'' . $button1Link . '\')" target="_blank">' . __($button1Text, 'popup') . '</a>'; } if (!empty($button2Text)) { $popup .= '<a style="background-color:' . $button2Color . ';" href="' . __($button2Link, 'popup') . '" onclick="ga(\'send\', \'event\', \'Geo Target Popup\', \'' . $button2Text . '\', \'' . $button2Link . '\')" target="_blank">' . __($button2Text, 'popup') . '</a>'; } $popup .= '</div> </div> </div> </div>'; $popup .= '<script type="text/javascript"> if ("' . $targettingPublish . '" == "published") { var popvisited = Cookies.get("visited"); // if (popvisited !== "") { if (Modernizr.mq("only screen and (min-width: 800px)")) { $(".black-drop").fadeIn(); $(".pops").fadeIn(); } $(".black-drop, .pops-close").click(function(e) { $(".black-drop, .pops").hide(); e.preventDefault(); }); // } Cookies.set("visited", "yes", { expires:' . $length . ' }); } </script>'; } elseif ($ipPublish == 'published' && (is_page(icl_object_id($ipPageTarget, 'page')) || $ipPageTarget == 'all') && $targettingIp == $currentIP) { $options = get_option('pops_tertiary_options'); $image = $options['pops_image']; $content = $options['pops_text_content']; $button1Text = $options['pops_text_button1_text']; $button1Link = $options['pops_text_button1_link']; $button2Text = $options['pops_text_button2_text']; $button2Link = $options['pops_text_button2_link']; $length = $options['pops_targetting_cookie_length']; $button1Color = $options['pops_text_button1_color']; $button2Color = $options['pops_text_button2_color']; $bghex = $options['pops_text_content_bg']; $bgrgba = hex2rgba($bghex, 0.6); $popup .= ' <div class="black-drop"></div> <div class="pops"> <button title="Close (Esc)" type="button" class="pops-close">×</button> <img src="' . $image . '"> <div class="content"> <div style="background-color:' . $bgrgba . ';" class="info-box">' . __($content, 'popup') . ' <div class="button-box">'; if (!empty($button1Text)) { $popup .= '<a style="background-color:' . $button1Color . ';" href="' . __($button1Link, 'popup') . '" onclick="ga(\'send\', \'event\', \'IP Popup\', \'' . $button1Text . '\', \'' . $button1Link . '\')" target="_blank">' . __($button1Text, 'popup') . '</a>'; } if (!empty($button2Text)) { $popup .= '<a style="background-color:' . $button2Color . ';" href="' . __($button2Link, 'popup') . '" onclick="ga(\'send\', \'event\', \'IP Popup\', \'' . $button2Text . '\', \'' . $button2Link . '\')" target="_blank">' . __($button2Text, 'popup') . '</a>'; } $popup .= '</div> </div> </div> </div>'; $popup .= '<script type="text/javascript"> if ("' . $ipPublish . '" == "published") { var popvisited = Cookies.get("visited"); // if (popvisited !== "") { if (Modernizr.mq("only screen and (min-width: 800px)")) { $(".black-drop").fadeIn(); $(".pops").fadeIn(); } $(".black-drop, .pops-close").click(function(e) { $(".black-drop, .pops").hide(); e.preventDefault(); }); // } Cookies.set("visited", "yes", { expires:' . $length . ' }); } </script>'; } elseif ($publish == 'published' && (is_page(icl_object_id($pageTarget, 'page')) || $pageTarget == 'all')) { if ($publish == 'published') { $options = get_option('pops_options'); $image = $options['pops_image']; $content = $options['pops_text_content']; $button1Text = $options['pops_text_button1_text']; $button1Link = $options['pops_text_button1_link']; $button2Text = $options['pops_text_button2_text']; $button2Link = $options['pops_text_button2_link']; $length = $options['pops_targetting_cookie_length']; $button1Color = $options['pops_text_button1_color']; $button2Color = $options['pops_text_button2_color']; $bghex = $options['pops_text_content_bg']; $bgrgba = hex2rgba($bghex, 0.6); $popup .= ' <div class="black-drop"></div> <div class="pops"> <button title="Close (Esc)" type="button" class="pops-close">×</button> <img src="' . $image . '"> <div class="content"> <div style="background-color:' . $bgrgba . ';" class="info-box">' . __($content, 'popup') . ' <div class="button-box">'; if (!empty($button1Text)) { $popup .= '<a style="background-color:' . $button1Color . ';" href="' . __($button1Link, 'popup') . '" onclick="ga(\'send\', \'event\', \'Main Popup\', \'' . $button1Text . '\', \'' . $button1Link . '\')" target="_blank">' . __($button1Text, 'popup') . '</a>'; } if (!empty($button2Text)) { $popup .= '<a style="background-color:' . $button2Color . ';" href="' . __($button2Link, 'popup') . '" onclick="ga(\'send\', \'event\', \'Main Popup\', \'' . $button2Text . '\', \'' . $button2Link . '\')" target="_blank">' . __($button2Text, 'popup') . '</a>'; } $popup .= '</div> </div> </div> </div>'; $popup .= '<script type="text/javascript"> if ("' . $publish . '" == "published") { var popvisited = Cookies.get("visited"); if (popvisited !== "yes") { if (Modernizr.mq("only screen and (min-width: 800px)")) { $(".black-drop").fadeIn(); $(".pops").fadeIn(); } $(".black-drop, .pops-close").click(function(e) { $(".black-drop, .pops").hide(); e.preventDefault(); }); } else { console.log(\'cookie found, no popup for you.\') } Cookies.set("visited", "yes", { expires:' . $length . ' }); } </script>'; } } if ($exitPublish == 'published') { $options = get_option('pops_quaternary_options'); $image = $options['pops_image']; $content = $options['pops_text_content']; $button1Text = $options['pops_text_button1_text']; $button1Link = $options['pops_text_button1_link']; $button2Text = $options['pops_text_button2_text']; $button2Link = $options['pops_text_button2_link']; $length = $options['pops_targetting_cookie_length']; $button1Color = $options['pops_text_button1_color']; $button2Color = $options['pops_text_button2_color']; $bghex = $options['pops_text_content_bg']; $bgrgba = hex2rgba($bghex, 0.6); $popup .= ' <div class="exit black-drop"></div> <div class="exit pops"> <button title="Close (Esc)" type="button" class="exit pops-close">×</button> <img src="' . $image . '"> <div class="content"> <div style="background-color:' . $bgrgba . ';" class="info-box">' . __($content, 'popup') . ' <div class="button-box">'; if (!empty($button1Text)) { $popup .= '<a style="background-color:' . $button1Color . ';" href="' . __($button1Link, 'popup') . '" onclick="ga(\'send\', \'event\', \'IP Popup\', \'' . $button1Text . '\', \'' . $button1Link . '\')" target="_blank">' . __($button1Text, 'popup') . '</a>'; } if (!empty($button2Text)) { $popup .= '<a style="background-color:' . $button2Color . ';" href="' . __($button2Link, 'popup') . '" onclick="ga(\'send\', \'event\', \'IP Popup\', \'' . $button2Text . '\', \'' . $button2Link . '\')" target="_blank">' . __($button2Text, 'popup') . '</a>'; } $popup .= '</div> </div> </div> </div>'; $popup .= '<script type="text/javascript"> function addEvent(obj, evt, fn) { if (obj.addEventListener) { obj.addEventListener(evt, fn, false); } else if (obj.attachEvent) { obj.attachEvent("on" + evt, fn); } } addEvent(document, "mouseout", function(e) { e = e ? e : window.event; var from = e.relatedTarget || e.toElement; if (!from || from.nodeName == "HTML") { if ("' . $exitPublish . '" == "published") { var popvisited = Cookies.get("exited"); if (popvisited !== "yes") { if (Modernizr.mq("only screen and (min-width: 800px)")) { $(".exit.black-drop").fadeIn(); $(".exit.pops").fadeIn(); } $(".exit.black-drop, .exit.pops-close").click(function(e) { $(".exit.black-drop, .exit.pops").hide(); e.preventDefault(); }); } else { console.log(\'cookie found, no popup for you.\') } Cookies.set("exited", "yes", { expires:' . $length . ' }); } } }); </script>'; } echo $popup; }
/* ============================================================================================================================== /* /* Shortcodes Shortcodes /* /* ============================================================================================================================ */ /* Blockquote */ blockquote, blockquote a, blockquote a:hover { color: #444444; } /* Image frames & Google maps & Icon bar */ .image_frame .image_wrapper .image_links, .portfolio_group.masonry-hover .portfolio-item .masonry-hover-wrapper .hover-desc { background: <?php hex2rgba($color_one, 0.8, true); ?> ; } .masonry.tiles .post-item .post-desc-wrapper .post-desc .post-title:after, .masonry.tiles .post-item.no-img, .masonry.tiles .post-item.format-quote { background: <?php echo $color_one; ?> ; } .image_frame .image_wrapper .image_links a { color: #ffffff; } .image_frame .image_wrapper .image_links a:hover {
function tt_style_changers() { $background_color = _go('bg_color'); $background_image = _go('bg_image'); if ($background_image || $background_color) { wp_add_inline_style('tt-main-style', "body{background-color: {$background_color};background-image: url('{$background_image}')}"); } $colopickers_css = ''; if (_go('site_color')) { $colopickers_css .= ' .form-submit input, .button-2 { background-color: ' . _go('site_color') . '; } .title .title-type-1 { color: ' . _go('site_color') . '; } .tagcloud li a:hover { color: ' . _go('site_color') . '; } .blog-masonry .blog-entry .entry-cover .entry-date-comments span.entry-com a:hover i, .blog-masonry .blog-entry .entry-cover .entry-date-comments span.entry-com a:hover { color: ' . _go('site_color') . '; } .blog-masonry .blog-entry .entry-content .entry-content-details h1 a:hover { color: ' . _go('site_color') . '; } .share-it li i { background-color: ' . _go('site_color') . '; } .pricing-table.pricing-table-current { border-color: ' . _go('site_color') . '; } .pricing-table .pricing-table-head { background-color: ' . _go('site_color') . '; } .gallery-photos .gallery-item:hover .gallery-item-hover, .pricing-table.pricing-table-current .pricing-table-price { background-color: ' . _go('site_color') . '; } .our-partners .tesla-carousel-items img:hover { border-color: ' . _go('site_color') . '; } .the-slider.project-slider .slide-arrows .slide-right { color: ' . _go('site_color') . '; } .the-slider.project-slider .slide-arrows .slide-left { color: ' . _go('site_color') . '; } .the-slider.project-slider .slide-arrows .slide-right:hover, .the-slider.project-slider .slide-arrows .slide-left:hover { background-color: ' . _go('site_color') . '; } .the-slider.project-slider .the-bullets-dots li.active { border-color: ' . _go('site_color') . '; } .services-type-2 .service .service-icon { background-color: ' . _go('site_color') . '; } .testimonials .testimonials-dots li.active { background-color: ' . _go('site_color') . '; } .accordion .accordion-heading.active { background-color: ' . _go('site_color') . '; border-color: ' . _go('site_color') . '; } .accordion .accordion-heading a span { background-color: ' . _go('site_color') . '; } .accordion .accordion-heading.active a span { color: ' . _go('site_color') . '; } .widget .widget-title { color: ' . _go('site_color') . '; } .footer-model-1.footer-color-white .widget .widget-sitemap li a, .footer-model-1.footer-color-white .widget .widget-latest-post p, .footer-model-1.footer-color-white .widget .widget-about-us li a:hover, .widget .widget-about-us li a:hover, .widget .widget-latest-post h4 a:hover { color: ' . _go('site_color') . '; } .widget .widget-sitemap li a:hover { color: ' . _go('site_color') . '; } .navigation-tab li a { color: ' . _go('site_color') . '; } .navigation-tab li a:hover, .navigation-tab li.active a { background-color: ' . _go('site_color') . '; } .tab-content ul li .item h3 a:hover { color: ' . _go('site_color') . '; } .gallery-photos .gallery-pagination li:hover, .gallery-photos .gallery-pagination li.active { background-color: ' . _go('site_color') . '; } .header-model-1 .header-top-line ul li a:hover { color: ' . _go('site_color') . '; } .header-model-1 .header-top-line ul li.header-cart i:hover { color: ' . _go('site_color') . '; } .header-model-1 .header-top-line ul li.header-social a:hover { background-color: ' . _go('site_color') . '; } .header-model-1 .menu ul li.active a, .header-model-1 .menu ul li a:hover { background-color: ' . _go('site_color') . '; } .header-model-1.header-model-3 .header-top-line { background-color: ' . _go('site_color') . '; } .header-model-1.header-model-4 .menu-cover { background-color: ' . _go('site_color') . '; } .header-model-1.header-model-4 .menu ul li.active a, .header-model-1.header-model-4 .menu ul li a:hover { color: ' . _go('site_color') . '; } .header-model-1 .header-search i:hover { background-color: ' . _go('site_color') . '; } .header-model-1.header-model-3.header-color-dark .header-top-line { background-color: ' . _go('site_color') . '; } .header-model-1.header-model-4.header-color-dark .header-search button i:hover { background-color: ' . _go('site_color') . '; } .header-model-1 .menu>ul>li:hover { background-color: ' . _go('site_color') . '; } .header-model-1 .menu ul li ul li { background-color: ' . _go('site_color') . '; } .menu ul li.current_page_item a, .menu ul li a:hover{ background: ' . _go('site_color') . '; } .header-model-1.header-model-4 .menu ul>li:hover>a { color: ' . _go('site_color') . '; } .header-model-1.header-model-4 .menu ul li ul li, .header-model-1.header-model-4 .menu ul li ul li a { background-color: ' . _go('site_color') . '; } .header-model-1.header-color-dark .menu ul li ul li:hover, .header-model-1.header-color-dark .menu ul li ul li a:hover, .header-model-1.header-model-4 .menu ul li ul li:hover, .header-model-1.header-model-4 .menu ul li ul li a:hover { background-color: ' . _go('site_color') . '; } .header-model-1.header-model-3.header-color-dark .menu ul>li:hover>a, .header-model-1.header-model-3.header-color-dark .menu ul li ul li a:hover { background-color: ' . _go('site_color') . '; } .filter-area .filter-box .filter li a.active, .filter-area .filter-box .filter li a:hover { background-color: ' . _go('site_color') . '; } .filter-area .filter-item .filter-item-details h1 a { color: ' . _go('site_color') . '; } .page-numbers li .current, .page-numbers li a:hover { background-color: ' . _go('site_color') . '; border-color: ' . _go('site_color') . '; } .our-team-c .our-team-c-member .our-team-c-member-socials.our-team-c-member-socials-male li a { color: ' . _go('site_color') . '; } .skills-a .skills-a-title h1 { color: ' . _go('site_color') . '; } .skills-a .skills-a-skill .skills-a-skill-cover { background-color: ' . _go('site_color') . '; } .skills-b .skills-b-title h1 { color: ' . _go('site_color') . '; } .our-team-b .our-team-b-member .our-team-b-member-details, .skills-c .skills-c-skill .skills-c-skill-cover { background-color: ' . _go('site_color') . '; } .our-team-b .our-team-b-member .our-team-b-member-details .our-team-b-member-details-socials li a, .ul-type-5 li:before, .ul-type-6 li:before, .huge-ul-black ul li:before, .ul-features li:before, .our-team-b .our-team-b-title h1, .site-title-center h3, .event-type-1 .event .event-content .event-read, .event-type-1 .event .event-content .event-time, .widget a:hover, .pricing-table .pricing-table-price, .blog-entry .entry-header h1 a:hover, .footer-model-1 .footer-bottom-line .footer-socials li a:hover, .footer-model-1 .footer-bottom-line .footer-copyright a:hover { color: ' . _go('site_color') . '; } .footer-model-1.footer-color-white { border-top-color: ' . _go('site_color') . '; } .button-2:hover, .filter-area .filter-item .filter-item-cover:hover .filter-item-cover-hover{ background: ' . hex2rgba(_go('site_color'), 0.8) . '; } .header-model-1 .menu ul li ul li{ border-bottom: 1px solid #' . darker_color(_go('site_color'), 85) . '; border-top: 1px solid ' . hex2rgba(_go('site_color'), 0.75) . '; } '; } if (_go('site_color_2')) { $colopickers_css .= ' a:hover { color: ' . _go('site_color_2') . '; } .blog-entry .entry-content .entry-details ul li.entry-details-comments a:hover i, .blog-entry .entry-content .entry-details ul li.entry-details-comments a:hover { color: ' . _go('site_color_2') . '; } .widget button, .widget .button, .widget input[type="button"], .widget input[type="reset"], .widget input[type="submit"] { background-color: ' . _go('site_color_2') . '; }'; } wp_add_inline_style('tt-main-style', $colopickers_css); //Custom Fonts Changers wp_add_inline_style('tt-main-style', tt_text_css('main_content_text', '.content p', 'px')); wp_add_inline_style('tt-main-style', tt_text_css('sidebar_text', '.sidebar,.sidebar li,.sidebar a,.sidebar p,.sidebar .widget-title', 'px')); wp_add_inline_style('tt-main-style', tt_text_css('menu_text', '[class *= "header-model-"] .menu ul li a', 'px')); //Custom Styler wp_add_inline_style('tt-main-style', _gcustom_styler('Custom Styler')); }
$header_sticky_bg = get_data('header_sticky_bg'); $header_sticky_bg_alpha = get_data('header_sticky_bg_alpha'); $sticky_immediate_activate = get_data('header_sticky_sticky_immediate'); $header_sticky_custom_logo = get_data('header_sticky_custom_logo'); $header_sticky_logo_image_id = get_data('header_sticky_logo_image_id'); $header_sticky_logo_width = get_data('header_sticky_logo_width'); $header_sticky_menu_skin = get_data('header_sticky_menu_skin'); if ($sticky_immediate_activate) { $header_classes[] = 'sticky-immediate-activate'; } if (is_numeric($header_sticky_vpadding) && $header_sticky_vpadding > 0) { generate_custom_style('.main-header.is-sticky.sticky-active', "padding-top: {$header_sticky_vpadding}px; padding-bottom: {$header_sticky_vpadding}px;", '', true); } if ($header_sticky_bg) { $hsbg_alpha = intval($header_sticky_bg_alpha); $hsbg = hex2rgba($header_sticky_bg, $hsbg_alpha / 100); generate_custom_style('.main-header.is-sticky.sticky-active', "background-color: {$hsbg};", '', true); } if ($header_sticky_custom_logo) { $header_options['stickyUseCustomLogo'] = true; $header_options['stickyCustomLogo'] = wp_get_attachment_image_src($header_sticky_logo_image_id, 'original'); $header_options['stickyCustomLogoWidth'] = $header_sticky_logo_width; } if ($header_sticky_menu_skin) { $header_options['stickyMenuBarSkin'] = $header_sticky_menu_skin; } } ?> <header class="<?php echo implode(' ', $header_classes); ?>
/************************ Shortcodes ************************/ /* Blockquote */ blockquote, blockquote a, blockquote a:hover { color: <?php mfn_opts_show('color-blockquote', '#444444'); ?> ; } /* Image frames & Google maps & Icon bar */ .image_frame .image_wrapper .image_links, .portfolio_group.masonry-hover .portfolio-item .masonry-hover-wrapper .hover-desc { background: <?php hex2rgba(mfn_opts_get('background-imageframe-link', '#2991d6'), 0.8, true); ?> ; } .image_frame .image_wrapper .image_links a { color: <?php mfn_opts_show('color-imageframe-link', '#ffffff'); ?> ; } .image_frame .image_wrapper .image_links a:hover { background: <?php mfn_opts_show('color-imageframe-link', '#ffffff'); ?> ; color: <?php
/* ============================================================================================================================== /* /* Responsive Responsive /* /* ============================================================================================================================ */ <?php if (mfn_opts_get('responsive')) { ?> @media only screen and (min-width: 768px){ .header-semi #Top_bar:not(.is-sticky) { background-color: <?php hex2rgba(mfn_opts_get('background-top-left', '#ffffff'), 0.8, true); ?> ; } } @media only screen and (max-width: 767px){ #Top_bar, #Action_bar { background: <?php mfn_opts_show('background-top-left', '#ffffff'); ?> !important;} } <?php }
<?php $sC = get_field('bg-color'); $sCAlfa = hex2rgba($sC, 0.5); if ($sC) { ?> <style> .rooms article .explanation h2 { color: <?php echo $sC; ?> ; } .rooms article .slider .caption, .rooms article .slider a.rslides_nav, .rooms article .slider a.rslides_nav:hover {background-color: <?php echo $sC; ?> } .rooms article .quote wrap div:nth-child(2) { background-color: <?php echo $sCAlfa; ?> ; height: 30em; color: #FFF; } .expo .slider .caption .counter, .rooms article .quote h2 { color: #FFF; }
<?php $title = $el_class = $value = $label_value = $units = ''; extract(shortcode_atts(array('title' => '', 'el_class' => '', 'value' => '50', 'units' => '', 'color' => '#27CFC3', 'label_value' => ''), $atts)); wp_enqueue_script('vc_pie'); $el_class = $this->getExtraClass($el_class); $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_pie_chart wpb_content_element' . $el_class, $this->settings['base']); $output = "\n\t" . '<div class= "' . $css_class . '" data-pie-value="' . $value . '" data-pie-label-value="' . $label_value . '" data-pie-units="' . $units . '" data-pie-color="' . htmlspecialchars(hex2rgba($color, 1)) . '">'; $output .= "\n\t\t" . '<div class="wpb_wrapper">'; $output .= "\n\t\t\t" . '<div class="vc_pie_wrapper ' . strtolower($color) . '">'; $output .= "\n\t\t\t" . '<span style="border-color: ' . htmlspecialchars(hex2rgba($color, 1)) . ';" class="vc_pie_chart_back"></span>'; $output .= "\n\t\t\t" . '<span style="color: ' . $color . ';" class="vc_pie_chart_value"></span>'; $output .= "\n\t\t\t" . '<canvas width="101" height="101"></canvas>'; $output .= "\n\t\t\t" . '</div>'; if ($title != '') { $output .= '<h4 class="wpb_heading wpb_pie_chart_heading">' . $title . '</h4>'; } //wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_pie_chart_heading')); $output .= "\n\t\t" . '</div>' . $this->endBlockComment('.wpb_wrapper'); $output .= "\n\t" . '</div>' . $this->endBlockComment('.wpb_pie_chart') . "\n"; echo $output;
echo bloginfo('template_directory'); ?> /css/font-awesome.min.css" rel="stylesheet"> <link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> <style> <?php $primary_bg_colour = of_get_option('primary_bg_colour'); if ($primary_bg_colour) { $color = of_get_option('primary_bg_colour'); $opacity = of_get_option('primary_bg_opacity'); $rgb = hex2rgba($color); $rgba = hex2rgba($color, $opacity); echo '.navbar-header, .navbar-branding { background-color: ' . $rgba . ';}'; } ?> </style> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> <!-- WordPress Hook --> <?php
function header_BgColor() { function hex2rgba($color, $opacity = false) { $default = 'rgb(0,0,0)'; //Return default if no color provided if (empty($color)) { return $default; } //Sanitize $color if "#" is provided if ($color[0] == '#') { $color = substr($color, 1); } //Check if color has 6 or 3 characters and get values if (strlen($color) == 6) { $hex = array($color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5]); } elseif (strlen($color) == 3) { $hex = array($color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2]); } else { return $default; } //Convert hexadec to rgb $rgb = array_map('hexdec', $hex); //Check if opacity is set(rgba or rgb) if ($opacity) { if (abs($opacity) > 1) { $opacity = 1.0; } $output = 'rgba(' . implode(",", $rgb) . ',' . $opacity . ')'; } else { $output = 'rgb(' . implode(",", $rgb) . ')'; } //Return rgb(a) color string return $output; } $color = get_theme_mod('hero_head_overlayBg'); $rgba = hex2rgba($color, 0.3); ?> <style type="text/css"> .hero-bg { background-color: <?php echo $rgba; ?> ; } </style> <?php }
<?php $args = array('post_type' => array('work'), 'tax_query' => array(array('taxonomy' => 'services', 'field' => 'slug', 'terms' => $work_home[$j])), 'post__in' => get_field('selected_work', $case_study_home[$j]), 'orderby' => 'post__in'); $case_query = new WP_Query($args); if ($case_query->have_posts()) { while ($case_query->have_posts()) { $case_query->the_post(); $url = getFeaturedUrl(get_the_id()); $client = wp_get_post_terms(get_the_id(), 'clients', array("fields" => "all"))[0]; // $client_id = $client->term_id; // $client_name = $client->name; $color = hex2rgba(get_field('overlay_color'), 0.8); ?> <article class="work-obj col-lg-4" style="background:url('<?php echo aq_resize($url, 645, 485, true, true, true); ?> ');"> <div class="overlay" style="background-color:<?php echo $color; ?> "> <hgroup> <h1><a href="<?php echo $case_study_url . '#' . $work_home[$j]; ?> "><?php echo $client->name; ?> </a></h1> <h2><?php echo $work_home[$j]; ?>
<?php if (trim($user_info->user_url, ' ') != "") { ?> <div class="widget widget-aside"> <a href="<?php echo $user_info->user_url; ?> " target="_blank" class="btn btn-sm btn-block btn-secondary"><span class="fa icon-l-sm fa-globe"></span>Visit website</a> </div> <?php } ?> <div class="widget widget-aside"> <div class="call-to-action" style="background-color:<?php echo hex2rgba($user_info->color); ?> "> <span class="icon icon-tel"></span> <p>Any questions?</p> <p>Call US Now</p> <p> <?php if (trim($user_info->phone, ' ') != "") { ?> <a href="tel:<?php echo $user_info->phone;
#menu { height: <?php echo ot_get_option('menu_height'); ?> px; } #contact_us { <?php $hex = ot_get_option('contacts_bg_color'); ?> <?php $c_alpha = ot_get_option('contacts_alpha'); ?> <?php $c_rgba = hex2rgba($hex, $c_alpha); ?> background-color: <?php echo $c_rgba; ?> ; } #contact_us:before { <?php $c_bg_img_id = ot_get_option('contacts_bg_img'); ?> <?php $c_bg_img_url = wp_get_attachment_image_src($c_bg_img_id, 'full')[0]; ?> background: url('<?php
function pmp_megaphone_display_options() { // Colors $accent_color_1 = get_option('accent_color_1', '#404040'); $link_color_1 = get_option('link_color_1', '#B30016'); $font_color_1 = get_option('font_color_1', '#404040'); ?> <style type="text/css"> /** * Custom Colors */ /* Text Color */ body, h1.section-title a { color: <?php echo $font_color_1; ?> ; } /* Accent as Background Color. Making the Body Background the Accent Color keeps the footer from looking like it is floating on short pages. */ body, #sub-footer-wrap, .site-footer { background-color: <?php echo $accent_color_1; ?> ; } /* Generic Link Color */ a { color: <?php echo $link_color_1; ?> ; } a:hover, a:focus { color: <?php echo $font_color_1; ?> ; } /* Button and Input Color */ button, .button, input[type="submit"], .single .post-navigation, .post-edit-link, .home .articles-row .article-header a { background-color: <?php echo $link_color_1; ?> ; } button:hover, .button:hover, input[type="submit"]:hover, button:focus, .button:focus, input[type="submit"]:focus, .post-edit-link:hover, .post-edit-link:active, .sub-menu-toggle.activated { background-color: <?php echo $font_color_1; ?> ; } /* Featured Article */ .home .articles-featured a { background-color: <?php echo hex2rgba($accent_color_1, 0.7); ?> ; } .home .articles-featured a:hover, .home .articles-featured a:focus { background-color: <?php echo hex2rgba($font_color_1, 0.9); ?> ; } /* Articles by Category */ .home .articles-row .article-header.has-image a { background-color: <?php echo hex2rgba($link_color_1, 0.7); ?> ; } .home .articles-row .article-header.has-image a:hover, .home .articles-row .article-header.has-image a:focus { background-color: <?php echo hex2rgba($font_color_1, 0.9); ?> ; } .home .articles-row .article-header a:hover, .home .articles-row .article-header a:focus { background-color: <?php echo hex2rgba($font_color_1, 1); ?> ; } /* Link Color in Main Navigation */ .main-navigation .current_page_item > a, .main-navigation .current-menu-item > a, .main-navigation .current_page_ancestor > a, .main-navigation .current_page_parent > a { color: <?php echo $font_color_1; ?> ; } .main-navigation .current_page_item > a:hover, .main-navigation .current-menu-item > a:hover, .main-navigation .current_page_ancestor > a:hover, .main-navigation .current_page_parent > a:hover, .main-navigation .current_page_item > a:focus, .main-navigation .current-menu-item > a:focus, .main-navigation .current_page_ancestor > a:focus, .main-navigation .current_page_parent > a:focus { color: <?php echo $link_color_1; ?> ; } /* Border Color on Headings, the Masthead, and other decorative elements */ .single #primary-tertiary-wrap h1:after, .page #primary-tertiary-wrap h1:after, .single .entry-header h1:after, .page .entry-header h1:after, .single .entry-header:after, #masthead, #masthead .site-branding .wrap, blockquote, .articles-recent .section-title:after, #articles-by-topic .section-title:after, .page-header:after { border-color: <?php echo $accent_color_1; ?> ; } /* Text on Accent Color */ .accent_text_dark.home .articles-featured h4:after, .accent_text_dark #sub-footer-wrap .footer-widget h2:after, .accent_text_dark .site-footer .footer-widget h2:after { border-color: rgba(0,0,0,0.25); } .accent_text_dark #sub-footer-wrap, .accent_text_dark .site-footer, .accent_text_dark.home .articles-featured a, .accent_text_dark #sub-footer-wrap a, .accent_text_dark .site-footer a { color: #000; } .accent_text_dark #sub-footer-wrap a:hover, .accent_text_dark .site-footer a:hover, .accent_text_dark.home .articles-featured a:focus, .accent_text_dark #sub-footer-wrap a:focus, .accent_text_dark .site-footer a:focus { opacity: 0.5; } /** * Custom Fonts */ body, button, input, select, textarea { font-family: <?php echo $GLOBALS['fb_family']; ?> ; } #masthead h1 { font-family: <?php echo $GLOBALS['fm_family']; ?> ; font-weight: <?php echo $GLOBALS['fm_weight']; ?> ; } h1, h2, h3, .home .articles-featured em, .comment-navigation, .posts-navigation, .post-navigation { font-family: <?php echo $GLOBALS['fd_family']; ?> ; font-weight: <?php echo $GLOBALS['fd_weight']; ?> ; } </style> <?php }
/** * This will output custom css */ private function custom_css() { $result = ''; $result .= '<!-- Lounge Act Custom CSS -->' . "\n"; $result .= '<style type="text/css" id="loungeact-custom-css">' . "\n"; // Colors Styles $result .= $this->generate_css('a', 'color', 'color_link', '', '', false); $result .= $this->generate_css('a:visited', 'color', 'color_link_visited', '', '', false); $result .= $this->generate_css('a:hover, a:focus, a:active', 'color', 'color_link_hover', '', '', false); // HEADER // Simulate header height when fixed-top // if ($this->get_setting ( "header_fixed_top" ) && !$this->get_setting ( "slider_fullscreen" )) { // $result .= $this->generate_css ( ".lougeact-wrapper.loungeact-header-fixed-top", "padding-top", "header_margin_bottom", '', '', false ); // } // logo $result .= $this->generate_css(".lougeact-header .site-logo", "max-height", "logo_max_height", '', '', false); // SLIDER $result .= $this->generate_css(".loungeact-banner", "height", "slider_height", '', '', false); $result .= $this->generate_css(".loungeact-banner .loungeact-slider-overlay", "background-color", "slide_overlay_opacity", 'rgba(0 , 0 , 0, ', ')', false); // if ($this->get_setting ( "slider_header_inside" )) { // $result .= '.lougeact-header {position: absolute;}'; // } if (is_front_page() && is_home() && $this->get_setting("hide_title_in_homepage")) { $result .= '.site-title {position: absolute;clip: rect(1px, 1px, 1px, 1px);}'; } if ($this->get_setting("container_class") == "container") { $result .= $this->generate_css(".loungeact-container.container", "max-width", "container_max_width", '', '', false); } if ($this->get_setting("header_background_color")) { $result .= ".lougeact-header .navbar-default { background-color: rgba(" . implode(", ", hex2rgba($this->get_setting("header_background_color"), $this->get_setting("header_background_opacity"))) . ");}\n"; $result .= ".loungeact-fullscreen-banner.lougeact-scrolling .lougeact-header .navbar-default { background-color: rgba(" . implode(", ", hex2rgba($this->get_setting("header_background_color"), $this->get_setting("header_background_opacity"))) . ");}\n"; $result .= ".loungeact-header-inside-banner.lougeact-scrolling .lougeact-header .navbar-default { background-color: rgba(" . implode(", ", hex2rgba($this->get_setting("header_background_color"), $this->get_setting("header_background_opacity"))) . ");}\n"; } else { $result .= ".lougeact-header .navbar-default { background-color: transparent;}"; $result .= ".loungeact-fullscreen-banner.lougeact-scrolling .navbar-default { background-color: transparent;}"; $result .= ".loungeact-header-inside-banner.lougeact-scrolling .navbar-default { background-color: transparent;}"; } // SubMenu bg color // $result .= ".lougeact-header .loungeact-navbar-mobile { background-color: rgba(" . implode ( ", ", hex2rgba ( $this->get_setting ( "header_background_color" ), 1)) . ");}\n"; if ($this->get_setting("header_background_opacity_inside_slider")) { $result .= ".loungeact-header-inside-banner .lougeact-header .navbar-default { background-color: rgba(" . implode(", ", hex2rgba($this->get_setting("header_background_color"), $this->get_setting("header_background_opacity_inside_slider"))) . ");}\n"; $result .= ".loungeact-fullscreen-banner .lougeact-header .navbar-default { background-color: rgba(" . implode(", ", hex2rgba($this->get_setting("header_background_color"), $this->get_setting("header_background_opacity_inside_slider"))) . ");}\n"; } else { $result .= ".loungeact-header-inside-banner .lougeact-header .navbar-default { background-color: transparent;}"; $result .= ".loungeact-fullscreen-banner .lougeact-header .navbar-default { background-color: transparent;}"; } // Main Menu $result .= $this->generate_css(".navbar-default .loungeact-navbar .navbar-nav > li > a", "color", "menu_font_color", '', '', false); $result .= $this->generate_css(".navbar-default .loungeact-navbar .navbar-nav > li > a:hover", "color", "menu_font_color_hover", '', '', false); $result .= $this->generate_css(".navbar-default .navbar-toggle .icon-bar", "background-color", "menu_font_color", '', '', false); $result .= $this->generate_css(".navbar-default .navbar-toggle:hover .icon-bar", "background-color", "menu_font_color_hover", '', '', false); $result .= $this->generate_css(".site-title a", "color", "site_title_color", '', '', false); $result .= $this->generate_css(".site-description", "color", "blogdescription_color", '', '', false); if ($this->get_setting("font_family_title")) { $result .= ".site-title { font-family: '" . explode(":", $this->get_setting("font_family_title"))[0] . "'}\n"; } if ($this->get_setting("font_family_default")) { $result .= "body { font-family: '" . explode(":", $this->get_setting("font_family_default"))[0] . "'}\n"; } if ($this->get_setting("font_family_h1")) { $result .= "h1 { font-family: '" . explode(":", $this->get_setting("font_family_h1"))[0] . "'}\n"; } if ($this->get_setting("font_family_h2")) { $result .= "h2 { font-family: '" . explode(":", $this->get_setting("font_family_h2"))[0] . "'}\n"; } $result .= '</style>' . "\n"; $result .= '<!-- /Lounge Act Custom CSS -->' . "\n"; return $result; }
?> " title="<?php echo get_theme_mod('hero2_buttontext', 'Learn More'); ?> "><?php echo get_theme_mod('hero2_buttontext', 'Learn More'); ?> </a> </div> </div> <div class="width50" style="background-image: url(<?php echo get_theme_mod('hero3_bgimg', 'https://unsplash.it/800/600/'); ?> );"> <div class="fill" style="background-color:<?php echo hex2rgba(get_theme_mod('hero3_bgtint', '#FCA62F')); ?> "> <h2><?php echo get_theme_mod('hero3_title', 'No title has been saved yet.'); ?> </h2> <hr /> <p><?php echo get_theme_mod('hero3_description', 'Default description. Please update in the Customize Theme dashboard.'); ?> </p> <a href="<?php echo get_theme_mod('hero3_link', '#'); ?> " title="<?php
<?php // Get theme color $theme_color = IGV_get_option('_igv_theme_color'); $theme_mid_color = hex2rgba($theme_color, '0.3'); $theme_pattern = IGV_get_option('_igv_theme_pattern'); $soft_white = 'rgb(253, 253, 253)'; ?> <style> .theme-bg { background-color: <?php echo $theme_color; ?> ; } .theme-grad-bg { background: rgb(253, 253, 253); background: -moz-linear-gradient(top, <?php echo $soft_white; ?> 0%, <?php echo $theme_color; ?> 100%); background: -webkit-linear-gradient(top, <?php echo $soft_white; ?> 0%,<?php echo $theme_color; ?>
background:<?php echo $main_color_1; ?> ; } .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit, .woocommerce #content input.button, .woocommerce-page a.button, .woocommerce-page button.button, .woocommerce-page input.button, .woocommerce-page #respond input#submit, .woocommerce-page #content input.button, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit.alt, .woocommerce #content input.button.alt, .woocommerce-page a.button.alt, .woocommerce-page button.button.alt, .woocommerce-page input.button.alt, .woocommerce-page #respond input#submit.alt, .woocommerce-page #content input.button.alt, .woocommerce #review_form #respond .form-submit input, .woocommerce-page #review_form #respond .form-submit input{background:<?php echo $main_color_1; ?> ;} .thumbnail-overlay { background: rgba(<?php echo hex2rgba($main_color_1, 80); ?> ); } .event-default-red , .container.cal-event-list .event-btt:hover, #calendar-options .right-options ul li ul li:hover, #calendar-options .right-options ul li ul li:hover a, #stm-list-calendar .panel-group .panel .panel-heading .panel-title a.collapsed:hover { background:<?php echo $main_color_1; ?> !important;} .cal-day-weekend span[data-cal-date], #cal-slide-content a.event-item:hover, .cal-slide-content a.event-item:hover, .container.cal-event-list .owl-controls .owl-prev:hover i:before,
if (trim(get_field('website'), ' ') != "") { ?> <div class="widget widget-aside"> <a href="<?php the_field('website'); ?> " target="_blank" class="btn btn-sm btn-block btn-secondary"><span class="fa icon-l-sm fa-globe"></span>Visit website</a> </div> <?php } ?> <div class="widget widget-aside"> <div class="call-to-action" style="background-color: <?php echo hex2rgba(get_field('color')); ?> "> <span class="icon icon-tel"></span> <p>Any questions?</p> <p>Call US Now</p> <p> <?php if (trim(get_field('phone'), ' ') != "") { ?> <a href="tel:<?php the_field('phone');
/** * This will generate a line of CSS for use in header output. If the setting * ($mod_name) has no defined value, the CSS will not be output. * * @uses get_theme_mod() * @param string $mod_name The name of the 'theme_mod' option to fetch * @param bool $option_type Whether to use get_them_mod() or use genesis_get_option() via get_field_value() * @param string $selector CSS selector * @param string $styles The name(s) of the CSS *property* to modify * @param string $prefix Optional. Anything that needs to be output before the CSS property * @param string $postfix Optional. Anything that needs to be output after the CSS property * @param bool $echo Optional. Whether to print directly to the page (default: true). * @param array $dependancies Optional. Any dependancy required to activate CSS property * @return string Returns a single line of CSS with selectors and a property. * @since 1.0.0 */ public function generate_customizer_css($mod_name, $option_type = false, $selector, $styles, $prefix = '', $postfix = '', $echo = true, $dependancies = array()) { $return = ""; $mod = ""; //* Check if its a Genesis option or theme mod if ($option_type === true) { $mod = $this->get_field_value($mod_name); } else { $mod = get_theme_mod($mod_name); } //* Check to see if mod value exceeds max value if ($this->mod_settings[$mod_name]['input_attrs']['max'] && $mod > $this->mod_settings[$mod_name]['input_attrs']['max']) { $mod = $this->mod_settings[$mod_name]['input_attrs']['max']; //* Update genesis option with max value; if ($option_type === true) { $geneses_options = get_option($this->settings_field); $geneses_options[$mod_name] = $mod; update_option($this->settings_field, $geneses_options); } } //* Check to see if mod value exceeds min value if ($this->mod_settings[$mod_name]['input_attrs']['min'] && $mod < $this->mod_settings[$mod_name]['input_attrs']['min']) { $mod = $this->mod_settings[$mod_name]['input_attrs']['min']; //* Update genesis option with min value; if ($option_type === true) { $geneses_options = get_option($this->settings_field); $geneses_options[$mod_name] = $mod; update_option($this->settings_field, $geneses_options); } } // Get all properties for this CSS line $properties = explode(' ', $styles); //* By default won't fire CSS if value is unset or checkboxes unchecked or if uses a media query. if (isset($mod)) { if (empty($mod) && $this->mod_settings[$mod_name]['type'] === 'checkbox') { return $return; } //* check for requirements and return nothing if not met. if ($dependancies['requires']) { foreach ($dependancies['requires'] as $requirement) { if ($this->mod_settings[$requirement]['option'] === true) { if (!$this->get_field_value($requirement)) { echo "/****** Option " . $requirement . " requirement not met! ******/"; return $return; } } elseif (!get_theme_mod($requirement)) { echo "/****** Theme Mod " . $requirement . " requirement not met! ******/"; return $return; } } } if (isset($dependancies['value'])) { $mod = $dependancies['value']; } if ($this->mod_settings[$mod_name]['decimal']) { $mod = $mod / 100; } if ($dependancies['rgba'] && !empty($mod)) { $rgba = $dependancies['rgba']; $alpha = 1; //* Get the alpha value from genesis option or theme mod if ($this->mod_settings[$rgba]['option'] === true) { $alpha = $this->mod_settings[$rgba]['decimal'] ? $this->get_field_value($rgba) / 100 : $this->get_field_value($rgba); } else { $alpha = $this->mod_settings[$rgba]['decimal'] ? get_theme_mod($rgba) / 100 : get_theme_mod($rgba); } //* Use rgba converter function $mod = hex2rgba($mod, $alpha); } //* CSS selector and open curly brace $return = $selector . " { "; //* Allow for multiple properties to be assigned the same value i.e. padding-top and padding-bottom foreach ($properties as $property) { $return .= $property . ": " . $prefix . $mod . $postfix . "; "; } //* Add other manditory properties if ($dependancies['uses']) { foreach ($dependancies['uses'] as $add_property => $add_value) { $return .= $add_property . ": " . $add_value . "; "; } } //* close curly brace and add new line $return .= " }\r\n"; //* Add other selecors with same mod value but different property if ($dependancies['siblings']) { foreach ($dependancies['siblings'] as $sibling_selector => $sibling_property) { $return .= $sibling_selector . " { " . $sibling_property . ": " . $mod . "; }\r\n"; } } //* Check dependancies for other affected properties if ($dependancies['affects']) { foreach ($dependancies['affects'] as $affect_selector) { $method = ""; $method_close = ""; $affect_properties = ""; if ($dependancies['affects_values'][$affect_selector]) { $return .= $affect_selector . " { "; $return .= $dependancies['affects_values'][$affect_selector]; $return .= " }\r\n"; } if ($dependancies['affects_factors'][$affect_selector]) { $factor_property = key($dependancies['affects_factors'][$affect_selector]); $affects_factor = current($dependancies['affects_factors'][$affect_selector]); $affects_value = $mod * $affects_factor; $return .= $affect_selector . " { "; $return .= $factor_property . ": " . $prefix . $affects_value . $postfix . "; "; $return .= " }\r\n"; } if ($dependancies['affects_percentages'][$affect_selector]) { $percent_numerator = key($dependancies['affects_percentages'][$affect_selector]); $percent_denominator = current($dependancies['affects_percentages'][$affect_selector]); $affects_percent = $this->get_field_value($percent_numerator) / $this->get_field_value($percent_denominator); $return .= $affect_selector . " { "; foreach ($affect_properties as $single_property) { $return .= $single_property . ": " . $method . $affects_percent . $method_close . "; "; } $return .= " }\r\n"; next($dependancies['affects_percentages']); } } } //* $echo is true and there are no media queries for this mod, echo it out if ($echo && !$dependancies['media_query']) { echo $return; } //* If there are media queries add them to static query array if ($dependancies['media_query']) { $media_query = $dependancies['media_query']; self::$media_queries[$media_query] .= $return; } } // end if( $mod ) return $return; }
<?php if ($this->params->get('display_home_info', '1')) { ?> <?php $auswahl_orga = str_replace(",", " +++ ", $item->auswahl_orga); ?> <tr id="tr<?php echo $item->id; ?> " style=" display:none;" > <?php if ($this->params->get('display_home_marker', '1')) { ?> <?php $rgba = hex2rgba($item->marker, 0.7); ?> <style> .td<?php echo $item->id; ?> { background: -moz-linear-gradient(top, <?php echo $rgba; ?> 0%, rgba(125,185,232,0) 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,<?php echo $rgba; ?> ), color-stop(100%,rgba(125,185,232,0))); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, <?php
function sc_zoom_box($attr, $content = null) { extract(shortcode_atts(array('image' => '', 'bg_color' => '#000', 'content_image' => '', 'link' => '', 'target' => ''), $attr)); // image | visual composer fix $image = mfn_vc_image($image); $content_image = mfn_vc_image($content_image); // target if ($target == 'prettyphoto') { $target = 'rel="prettyphoto"'; } elseif ($target) { $target = 'target="_blank"'; } else { $target = false; } $output = '<div class="zoom_box">'; if ($link) { $output .= '<a href="' . $link . '" ' . $target . '>'; } $output .= '<div class="photo">'; $output .= '<img class="scale-with-grid" src="' . $image . '" alt="" ' . mfn_get_attachment_dimensions(mfn_get_attachment_id_url($image), 'width', 1) . ' ' . mfn_get_attachment_dimensions(mfn_get_attachment_id_url($image), 'height', 1) . '/>'; $output .= '</div>'; $output .= '<div class="desc" style="background-color:' . hex2rgba($bg_color, 0.8) . ';">'; $output .= '<div class="desc_wrap">'; if ($content_image) { $output .= '<div class="desc_img">'; $output .= '<img class="scale-with-grid" src="' . $content_image . '" alt="" />'; $output .= '</div>'; } if ($content) { $output .= '<div class="desc_txt">'; $output .= do_shortcode($content); $output .= '</div>'; } $output .= '</div>'; $output .= '</div>'; if ($link) { $output .= '</a>'; } $output .= '</div>' . "\n"; return $output; }
", strokeColor: "<?php echo hex2rgba($titulos[$id]['cor_HEX'], 1); ?> ", pointColor: "#fff", pointStrokeColor: "<?php echo hex2rgba($titulos[$id]['cor_HEX'], 1); ?> ", pointHighlightFill: "<?php echo hex2rgba($titulos[$id]['cor_HEX'], 1); ?> ", pointHighlightStroke: "<?php echo hex2rgba($titulos[$id]['cor_HEX'], 1); ?> ", data: <?php echo json_encode($data); ?> } ] }; var salesChartOptions = { //Boolean - If we should show the scale at all showScale: true, //Boolean - Whether grid lines are shown across the chart scaleShowGridLines: true, //String - Colour of the grid lines
function mfn_styles_custom() { // Theme Options > Custom CSS if ($custom_css = mfn_opts_get('custom-css')) { echo '<style>' . "\n"; echo $custom_css . "\n"; echo '</style>' . "\n"; } // Page Options > Custom CSS if ($custom_css = get_post_meta(mfn_ID(), 'mfn-post-css', true)) { echo '<style>' . "\n"; echo $custom_css . "\n"; echo '</style>' . "\n"; } // Layouts > Custom Colors if ($layoutID = mfn_layout_ID()) { $layout_styles = ''; if (get_post_meta($layoutID, 'mfn-post-background-subheader', true)) { $layout_styles .= '#Subheader {background-color: ' . get_post_meta($layoutID, 'mfn-post-background-subheader', true) . ';} '; } if (get_post_meta($layoutID, 'mfn-post-color-subheader', true)) { $layout_styles .= '#Subheader .title {color: ' . get_post_meta($layoutID, 'mfn-post-color-subheader', true) . ';} '; $layout_styles .= '#Subheader ul.breadcrumbs li, #Subheader ul.breadcrumbs li a {color: ' . hex2rgba(get_post_meta($layoutID, 'mfn-post-color-subheader', true), 0.6) . ';} '; } if ($layout_styles) { echo '<style>' . "\n"; echo $layout_styles . "\n"; echo '</style>' . "\n"; } } // Demo - Custom Google Fonts for Homepages if ($_GET && key_exists('mfn-f', $_GET)) { $font_slug = str_replace('+', ' ', $_GET['mfn-f']); $font_family = str_replace('+', ' ', $font_slug); wp_enqueue_style($font_slug, 'http' . mfn_ssl() . '://fonts.googleapis.com/css?family=' . $font_slug . ':300,400'); echo '<style>'; echo 'h1, h2, h3, h4 { font-family: ' . $font_family . ' !important;}'; echo '</style>' . "\n"; } }
<?php wp_reset_postdata(); } echo '</ul></div>'; } // Else } else { $images = get_field('slider'); $count = count($images); $i = 0; if ($images) { echo '<div class="slider"><ul class="rslides">'; foreach ($images as $image) { $color = get_field('bg-color'); $rgba = hex2rgba($color, 0.8); ?> <li class="slide"> <div class="image" style="background: url('<?php echo $image['sizes']['largest']; ?> '); background-size: cover;"></div> <div class="caption" <?php if ($color) { echo 'style="background-color:' . $rgba . ';"'; } ?> > <h2><?php echo get_template_part('funct/tag');
border-top-color: <?php echo esc_attr(hex2rgba($color, 1)); ?> ; } .skill .chart{ border-color: <?php echo esc_attr(hex2rgba($color, 0.4)); ?> ; } .bg-primary , .video-controls.style-2 , .navbar .search-trigger:after, .navbar .navbar-toggle:after , .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus, .dropdown-menu > li.active > a:hover, .dropdown-menu > li.active > a:focus , .btn.btn-primary , .feature-box:hover .fbox-icon , .feature-list li:hover , .team-member:hover .caption , .facts strong i , .accordion-item.active .accordion-title a , .bg-secondary .accordion-item .accordion-title a:hover , .bg-secondary .accordion-item.active .accordion-title a , .pricing-table.pricing-highlighted , .portfolio-filters a:hover, .portfolio-filters a.active , .portfolio-item .caption .icon:hover:before , .blog-post .post-header:after , #contactform .btn:hover, #contactform .btn:focus, #contactform .btn:active{ background-color: <?php echo esc_attr(hex2rgba($color, 1)); ?> ; } <?php $out = ob_get_clean(); $expires_offset = 31536000; // 1 year header('Content-Type: text/css; charset=UTF-8'); header('Expires: ' . gmdate("D, d M Y H:i:s", time() + $expires_offset) . ' GMT'); header("Cache-Control: public, max-age={$expires_offset}"); header('Vary: Accept-Encoding'); // Handle proxies header('Content-Encoding: gzip'); echo gzencode($out);
function mfn_content_portfolio($query = false, $style = false) { global $wp_query; $output = ''; $translate['readmore'] = mfn_opts_get('translate') ? mfn_opts_get('translate-readmore', 'Read more') : __('Read more', 'betheme'); $translate['client'] = mfn_opts_get('translate') ? mfn_opts_get('translate-client', 'Client') : __('Client', 'betheme'); $translate['date'] = mfn_opts_get('translate') ? mfn_opts_get('translate-date', 'Date') : __('Date', 'betheme'); $translate['website'] = mfn_opts_get('translate') ? mfn_opts_get('translate-website', 'Website') : __('Website', 'betheme'); $translate['view'] = mfn_opts_get('translate') ? mfn_opts_get('translate-view', 'View website') : __('View website', 'betheme'); if (!$query) { $query = $wp_query; } if (!$style) { if ($_GET && key_exists('mfn-p', $_GET)) { $style = $_GET['mfn-p']; // demo } else { $style = mfn_opts_get('portfolio-layout', 'grid'); } } if ($query->have_posts()) { while ($query->have_posts()) { $query->the_post(); $item_class = array(); $categories = ''; $terms = get_the_terms(get_the_ID(), 'portfolio-types'); if (is_array($terms)) { foreach ($terms as $term) { $item_class[] = 'category-' . $term->slug; $categories .= '<a href="' . site_url() . '/portfolio-types/' . $term->slug . '">' . $term->name . '</a>, '; } $categories = substr($categories, 0, -2); } $item_class[] = get_post_meta(get_the_ID(), 'mfn-post-size', true); $item_class[] = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail'; $item_class = implode(' ', $item_class); $external = mfn_opts_get('portfolio-external'); $ext_link = get_post_meta(get_the_ID(), 'mfn-post-link', true); $large_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'large'); // item backgrounds --- // style: list if ($item_bg_image = get_post_meta(get_the_ID(), 'mfn-post-bg', true)) { $item_bg_image = ' background-image:url(' . $item_bg_image . ');'; } // style: masonry hover $item_bg_class = 'bg-' . mfn_brightness(mfn_opts_get('background-imageframe-link', '#2991d6'), 169); if ($item_bg_color = get_post_meta(get_the_ID(), 'mfn-post-bg-hover', true)) { $item_bg_class = 'bg-' . mfn_brightness($item_bg_color, 169); $item_bg_color = ' background-color:' . hex2rgba($item_bg_color, 0.9) . ';'; } // Image Link --------------------------------------------------------------------- if (in_array($external, array('disable', 'popup'))) { // disable details & link popup $link_before = '<a class="link" href="' . $large_image_url[0] . '" rel="prettyphoto">'; } elseif ($external && $ext_link) { // link to project website $link_before = '<a class="link" href="' . $ext_link . '" target="' . $external . '">'; } else { // link to project details $link_before = '<a class="link" href="' . get_permalink() . '">'; } // Echo --------------------------------------------------------------------------- $output .= '<li class="portfolio-item isotope-item ' . $item_class . '">'; if ($style == 'exposure') { // style: Exposure -------------------------------------------------------- $output .= $link_before; // photo ------------------ $output .= '<div class="image-wrapper scale-with-grid">'; $output .= get_the_post_thumbnail(get_the_ID(), 'full', array('class' => 'scale-with-grid', 'itemprop' => 'image')); $output .= '<div class="mask"></div>'; $output .= '</div>'; // title ------------------ $output .= '<div class="desc-inner">'; $output .= '<div class="section_wrapper">'; $output .= '<div class="desc-wrapper-inner">'; $output .= '<div class="line"></div>'; $output .= '<h2 class="entry-title" itemprop="headline">' . get_the_title() . '</h2>'; $output .= '<div class="desc-wrappper">'; $output .= get_the_excerpt(); $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</a>'; // details ------------------- $output .= '<div class="details-wrapper">'; $output .= '<div class="section_wrapper">'; $output .= '<div class="details-wrapper-inner">'; if ($link = get_post_meta(get_the_ID(), 'mfn-post-link', true)) { $output .= '<div class="column one-fourth website">'; $output .= '<h5 class="label">' . $translate['website'] . '</h5>'; $output .= '<h5><a target="_blank" href="' . $link . '"><i class="icon-forward"></i>' . $translate['view'] . '</a></h5>'; $output .= '</div>'; } if ($client = get_post_meta(get_the_ID(), 'mfn-post-client', true)) { $output .= '<div class="column one-fourth client">'; $output .= '<h5 class="label">' . $translate['client'] . '</h5>'; $output .= '<h5>' . $client . '</h5>'; $output .= '</div>'; } $output .= '<div class="column one-fourth date">'; $output .= '<h5 class="label">' . $translate['date'] . '</h5>'; $output .= '<h5>' . get_the_date() . '</a></h5>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; } elseif ($style == 'masonry-hover') { // style: Masonry Hover --------------------------------------------------- $output .= '<div class="masonry-hover-wrapper">'; // desc ------------------- $output .= '<div class="hover-desc ' . $item_bg_class . '" style="' . $item_bg_color . '">'; $output .= '<div class="desc-inner">'; $output .= '<h3 class="entry-title" itemprop="headline">' . $link_before . get_the_title() . '</a></h3>'; $output .= '<div class="desc-wrappper">'; $output .= get_the_excerpt(); $output .= '</div>'; $output .= '</div>'; if ($external != 'disable') { $output .= '<div class="links-wrappper clearfix">'; if (!in_array($external, array('_self', '_blank'))) { $output .= '<a class="zoom" href="' . $large_image_url[0] . '" rel="prettyphoto"><i class="icon-search"></i></a>'; } if ($ext_link) { $output .= '<a class="external" target="_blank" href="' . $ext_link . '" ><i class="icon-forward"></i></a>'; } if (!$external) { $output .= $link_before . '<i class="icon-link"></i></a>'; } $output .= '</div>'; } $output .= '</div>'; // photo ------------------ $output .= '<div class="image-wrapper scale-with-grid">'; $output .= $link_before; $output .= get_the_post_thumbnail(get_the_ID(), 'full', array('class' => 'scale-with-grid', 'itemprop' => 'image')); $output .= '</a>'; $output .= '</div>'; $output .= '</div>'; } else { // style: All ------------------------------------------------------------- $output .= '<div class="portfolio-item-fw-bg" style="' . $item_bg_color . $item_bg_image . '">'; $output .= '<div class="portfolio-item-fill"></div>'; if ($style == 'list') { $output .= '<div class="section_wrapper">'; } // style: List | Section Wrapper // style: List | Desc --------------------------------------------- $output .= '<div class="list_style_header">'; $output .= '<h3 class="entry-title" itemprop="headline">' . $link_before . get_the_title() . '</a></h3>'; $output .= '<div class="links_wrapper">'; $output .= '<a href="#" class="button button_js portfolio_prev_js"><span class="button_icon"><i class="icon-up-open"></i></span></a>'; $output .= '<a href="#" class="button button_js portfolio_next_js"><span class="button_icon"><i class="icon-down-open"></i></span></a>'; $output .= '<a href="' . get_permalink() . '" class="button button_left button_theme button_js"><span class="button_icon"><i class="icon-link"></i></span><span class="button_label">' . $translate['readmore'] . '</span></a>'; $output .= '</div>'; $output .= '</div>'; // style: All | Photo --------------------------------------------- $output .= '<div class="image_frame scale-with-grid">'; $output .= '<div class="image_wrapper">'; $output .= mfn_post_thumbnail(get_the_ID(), 'portfolio', $style); $output .= '</div>'; $output .= '</div>'; // style: All | Desc ---------------------------------------------- $output .= '<div class="desc">'; $output .= '<div class="title_wrapper">'; $output .= '<h5 class="entry-title" itemprop="headline">' . $link_before . get_the_title() . '</a></h5>'; $output .= '<div class="button-love">' . mfn_love() . '</div>'; $output .= '</div>'; $output .= '<div class="details-wrapper">'; $output .= '<dl>'; if ($client = get_post_meta(get_the_ID(), 'mfn-post-client', true)) { $output .= '<dt>' . $translate['client'] . '</dt>'; $output .= '<dd>' . $client . '</dd>'; } $output .= '<dt>' . $translate['date'] . '</dt>'; $output .= '<dd>' . get_the_date() . '</dd>'; if ($link = get_post_meta(get_the_ID(), 'mfn-post-link', true)) { $output .= '<dt>' . $translate['website'] . '</dt>'; $output .= '<dd><a target="_blank" href="' . $link . '"><i class="icon-forward"></i>' . $translate['view'] . '</a></dd>'; } $output .= '</dl>'; $output .= '</div>'; $output .= '<div class="desc-wrapper">'; $output .= get_the_excerpt(); $output .= '</div>'; $output .= '</div>'; if ($style == 'list') { $output .= '</div>'; } // style: List | end: Section Wrapper $output .= '</div>'; } $output .= '</li>'; } } return $output; }
function uxbannerShortcode($atts, $content = null) { global $flatsome_opt; $bannerid = rand(); extract(shortcode_atts(array('text_pos' => 'center', 'height' => '300px', 'text_color' => 'light', 'link' => '', 'text_width' => '60%', 'text_align' => 'center', 'text_box' => '', 'animation' => 'fadeIn', 'animate' => '', 'animation_duration' => '', 'youtube' => '', 'effect' => '', 'video_mp4' => '', 'video_ogg' => '', 'video_webm' => '', 'video_sound' => 'false', 'hover' => '', 'bg' => '', 'parallax' => '', 'parallax_text' => '', 'text_bg' => '', 'text_bg_opacity' => '0.8', 'padding' => '30px', 'callout' => '', 'callout_size' => 'small', 'target' => ''), $atts)); ob_start(); // replace ___ with a nice divider $fix = array(' ' => '', '<p></p>' => '', '<p>[' => '[', ']</p>' => ']', ']<br />' => ']', '_____' => '<div class="tx-div large"></div>', '____' => '<div class="tx-div medium"></div>', '___' => '<div class="tx-div small"></div>'); $content = strtr($content, $fix); if ($animate) { $animation = $animate; } $content = do_shortcode($content); $img_link = get_template_directory_uri() . '/img/'; $color = "light"; if ($text_color == 'light') { $color = "dark"; } if ($hover) { $hover = 'hover_' . $hover; } $animated = ""; if ($animation != "none") { $animated = "animated"; } $start_link = ""; $end_link = ""; if ($link) { $start_link = '<a href="' . $link . '">'; $end_link = '</a>'; } $background = ""; $background_color = ""; if (strpos($bg, 'http://') !== false || strpos($bg, 'https://') !== false) { $background = $bg; } elseif (strpos($bg, '#') !== false) { $background_color = 'background-color:' . $bg . '!important'; } else { $bg = wp_get_attachment_image_src($bg, 'large'); $background = $bg[0]; } $textalign = ""; if ($text_align) { $textalign = "text-" . $text_align; } if ($height == '100%') { $height = '100vh;'; } /* set rgba background */ if ($text_bg) { $text_bg = hex2rgba($text_bg, $text_bg_opacity); } $parallax_class = ''; if ($parallax) { $parallax_class = 'ux_parallax'; $parallax = 'data-velocity="' . intval($parallax) / 10 . '"'; } $text_parallax_class = ''; if ($parallax_text) { $text_parallax_class = 'parallax_text'; $parallax_text = 'data-velocity="' . intval($parallax_text) / 10 . '"'; } ?> <div id="banner_<?php echo $bannerid; ?> " class="ux_banner <?php if ($text_box) { echo 'ux-textbox-' . $text_box; } ?> <?php echo $color; ?> <?php echo $hover; ?> <?php if (!$bg) { ?> bg-trans<?php } ?> " style="height:<?php echo $height; ?> " data-height="<?php echo $height; ?> " role="banner"> <?php echo $start_link; ?> <?php if ($youtube) { ?> <iframe class="ux-youtube <?php echo $parallax_class; ?> " style="position:absolute;top:0;bottom:0;right:0;left:0;z-index:2;" <?php echo $parallax; ?> width="100%" height="100%" src="//www.youtube.com/embed/<?php echo $youtube; ?> ?rel=0&showinfo=0&autoplay=1&controls=0" frameborder="0" allowfullscreen></iframe> <?php } ?> <?php if ($bg) { ?> <div class="banner-bg <?php echo $parallax_class; ?> " <?php echo $parallax; ?> style="background-image:url(<?php echo $background; ?> ); <?php echo $background_color; ?> "></div> <?php } ?> <?php if ($video_mp4 || $video_webm || $video_ogg) { ?> <div class="video-overlay" style="position:absolute;top:0;bottom:0;right:0;left:0;z-index:2;background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0IxQjNGRDQ0QUMxMTFFMzhBQzM5OUZBMEEzN0Y1RUUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0IxQjNGRDU0QUMxMTFFMzhBQzM5OUZBMEEzN0Y1RUUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpFN0M5QzFENzRBQTcxMUUzOEFDMzk5RkEwQTM3RjVFRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpFN0M5QzFEODRBQTcxMUUzOEFDMzk5RkEwQTM3RjVFRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhPF5GwAAAAYSURBVHjaYmJgYPD6//8/AyOIAAGAAAMAPRIGSKhmMMMAAAAASUVORK5CYII=');"></div> <video class="ux-banner-video hide-for-small" <?php echo $parallax; ?> style="position:absolute;top:0;left:0;bottom:0;right:0;min-width: 100%;min-height: 100%;z-index:1;" poster="<?php echo $background; ?> " preload="auto" autoplay="" loop="loop" <?php if ($video_sound == 'false') { echo "muted='muted'"; } ?> > <source src="<?php echo $video_mp4; ?> " type="video/mp4"> <source src="<?php echo $video_webm; ?> " type="video/webm"> <source src="<?php echo $video_ogg; ?> " type="video/ogg"> </video> <?php } ?> <?php if ($effect) { ?> <div class="banner-effect"></div> <?php } ?> <div class="row parallax_text <?php echo $text_parallax_class; ?> " <?php echo $parallax_text; ?> > <div class="inner <?php echo $text_pos; ?> <?php echo $animated; ?> <?php echo $textalign; ?> <?php if ($text_bg) { echo 'text-boxed'; } ?> " data-animate="<?php echo $animation; ?> " style="width:<?php echo $text_width; ?> ; <?php if ($text_bg) { echo 'background-color:' . $text_bg . ';'; } ?> <?php if ($text_bg) { echo 'padding:' . $padding; } ?> "> <?php echo $content; ?> <?php if ($callout) { ?> <div class="callout <?php echo $flatsome_opt['bubble_style']; ?> "> <div class="inner"> <div class="inner-text"><?php echo $callout; ?> </div> </div> </div><!-- end callout --> <?php } ?> </div> </div> <?php echo $end_link; ?> <?php if ($animation_duration) { ?> <style>#banner_<?php echo $bannerid; ?> .inner{ animation-duration:<?php echo $animation_duration; ?> ; -webkit-animation-duration:<?php echo $animation_duration; ?> ; -moz-animation-duration:<?php echo $animation_duration; ?> ; -o-animation-duration:<?php echo $animation_duration; ?> ; } </style><?php } // End animation duration ?> <?php // EFFECTS // if ($effect) { if ($effect === 'snow') { ?> <style> @keyframes snow { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% { background-position: 500px 1000px, 400px 400px, 300px 300px } } @-moz-keyframes snow { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% { background-position: 500px 1000px, 400px 400px, 300px 300px } } @-webkit-keyframes snow { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% {background-position: 500px 1000px, 400px 400px, 300px 300px; } } @-ms-keyframes snow { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% { background-position: 500px 1000px, 400px 400px, 300px 300px } } #banner_<?php echo $bannerid; ?> .banner-effect { background-image:url('<?php echo get_template_directory_uri(); ?> /css/effects/snow1.png'), url('<?php echo get_template_directory_uri(); ?> /css/effects/snow2.png'); -webkit-animation: snow 20s linear infinite; -moz-animation: snow 20s linear infinite; -ms-animation: snow 20s linear infinite; animation: snow 20s linear infinite; } </style> <?php } // End snow effect ?> <?php if ($effect === 'confetti') { ?> <style> @keyframes confetti { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% { background-position: 500px 1000px, 400px 400px, 300px 300px } } @-moz-keyframes confetti { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% { background-position: 500px 1000px, 400px 400px, 300px 300px } } @-webkit-keyframes confetti { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;} } @-ms-keyframes confetti { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% { background-position: 500px 1000px, 400px 400px, 300px 300px } } #banner_<?php echo $bannerid; ?> .banner-effect { background-image:url('<?php echo get_template_directory_uri(); ?> /css/effects/confetti1.png'), url('<?php echo get_template_directory_uri(); ?> /css/effects/confetti2.png'); -webkit-animation: confetti 10s linear infinite; -moz-animation: confetti 10s linear infinite; -ms-animation: confetti 10s linear infinite; animation: confetti 10s linear infinite; } </style> <?php } // End confetti effect ?> <?php if ($effect === "sliding-glass") { ?> <style> @keyframes glass { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% { background-position: 500px 1000px, 400px 400px} } @-moz-keyframes glass { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% { background-position: 500px 1000px, 400px 400px} } @-webkit-keyframes glass { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% {background-position: 500px 1000px, -400px -400px; } } @-ms-keyframes glass { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% { background-position: 500px 1000px, 400px 400px } } #banner_<?php echo $bannerid; ?> .banner-effect { background-image:url('<?php echo get_template_directory_uri(); ?> /css/effects/glass1.png'), url('<?php echo get_template_directory_uri(); ?> /css/effects/glass2.png'); -webkit-animation: glass 30s linear infinite; -moz-animation: glass 30s linear infinite; -ms-animation: glass 30s linear infinite; animation: glass 30s linear infinite; } </style> <?php } // End sliding glass effect ?> <?php if ($effect === 'sparkle') { ?> <style> @keyframes sparkle { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% { background-position: -500px -1000px, -400px -400px, 300px 300px } } @-moz-keyframes sparkle { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% { background-position: -500px -1000px, -400px -400px, 300px 300px } } @-webkit-keyframes sparkle { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% {background-position: -500px -1000px, -200px -400px, 300px 300px; } } @-ms-keyframes sparkle { 0% { background-position: 0px 0px, 0px 0px, 0px 0px } 100% { background-position: -500px -1000px, -400px -400px, 300px 300px } } #banner_<?php echo $bannerid; ?> .banner-effect { background-image:url('<?php echo get_template_directory_uri(); ?> /css/effects/sparkle1.png'), url('<?php echo get_template_directory_uri(); ?> /css/effects/sparkle2.png'); -webkit-animation: sparkle 60s linear infinite; -moz-animation: sparkle 60s linear infinite; -ms-animation: sparkle 60s linear infinite; animation: sparkle 60s linear infinite; } </style> <?php } // End sparkle effect ?> <?php if ($effect === 'rain') { ?> <style> @keyframes rain { 0% { background-position: 0px 0px } 100% { background-position: 500px 1000px } } @-moz-keyframes rain { 0% { background-position: 0px 0px } 100% { background-position: 500px 1000px } } @-webkit-keyframes rain { 0% { background-position: 0px 0px } 100% {background-position: 500px 1000px; } } @-ms-keyframes rain { 0% { background-position: 0px 0px} 100% { background-position: 500px 1000px} } #banner_<?php echo $bannerid; ?> .banner-effect { background-image:url('<?php echo get_template_directory_uri(); ?> /css/effects/rain.png'); -webkit-animation: rain 2s linear infinite; -moz-animation: rain 2s linear infinite; -ms-animation: rain 2s linear infinite; animation: rain 2s linear infinite; } </style> <?php } // End sparkle effect } ?> </div><!-- end .ux_banner --> <?php $content = ob_get_contents(); ob_end_clean(); return $content; }
} elseif ($active_tab == 'secondary_options') { $options = get_option('pops_secondary_options'); } elseif ($active_tab == 'tertiary_options') { $options = get_option('pops_tertiary_options'); } else { $options = get_option('pops_quaternary_options'); } $publishStatus = $options['pops_text_publish_popup'] == 'published' ? '<span style="color:green;font-weight:700">PUBLISHED</span>' : '<span style="color:red;font-weight:700">NOT PUBLISHED</span>'; $button1Text = $options['pops_text_button1_text']; $button1Link = $options['pops_text_button1_link']; $button2Text = $options['pops_text_button2_text']; $button2Link = $options['pops_text_button2_link']; $button1Color = $options['pops_text_button1_color']; $button2Color = $options['pops_text_button2_color']; $bghex = $options['pops_text_content_bg']; $bgrgba = hex2rgba($bghex, 0.6); if ($active_tab == 'main_options') { $preview .= '<p style="text-align:center;">Current Status of the below "main" popup: ' . $publishStatus . '</p></div>'; if (empty($options['pops_image'])) { $preview .= '<div class="pops"> <img src="' . WP_PLUGIN_URL . '/Pops/img/no-image-selected.png"> <div class="content"> <div style="background-color:' . $bgrgba . ';" class="info-box">' . $options['pops_text_content'] . ' <div class="button-box">'; if (!empty($button1Text)) { $preview .= '<a style="background-color:' . $button1Color . ';" href="' . $button1Link . '">' . $button1Text . '</a>'; } if (!empty($button2Text)) { $preview .= '<a style="background-color:' . $button2Color . ';" href="' . $button1Link . '">' . $button2Text . '</a>'; } $preview .= '</div>