Beispiel #1
0
function vellum_uber_menu($args)
{
    $layout_data = get_layout_options('other_options');
    $layoutStyle = isset($layout_data['layout-style']) && !empty($layout_data['layout-style']) ? $layout_data['layout-style'] : get_options_data('options-page', 'layout-style', 'boxed');
    if ($layoutStyle == 'boxed-left' || $layoutStyle == 'boxed-right' || $layoutStyle == 'full-width-left' || $layoutStyle == 'full-width-right') {
        $args['container_class'] = str_replace('ubermenu-horizontal', 'ubermenu-vertical', $args['container_class']);
    } else {
        $args['container_class'] = str_replace('ubermenu-vertical', 'ubermenu-horizontal', $args['container_class']);
    }
    if ($layoutStyle == 'boxed-right' || $layoutStyle == 'full-width-right') {
        $args['container_class'] .= " ubermenu-right-direction";
    }
    return $args;
}
 function theme_custom_scripts()
 {
     // Custom layout specific settings (other/design options)
     $layout_data = get_layout_options('other_options');
     $layout_options = isset($layout_data) ? $layout_data : false;
     // Error checking - make sure the fade in content overlay is removed
     echo "setTimeout( function() { if ( jQuery('#FadeInContent').is(':visible') ) { jQuery('#FadeInContent').css('display','none'); }}, 1500);";
     // Top banner dock
     $layoutStyle = isset($layout_options['layout-style']) && !empty($layout_options['layout-style']) ? $layout_options['layout-style'] : get_options_data('options-page', 'layout-style', 'boxed');
     $scrollDock = get_options_data('options-page', 'dock-on-scroll');
     if (!empty($scrollDock) && $scrollDock !== 'false' && !(empty($layoutStyle) || $layoutStyle == 'boxed-left' || $layoutStyle == 'full-width-left' || $layoutStyle == 'boxed-right' || $layoutStyle == 'full-width-right')) {
         echo 'var dock_topBanner="' . $scrollDock . '";';
     } else {
         echo 'var dock_topBanner=false;';
     }
     // Styled scrollbars
     $smoothScroll = get_options_data('options-page', 'smooth-scrolling', '');
     if (isset($smoothScroll) && $smoothScroll == 'custom-scrollbars') {
         echo 'var theme_smoothScroll="custom";';
     } elseif (isset($smoothScroll) && $smoothScroll == 'custom-scrollbars-no-ff') {
         echo 'var theme_smoothScroll="custom-no-ff";';
     } elseif (isset($smoothScroll) && $smoothScroll == 'smooth-chrome') {
         echo 'var theme_smoothScroll="chrome";';
     } else {
         echo 'var theme_smoothScroll=false;';
     }
     // Custom JavaScript
     $customJS = stripslashes(htmlspecialchars_decode(get_options_data('options-page', 'custom-js'), ENT_QUOTES));
     $customJS = preg_replace('/<script\\b[^>]*>(.*?)<\\/script>/is', "\$1", $customJS);
     if (!empty($customJS)) {
         echo $customJS;
     }
     // Special feature for logged in users. Shows edit link: Ctrl + Click
     if (is_user_logged_in()) {
         echo 'jQuery(function($) { $("body").click(function(e) { if(e.ctrlKey) { editLink = $(".edit-link"); if (editLink.length) { editLink.toggle(); } } }); });';
     }
 }
Beispiel #3
0
    }
}
?>
	
				<div class="masthead-row logo-wrapper">
					<div class="inner-wrapper">
						<?php 
// Logo
//................................................................
$home_url = get_options_data('options-page', 'logo-url') ? get_options_data('options-page', 'logo-url') : home_url('/');
// The logo image or text
$logo = get_bloginfo('name');
$logoImage = get_options_data('options-page', 'logo-image');
$logoMobile = get_options_data('options-page', 'logo-mobile');
$logoWidth = get_options_data('options-page', 'logo-width');
$logoAlt = get_options_data('options-page', 'logo-title');
$logoClass = 'logo';
if (isset($header['header-alternate-logo']) && !empty($header['header-alternate-logo'])) {
    $logoImage = $header['header-alternate-logo'];
    $logoMobile = $logoImage;
    // may add an option for alternate mobile logo
    $logoWidth = isset($header['header-alternate-logo-width']) ? $header['header-alternate-logo-width'] : '';
}
if (!isset($logoMobile) || empty($logoMobile)) {
    $logoMobile = $logoImage;
    // may add an option for alternate mobile logo
}
if ($logoImage) {
    $logoWidth = isset($logoWidth) && !empty($logoWidth) ? 'style="width: ' . intval($logoWidth) . 'px"' : '';
    $logoAlt = isset($logoAlt) && !empty($logoAlt) ? 'alt="' . $logoAlt . '"' : '';
    $desktopLogo = '<img src="' . $logoImage . '" ' . $logoAlt . ' ' . $logoWidth . ' class="logoDesktop hidden-phone">';
 function theme_custom_styles()
 {
     // Get header and footer information
     $header_data = get_layout_options('header');
     $header = isset($header_data) ? $header_data : false;
     $footer_data = get_layout_options('footer');
     $footer = isset($footer_data) ? $footer_data : false;
     // Get "other" layout data
     $layout_data = get_layout_options('other_options');
     $layout_options = isset($layout_data) ? $layout_data : false;
     // Styles variable
     $CustomStyles = '';
     #-----------------------------------------------------------------
     # Styles from Theme Options
     #-----------------------------------------------------------------
     // Accent Color - Primary
     //................................................................
     $accent_1_default = get_options_data('options-page', 'accent-color-1');
     // default
     $accent_1_layout = isset($layout_options['accent-color-1']) ? $layout_options['accent-color-1'] : '';
     // layout specific
     $accent_1 = !empty($accent_1_layout) && $accent_1_layout !== '#' ? $accent_1_layout : $accent_1_default;
     if (!empty($accent_1) && $accent_1 !== '#') {
         $accentStyles = '.accent-primary, article.format-quote a:hover .post-header, article.format-link a:hover .post-header, .overlay-effect-slide .inner-overlay i, .overlay-effect-accent .inner-overlay, .overlay-effect-zoom-accent .inner-overlay, .jp-play-bar, .jp-volume-bar-value, .impactBtn, .impactBtn:hover, .impactBtn:active, body a.impactBtn, body a.impactBtn:link, body a.impactBtn:visited, .wpb_call_to_action .wpb_button.wpb_accent-primary, .wpb_call_to_action .wpb_button.wpb_accent-primary:hover, .wpb_call_to_action .wpb_button.wpb_accent-primary:active, .vc_progress_bar .vc_single_bar.accent-primary .vc_bar { background-color: ' . $accent_1 . '; }';
         $accentStyles .= '.accent-primary-border, .inner-overlay i, [class*="image-border-"] img, img[class*="image-border-"], .wpb_button.wpb_accent-primary, .wpb_button.wpb_accent-primary:active { border-color: ' . $accent_1 . '; }';
         $accentStyles .= 'div.wpb_tour .ui-tabs .ui-tabs-nav li.ui-tabs-active a, div.wpb_tour .ui-tabs .ui-tabs-nav li.ui-tabs-active a:hover, .ubermenu ul.ubermenu-nav > li.ubermenu-item.ubermenu-current-menu-item > .ubermenu-target  { border-bottom-color: ' . $accent_1 . '; }';
         $accentStyles .= '.accent-primary-color, h1 em, h2 em, h3 em, h4 em, h5 em, h6 em, h2.wpb_call_text em, .iconBox.icon i.fa, div.wpb_wrapper h4.wpb_toggle:hover:before, div.wpb_accordion .wpb_accordion_wrapper .ui-accordion-header:hover .ui-icon, .inner-overlay i.fa, .wpb_button.wpb_accent-primary, .wpb_button.wpb_accent-primary:active, .woocommerce ul.products li.product .price, .woocommerce-page ul.products li.product .price { color: ' . $accent_1 . '; -webkit-text-stroke-color: ' . $accent_1 . '; }';
         // Add styles to CSS variable
         $CustomStyles .= $accentStyles;
     }
     // Body background
     //................................................................
     // Layout specific setting
     $layoutBgColor = isset($layout_options['background-color']) ? $layout_options['background-color'] : '';
     $layoutBgPosition = isset($layout_options['background-position']) ? $layout_options['background-position'] : '';
     $layoutBgRepeat = isset($layout_options['background-repeat']) ? $layout_options['background-repeat'] : '';
     $layoutBgImage = isset($layout_options['background-image']) ? $layout_options['background-image'] : '';
     // Theme options "default" setting
     $defaultBgColor = get_options_data('options-page', 'background-color');
     $defaultBgPosition = get_options_data('options-page', 'background-position');
     $defaultBgRepeat = get_options_data('options-page', 'background-repeat');
     $defaultBgImage = get_options_data('options-page', 'background-image');
     // Select layout or default
     $bodyBgColor = !empty($layoutBgColor) && $layoutBgColor !== '#' ? $layoutBgColor : $defaultBgColor;
     $bodyPosition = !empty($layoutBgPosition) ? $layoutBgPosition : $defaultBgPosition;
     $bodyRepeat = !empty($layoutBgRepeat) ? $layoutBgRepeat : $defaultBgRepeat;
     $bodyImage = !empty($layoutBgImage) ? $layoutBgImage : $defaultBgImage;
     $bodyBg = '';
     if ($bodyBgColor && $bodyBgColor != '#') {
         $bodyBg = 'background-color: ' . $bodyBgColor . '; ';
     }
     if ($bodyImage) {
         $bodyBg .= 'background-image: url(' . $bodyImage . '); ';
         $bodyBg .= 'background-repeat: ' . $bodyRepeat . '; ';
         if ($bodyPosition == 'cover') {
             $bodyBg .= 'background-size: cover; ';
             $bodyBg .= 'background-attachment: fixed; ';
             $bodyBg .= 'background-position: center; ';
         } elseif ($bodyPosition == 'cover-only') {
             $bodyBg .= 'background-size: cover; ';
         } elseif (!empty($bodyPosition)) {
             $bodyBg .= 'background-position: ' . $bodyPosition . ' top; ';
         }
     }
     if (isset($bodyBg)) {
         $bodyBgStyles = 'body, body.boxed { ' . $bodyBg . '; }';
         // Add styles to CSS variable
         $CustomStyles .= $bodyBgStyles;
     }
     // Design width
     //................................................................
     $designWidth = isset($layout_options['design-width']) && !empty($layout_options['design-width']) ? $layout_options['design-width'] : get_options_data('options-page', 'design-width');
     if ($designWidth && $designWidth != '') {
         $width = str_replace(' ', '', strtolower($designWidth));
         if (strpos($width, 'px') === false && strpos($width, '%') === false) {
             $width = $width . 'px';
         }
         $design_MaxWidth = $width;
     }
     if (isset($design_MaxWidth)) {
         $designWidthStyles = 'body.boxed #page, body.boxed-left #page, body.boxed-right #page, #Top, #Middle, #Bottom, .full-width .masthead-row, .boxed .masthead-row { max-width: ' . $design_MaxWidth . '; }';
         // Add styles to CSS variable
         $CustomStyles .= $designWidthStyles;
     }
     // Content position on page
     //................................................................
     $contentPos = isset($layout_options['content-position']) && !empty($layout_options['content-position']) ? $layout_options['content-position'] : get_options_data('options-page', 'content-position');
     if ($contentPos == 'left' || $contentPos == 'right') {
         $content_position = 'margin-' . $contentPos . ': 0;';
     }
     if (isset($content_position)) {
         $designContentPosition = '#Top, #Middle, #Bottom, .boxed #page, .boxed-left #page, .boxed-right #page, .full-width .masthead-row, .boxed .masthead-row { ' . $content_position . ' }';
         // Add styles to CSS variable
         $CustomStyles .= $designContentPosition;
     }
     // Links
     //................................................................
     $linkColor = isset($layout_options['link-color']) && !empty($layout_options['link-color']) && $layout_options['link-color'] !== '#' ? $layout_options['link-color'] : get_options_data('options-page', 'link-color');
     if (!empty($linkColor) && $linkColor != '#') {
         $linkStyles = "a, .widget a { color: " . $linkColor . "; }";
         // Add styles to CSS variable
         $CustomStyles .= $linkStyles;
     }
     // Hover (links)
     $hoverColor = isset($layout_options['link-hover-color']) && !empty($layout_options['link-hover-color']) && $layout_options['link-hover-color'] !== '#' ? $layout_options['link-hover-color'] : get_options_data('options-page', 'link-hover-color');
     if (!empty($hoverColor) && $hoverColor != '#') {
         $linkHoverStyles = "a:hover, .entry-title a:hover, .widget a:hover, .wpb_carousel .post-title a:hover, .masthead-container .widget-area a:hover { color: " . $hoverColor . "; }";
         // Add styles to CSS variable
         $CustomStyles .= $linkHoverStyles;
     }
     // Menu
     //................................................................
     // Color menu font
     $menu_font_color = get_options_data('options-page', 'menu-font-color');
     $header_font_color = isset($header['menu-font-color']) ? $header['menu-font-color'] : '';
     $menu_color = !empty($header_font_color) && $header_font_color != '#' ? $header_font_color : $menu_font_color;
     $font_Menu = get_options_data('options-page', 'font-menu-standard', 'default');
     $gFont_Menu = get_options_data('options-page', 'font-menu-google');
     $menuFont = false;
     $menuFontSize = false;
     $menuFontStyles = '';
     // Standard Font Index
     $standard_font = array("arial" => "Arial,Helvetica,Garuda,sans-serif", "arial-black" => "'Arial Black',Gadget,sans-serif", "courier-new" => "'Courier New',Courier,monospace", "georgia" => "Georgia,'Times New Roman',Times, serif", "lucida-console" => "'Lucida Console',Monaco,monospace", "lucida-sans-unicode" => "'Lucida Sans Unicode','Lucida Grande',sans-serif", "palatino-linotype" => "'Palatino Linotype','Book Antiqua',Palatino,serif", "tahoma" => "Tahoma,Geneva,sans-serif", "times-new-roman" => "'Times New Roman',Times,serif", "trebuchet-ms" => "'Trebuchet MS',Arial,Helvetica,sans-serif", "verdana" => "Verdana,Geneva,sans-serif");
     // Font Color
     if (!empty($menu_color) && $menu_color != '#') {
         $menuFontStyles .= 'color:' . $menu_color . '; text-shadow: none;';
     }
     // Font Face
     if (!empty($gFont_Menu)) {
         // Get just the font name
         $menuFont = str_replace('+', ' ', substr($gFont_Menu, 0, strpos($gFont_Menu, ':') ? strpos($gFont_Menu, ':') : strlen($gFont_Menu)));
     } elseif (!empty($font_Menu) && $font_Menu != 'default') {
         $menuFont = $standard_font[$font_Menu];
     }
     if ($menuFont) {
         // Get the styles
         $menuFontStyles .= 'font-family: ' . $menuFont . ';';
     }
     // Font Size
     $menuFontSize = trim(get_options_data('options-page', 'font-menu-size', 'false'));
     if ($menuFontSize !== 'false' && !empty($menuFontSize)) {
         if (!strpos($menuFontSize, 'px') && !strpos($menuFontSize, 'em') && !strpos($menuFontSize, 'rem')) {
             $menuFontSize .= 'px';
         }
         $menuFontStyles .= 'font-size: ' . $menuFontSize . ';';
     }
     // Add menu styles
     if (!empty($menuFontStyles)) {
         $CustomStyles .= '#MainNav .ubermenu-main .ubermenu-item-level-0 > .ubermenu-target, #MainNav .ubermenu-main .ubermenu-item-level-0 > .ubermenu-target:hover { ' . $menuFontStyles . ' }';
     }
     // Color active menu button
     $menu_active_color = get_options_data('options-page', 'menu-active-color');
     $header_active_color = isset($header['menu-active-color']) ? $header['menu-active-color'] : '';
     $active_color = !empty($header_active_color) && $header_active_color != '#' ? $header_active_color : $menu_active_color;
     if (!empty($active_color) && $active_color != '#') {
         $CustomStyles .= '#MainNav .ubermenu-main .ubermenu-item-level-0.ubermenu-current-menu-item > .ubermenu-target, #MainNav .ubermenu-main .ubermenu-item-level-0.ubermenu-current-menu-parent > .ubermenu-target, #MainNav .ubermenu-main .ubermenu-item-level-0.ubermenu-current-menu-ancestor > .ubermenu-target, #MainNav .ubermenu-main .ubermenu-item-level-0.ubermenu-current-menu-item > .ubermenu-target:hover, #MainNav .ubermenu-main .ubermenu-item-level-0.ubermenu-current-menu-parent > .ubermenu-target:hover, #MainNav .ubermenu-main .ubermenu-item-level-0.ubermenu-current-menu-ancestor > .ubermenu-target:hover { color:' . $active_color . ' }';
     }
     // Masthead background
     //................................................................
     // Default color & image
     $mastheadBg = false;
     $mastheadBgRepeat = 'no-repeat';
     $mastheadBgPosition = 'left';
     $mastheadBgColor = get_options_data('options-page', 'masthead-background-color');
     if ($mastheadBgImage = get_options_data('options-page', 'masthead-background-image')) {
         $mastheadBgRepeat = get_options_data('options-page', 'masthead-background-repeat');
         $mastheadBgPosition = get_options_data('options-page', 'masthead-background-position');
     }
     // Masthead specific color & image
     if (!empty($header['masthead-background-color']) && $header['masthead-background-color'] !== '#') {
         $mastheadBgColor = $header['masthead-background-color'];
     }
     if (!empty($header['masthead-background-image'])) {
         $mastheadBgImage = $header['masthead-background-image'];
         $mastheadBgImage = strtolower($mastheadBgImage) == 'none' ? '' : $mastheadBgImage;
         if (!empty($header['masthead-background-repeat'])) {
             $mastheadBgRepeat = $header['masthead-background-repeat'];
         }
         if (!empty($header['masthead-background-position'])) {
             $mastheadBgPosition = $header['masthead-background-position'];
         }
     }
     // Prepare the CSS
     if (isset($mastheadBgColor) && !empty($mastheadBgColor) && $mastheadBgColor != '#') {
         $mastheadBg = 'background-color: ' . $mastheadBgColor . '; ';
         $CustomStyles .= '#masthead {' . $mastheadBg . '}';
     }
     if (isset($mastheadBgImage) && !empty($mastheadBgImage)) {
         $mastheadBg .= 'background-image: url(' . $mastheadBgImage . '); ';
         $mastheadBg .= 'background-position: ' . $mastheadBgPosition . ' top; ';
         if ($mastheadBgRepeat == 'cover' || $mastheadBgRepeat == 'contain') {
             $mastheadBg .= 'background-size: ' . $mastheadBgRepeat . '; ';
             $mastheadBg .= 'background-repeat: no-repeat; ';
         } else {
             $mastheadBg .= 'background-repeat: ' . $mastheadBgRepeat . '; ';
         }
     }
     // Output the CSS
     if ($mastheadBg) {
         // Get the styles
         $mastheadStyles = '.boxed #masthead, .full-width #masthead, .boxed-left .masthead-vertical-bg, .full-width-left .masthead-vertical-bg, .boxed-right .masthead-vertical-bg, .full-width-right .masthead-vertical-bg { ' . $mastheadBg . ' }';
         // Add styles to CSS variable
         $CustomStyles .= $mastheadStyles;
     }
     // Masthead gradient overlay
     //................................................................
     // Layout specific setting
     $layoutTopGradient = isset($header['masthead-gradient-top-opacity']) ? $header['masthead-gradient-top-opacity'] : '';
     $layoutBottomGradient = isset($header['masthead-gradient-bottom-opacity']) ? $header['masthead-gradient-bottom-opacity'] : '';
     // Theme options "default" setting
     $defaultTopGradient = get_options_data('options-page', 'masthead-gradient-top-opacity');
     $defaultBottomGradient = get_options_data('options-page', 'masthead-gradient-bottom-opacity');
     // Select layout or default
     $mastheadTopGradient = isset($layoutTopGradient) && !empty($layoutTopGradient) ? $layoutTopGradient : $defaultTopGradient;
     $mastheadBottomGradient = isset($layoutBottomGradient) && !empty($layoutBottomGradient) ? $layoutBottomGradient : $defaultBottomGradient;
     // Prepare the CSS
     if (isset($mastheadTopGradient) && !empty($mastheadTopGradient)) {
         if ($mastheadTopGradient == 'zero') {
             $mastheadTopGradient = 0;
         }
         $mastheadTopOpacity = 'opacity: ' . $mastheadTopGradient . '; ';
     }
     if (isset($mastheadBottomGradient) && !empty($mastheadBottomGradient)) {
         if ($mastheadBottomGradient == 'zero') {
             $mastheadBottomGradient = 0;
         }
         $mastheadBottomOpacity = 'opacity: ' . $mastheadBottomGradient . '; ';
     }
     // Output the CSS
     if ($mastheadTopOpacity) {
         // Add styles to CSS variable
         $CustomStyles .= '.masthead-container > .top-wrapper:before { ' . $mastheadTopOpacity . '; }';
     }
     if ($mastheadBottomOpacity) {
         // Add styles to CSS variable
         $CustomStyles .= '#MastheadSidebar-2 .widget-area:before { ' . $mastheadBottomOpacity . '; }';
     }
     // Header background
     //................................................................
     // Default color & image
     $headerBg = false;
     $headerBgRepeat = 'no-repeat';
     $headerBgPosition = 'left';
     $headerBgColor = get_options_data('options-page', 'header-background-color');
     if ($headerBgImage = get_options_data('options-page', 'header-background-image')) {
         $headerBgRepeat = get_options_data('options-page', 'header-background-repeat');
         $headerBgPosition = get_options_data('options-page', 'header-background-position');
     }
     // Header specific color & image
     if (!empty($header['header-background-color']) && $header['header-background-color'] != '#') {
         $headerBgColor = $header['header-background-color'];
     }
     if (!empty($header['header-background-image'])) {
         $headerBgImage = $header['header-background-image'];
         if (!empty($header['header-background-repeat'])) {
             $headerBgRepeat = $header['header-background-repeat'];
         }
         if (!empty($header['header-background-position'])) {
             $headerBgPosition = $header['header-background-position'];
         }
     }
     // Prepare the CSS
     if (isset($headerBgColor) && !empty($headerBgColor) && $headerBgColor != '#') {
         $headerBg = 'background-color: ' . $headerBgColor . '; ';
     }
     if (isset($headerBgImage) && !empty($headerBgImage)) {
         $headerBg .= 'background-image: url(' . $headerBgImage . '); ';
         $headerBg .= 'background-position: ' . $headerBgPosition . ' top; ';
         if ($headerBgRepeat == 'cover' || $headerBgRepeat == 'contain') {
             $headerBg .= 'background-size: ' . $headerBgRepeat . '; ';
             $headerBg .= 'background-repeat: no-repeat; ';
         } else {
             $headerBg .= 'background-repeat: ' . $headerBgRepeat . '; ';
         }
     }
     // Output the CSS
     if ($headerBg) {
         // Get the styles
         $headerStyles = '#TopContent_1, #TopContent_2 { ' . $headerBg . ' }';
         // Add styles to CSS variable
         $CustomStyles .= $headerStyles;
     }
     // Footer Top background
     //................................................................
     // Default color & image
     $footerTopBg = false;
     $footerTopBgRepeat = 'no-repeat';
     $footerTopBgPosition = 'left';
     $footerTopBgColor = get_options_data('options-page', 'footer-top-background-color');
     if ($footerTopBgImage = get_options_data('options-page', 'footer-top-background-image')) {
         $footerTopBgRepeat = get_options_data('options-page', 'footer-top-background-repeat');
         $footerTopBgPosition = get_options_data('options-page', 'footer-top-background-position');
     }
     // Header specific color & image
     if (!empty($footer['footer-top-background-color']) && $footer['footer-top-background-color'] != '#') {
         $footerTopBgColor = $footer['footer-top-background-color'];
     }
     if (!empty($footer['footer-top-background-image'])) {
         $footerTopBgImage = $footer['footer-top-background-image'];
         if (!empty($footer['footer-top-background-repeat'])) {
             $footerTopBgRepeat = $footer['footer-top-background-repeat'];
         }
         if (!empty($footer['footer-top-background-position'])) {
             $footerTopBgPosition = $footer['footer-top-background-position'];
         }
     }
     // Prepare the CSS
     if (isset($footerTopBgColor) && !empty($footerTopBgColor) && $footerTopBgColor !== '#') {
         $footerTopBg = 'background-color: ' . $footerTopBgColor . '; ';
     }
     if (isset($footerTopBgImage) && !empty($footerTopBgImage)) {
         $footerTopBg .= 'background-image: url(' . $footerTopBgImage . '); ';
         $footerTopBg .= 'background-repeat: ' . $footerTopBgRepeat . '; ';
         $footerTopBg .= 'background-position: ' . $footerTopBgPosition . ' top;';
     }
     // Output the CSS
     if ($footerTopBg) {
         // Get the styles
         $footerTopStyles = '#FooterTop { ' . $footerTopBg . '; }';
         // Add styles to CSS variable
         $CustomStyles .= $footerTopStyles;
     }
     // Footer Bottom background
     //................................................................
     // Default color & image
     $footerBg = false;
     $footerBgRepeat = 'no-repeat';
     $footerBgPosition = 'left';
     $footerBgColor = get_options_data('options-page', 'footer-bottom-background-color');
     if ($footerBgImage = get_options_data('options-page', 'footer-bottom-background-image')) {
         $footerBgRepeat = get_options_data('options-page', 'footer-bottom-background-repeat');
         $footerBgPosition = get_options_data('options-page', 'footer-bottom-background-position');
     }
     // Footer specific color & image
     if (!empty($footer['footer-bottom-background-color']) && $footer['footer-bottom-background-color'] != '#') {
         $footerBgColor = $footer['footer-bottom-background-color'];
     }
     if (!empty($footer['footer-bottom-background-image'])) {
         $footerBgImage = $footer['footer-bottom-background-image'];
         if (!empty($footer['footer-bottom-background-repeat'])) {
             $footerBgRepeat = $footer['footer-bottom-background-repeat'];
         }
         if (!empty($footer['footer-bottom-background-position'])) {
             $footerBgPosition = $footer['footer-bottom-background-position'];
         }
     }
     // Prepare the CSS
     if (isset($footerBgColor) && !empty($footerBgColor) && $footerBgColor != '#') {
         $footerBg = 'background-color: ' . $footerBgColor . '; ';
     }
     if (isset($footerBgImage) && !empty($footerBgImage)) {
         $footerBg .= 'background-image: url(' . $footerBgImage . '); ';
         $footerBg .= 'background-repeat: ' . $footerBgRepeat . '; ';
         $footerBg .= 'background-position: ' . $footerBgPosition . ' top;';
     }
     // Output the CSS
     if ($footerBg) {
         // Get the styles
         $footerBottomStyles = '#FooterBottom { ' . $footerBg . '; }';
         // Add styles to CSS variable
         $CustomStyles .= $footerBottomStyles;
     }
     // Fonts
     //................................................................
     $font_Heading = get_options_data('options-page', 'font-heading-standard', 'default');
     $font_Body = get_options_data('options-page', 'font-body-standard', 'default');
     $gFont_Heading = get_options_data('options-page', 'font-heading-google');
     $gFont_Body = get_options_data('options-page', 'font-body-google');
     $color_Heading = get_options_data('options-page', 'font-heading-color');
     $color_Body = get_options_data('options-page', 'font-body-color');
     $size_H = array('h1', 'h2', 'h3', 'h4', 'h5', 'h6');
     // Standard Font Index
     $standard_font = array("arial" => "Arial,Helvetica,Garuda,sans-serif", "arial-black" => "'Arial Black',Gadget,sans-serif", "courier-new" => "'Courier New',Courier,monospace", "georgia" => "Georgia,'Times New Roman',Times, serif", "lucida-console" => "'Lucida Console',Monaco,monospace", "lucida-sans-unicode" => "'Lucida Sans Unicode','Lucida Grande',sans-serif", "palatino-linotype" => "'Palatino Linotype','Book Antiqua',Palatino,serif", "tahoma" => "Tahoma,Geneva,sans-serif", "times-new-roman" => "'Times New Roman',Times,serif", "trebuchet-ms" => "'Trebuchet MS',Arial,Helvetica,sans-serif", "verdana" => "Verdana,Geneva,sans-serif");
     // Heading font
     //................................................................
     $headingFont = false;
     if (!empty($gFont_Heading)) {
         // Get just the font name
         $headingFont = str_replace('+', ' ', substr($gFont_Heading, 0, strpos($gFont_Heading, ':') ? strpos($gFont_Heading, ':') : strlen($gFont_Heading)));
     } elseif (!empty($font_Heading) && $font_Heading != 'default') {
         $headingFont = $standard_font[$font_Heading];
     }
     if ($headingFont) {
         // Get the styles
         $headingFontStyles = 'h1, h2, h3, h4, h5, h6, h2.wpb_call_text, .page-title, .headline, .comments-area article header cite, .vc_text_separator div, .headline, .entry-title.headline, #page .wpb_accordion .ui-accordion .ui-accordion-header { font-family: ' . $headingFont . '; }';
         // Add styles to CSS variable
         $CustomStyles .= $headingFontStyles;
     }
     if (!empty($color_Heading) && $color_Heading !== '#') {
         // Get RGB version of color
         $colorHeading_rgba = get_as_rgba($color_Heading, '.85');
         // at .85 opacity
         // Get the styles
         $headingColorStyles = 'h1, h2, h3, h4, h5, h6, h2.wpb_call_text, .page-title, .headline, .comments-area article header cite, div.wpb_wrapper h4.wpb_toggle, .vc_text_separator div, #page .wpb_accordion .ui-accordion .ui-accordion-header a, #page .wpb_accordion .ui-accordion .ui-accordion-header a:hover, .site-header .site-title a, .entry-title, .entry-title a, .widget .content-rotator-heading, .wpb_carousel .post-title a, .widget-area .widget li[class*="current"] a, .iconBox.icon i.fa, .iconBox .iconBoxTitle, .rotator .entry-title a { color: ' . $color_Heading . '; -webkit-text-stroke: 0.015em ' . $colorHeading_rgba . '; }';
         // Add styles to CSS variable
         $CustomStyles .= $headingColorStyles;
     }
     // Headings sizes
     foreach ($size_H as $h) {
         $size = trim(get_options_data('options-page', 'font-' . $h . '-size', 'false'));
         if ($size !== 'false' && !empty($size)) {
             if (!strpos($size, 'px') && !strpos($size, 'em') && !strpos($size, 'rem')) {
                 $size .= 'px';
             }
             $CustomStyles .= $h . ' { font-size: ' . $size . ' }';
         }
     }
     // Body font
     //................................................................
     $bodyFont = false;
     $bodyFontSize = false;
     $bodyFontStyles = '';
     // Font Face
     if (!empty($gFont_Body)) {
         // Get just the font name
         $bodyFont = str_replace('+', ' ', substr($gFont_Body, 0, strpos($gFont_Body, ':')));
         $bodyFont = str_replace('+', ' ', substr($gFont_Body, 0, strpos($gFont_Body, ':') ? strpos($gFont_Body, ':') : strlen($gFont_Body)));
     } elseif (!empty($font_Body) && $font_Body != 'default') {
         $bodyFont = $standard_font[$font_Body];
     }
     if ($bodyFont && !empty($bodyFont)) {
         $bodyFontStyles .= 'font-family: ' . $bodyFont . ';';
     }
     // Font Color
     if (!empty($color_Body) && $color_Body != '#') {
         $bodyFontStyles .= 'color: ' . $color_Body . ';';
     }
     // Font Size
     $bodyFontSize = trim(get_options_data('options-page', 'font-body-size', 'false'));
     if ($bodyFontSize !== 'false' && !empty($bodyFontSize)) {
         if (!strpos($bodyFontSize, 'px') && !strpos($bodyFontSize, 'em') && !strpos($bodyFontSize, 'rem')) {
             $bodyFontSize .= 'px';
         }
         $bodyFontStyles .= 'font-size: ' . $bodyFontSize . ';';
     }
     // Add custom styles
     if (!empty($bodyFontStyles)) {
         $CustomStyles .= 'body { ' . $bodyFontStyles . ' }';
     }
     // Custom CSS (user generated)
     //................................................................
     $userStyles = stripslashes(htmlspecialchars_decode(get_options_data('options-page', 'custom-styles'), ENT_QUOTES));
     // Add styles to CSS variable
     $CustomStyles .= $userStyles;
     // all done!
     return $CustomStyles;
 }
$fromShortcode = $custom_query ? true : false;
// Layout variables - Set size of image and content columns (specify # of columns 1-12 , total must = 12)
$column_left = 5;
$column_right = MAX_COLUMNS - $column_left;
// 12 - 5 = 7
if ($fromShortcode) {
    // For shortcode just include blog posts loop
    get_template_part('templates/blog');
} else {
    // Paging doesn't work for page templates set as home page. This is a workaround.
    $paged = $paged ? $paged : get_query_var('page');
    if ($paged < 1) {
        $paged = 1;
    }
    // Setup the query
    $params = array('post_type' => 'post', 'paged' => $paged, 'post_excerpts' => get_options_data('blog-options', 'post-excerpts', 'false'));
    $custom_query = new WP_Query($params);
    // Include full content structure
    get_header();
    ?>

		<div id="primary" class="site-content">
			<div id="content" role="main">
				<?php 
    get_template_part('templates/blog');
    ?>
			</div><!-- #content -->
		</div><!-- #primary -->

	<?php 
    get_sidebar();
Beispiel #6
0
			<?php 
while (have_posts()) {
    the_post();
    ?>

				<article id="post-<?php 
    the_ID();
    ?>
" <?php 
    post_class();
    ?>
>
					<?php 
    // Post Navigation (next/previous links)
    //................................................................
    $showPostNav = get_options_data('blog-options', 'show-post-navigation') == 'true' ? true : false;
    if (isset($showPostNav) && $showPostNav == 'true') {
        // Show navigation
        next_and_previous_post_navigation();
    }
    ?>
					<div class="row-fluid">

						<?php 
    get_template_part('templates/post', get_post_format());
    ?>

					</div><!-- .row-fluid -->

					<?php 
    // Show comments
 function get_font_options_data($key, $option = false, $default = null)
 {
     $font_options = get_options_data($key, $option, $default);
     $options_str = str_replace(' ', '+', trim($font_options['family']));
     // if($font_options['weight'] != '' && $font_options['weight'] == 'bold') {
     // 	$options_str .= ':'.$font_options['weight'];
     // }
     // if($font_options['style'] == 'italic' || $font_options['weight'] != '') {
     // 	$options_str .= ':';
     // 	if($font_options['weight'] == 'bold' && $font_options['style'] == 'italic') {
     // 		$options_str .= "bolditalic";
     // 	}
     // 	else if($font_options['style'] == 'italic' && $font_options['weight'] != '' ){
     // 		$options_str .= 'italic'.$font_options['weight'];
     // 	}
     // 	else if($font_options['style'] == 'italic') {
     // 		$options_str .= 'italic';
     // 	}
     // 	else if($font_options['weight'] != '') {
     // 		$options_str .= $font_options['weight'];
     // 	}
     // }
     $query_args = array('family' => $options_str);
     wp_enqueue_style('google-font-' . $options_str, add_query_arg($query_args, "//fonts.googleapis.com/css"), array(), null);
     return $font_options;
 }
}
// Media
$headerClass = $column_left ? 'span' . $column_left : '';
$headerClass = has_post_thumbnail() ? $headerClass . ' player-with-image' : '';
?>
<header class="post-header <?php 
echo $headerClass;
?>
">
	<?php 
// Featured Image: Audio Player "Poster"
if (has_post_thumbnail()) {
    // Image size
    $shortcode = isset($custom_query->query) ? $custom_query->query : false;
    $size = get_post_image_size('post-thumbnail', $shortcode);
    if (is_single() && get_options_data('blog-options', 'single-post-image', 'false') !== 'true') {
        $media = false;
    } else {
        if (is_array($size)) {
            $thumb = get_post_thumbnail_id($post->ID);
            $crop = $size[0] == 0 || $size[1] == 0 ? false : true;
            $image = vt_resize($thumb, '', $size[0], $size[1], $crop);
            $media = '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '">';
        } else {
            $media = get_the_post_thumbnail($post->ID, $size);
        }
        $media .= '<div class="inner-overlay"></div>';
        // Show the image (linked if blog list)
        ?>
			<div class="featured-image">
			<?php 
Beispiel #9
0
			<div class="hr"></div>
			<div class="formContent">
				<a href="<?php 
echo site_url();
?>
/wp-login.php?action=lostpassword" id="popupLoginForgotPswd"><?php 
_e('Forgot your password?', 'framework');
?>
</a>
			</div>
		</form>
	</div>
</div>

<?php 
// Scroll to top button
//................................................................
$showBackToTop = get_options_data('options-page', 'back-to-top', 'false') == 'true' ? true : false;
if ($showBackToTop) {
    ?>
	<div id="BackToTop"><a href="#ScrollTop"><i class="fa fa-chevron-up"></i></a></div>
	<?php 
}
?>

<?php 
wp_footer();
?>

</body>
</html>
function add_theme_body_class($classes)
{
    // Get layout data
    $layout = get_layout_options();
    // Get layout data
    $layout_data = get_layout_options('other_options');
    $layout_options = !empty($layout_data) ? $layout_data : false;
    // Get header and footer information
    $header_data = get_layout_options('header');
    $header = isset($header_data) ? $header_data : false;
    // Layout Specific
    //...............................................
    if ($layout && isset($layout['title'])) {
        $classes[] = 'layout-' . sanitize_title($layout['title']);
    } else {
        // If not using Layout Manager (or if error, fallback is default WP functionality)
        $classes[] = 'no-layout';
        // More cases specific no Layout Manager
        if (!is_active_sidebar('sidebar-default') || is_page_template('templates/full-width.php') || is_page_template('templates/grid-rows.php') || is_page_template('templates/grid-rows-filtered.php') || is_page_template('templates/grid-staggered.php') || is_page_template('templates/grid-staggered-filtered.php') || is_tax('portfolio-category') || is_singular('portfolio')) {
            $classes[] = 'full-width';
        }
    }
    // Blank page
    if (is_page_template('templates/blank-page.php')) {
        $classes[] = 'blank-page';
    }
    // Layout Style
    $layout_style = !empty($layout_options['layout-style']) ? $layout_options['layout-style'] : get_options_data('options-page', 'layout-style');
    if (!empty($layout_style)) {
        $classes[] = $layout_style;
    }
    // Vertical Masthead (size)
    $masthead_size = !empty($header['masthead-size']) ? $header['masthead-size'] : get_options_data('options-page', 'masthead-size');
    if (!empty($layout_style) && ($layout_style == 'boxed-left' || $layout_style == 'full-width-left' || $layout_style == 'boxed-right' || $layout_style == 'full-width-right')) {
        $classes[] = $masthead_size;
    }
    // Image overlay effect
    $overlay_effect = get_options_data('options-page', 'image-overlay-effect');
    if (!empty($overlay_effect)) {
        $classes[] = 'overlay-effect-' . $overlay_effect;
    }
    // Skin
    $skin = get_theme_skin();
    if (isset($skin) && !empty($skin)) {
        $skin_class = str_replace('.css', '', $skin);
        $classes[] = $skin_class;
    }
    // context
    if (isset($GLOBALS['context'])) {
        $classes[] = 'context-' . $GLOBALS['context'];
    }
    // Generic WP
    //...............................................
    // Post thumbnails
    if (!is_404() && has_post_thumbnail()) {
        $classes[] = 'has-post-thumbnail';
    }
    // No author names on posts when site has only one author
    if (!is_multi_author()) {
        $classes[] = 'single-author';
    }
    return $classes;
}
function vellum_theme_menu_orientation($settings)
{
    $layoutStyle = get_options_data('options-page', 'layout-style', 'boxed');
    $settings['wpmega-orientation'] = $layoutStyle == 'boxed-left' || $layoutStyle == 'full-width-left' || $layoutStyle == 'boxed-right' || $layoutStyle == 'full-width-right' ? 'vertical' : 'horizontal';
    return $settings;
}
 function options_data($key, $option = false, $default = null)
 {
     echo get_options_data($key, $option, $default);
 }
Beispiel #13
0
<?php

/**
 * The template for displaying 404 pages (Not Found).
 */
get_header();
?>

	<div id="primary" class="site-content">
		<div id="content" role="main">

			<article id="post-0" class="post error404 no-results not-found">

				<?php 
// Check for custom 404 page content
$error_page = get_options_data('options-page', 'error-content') ? get_options_data('options-page', 'error-content') : 'default';
if ($error_page == 'default') {
    ?>
					<div style="text-align: center">
					<i class="fa fa-exclamation-circle" style="font-size: 120px; color: #ccc"></i>
					<header class="entry-header">
						<h1 style="font-size: 72px;"><?php 
    _e('Whaaaaat??!?!!1', 'framework');
    ?>
</h1>
					</header>
					<div class="entry-content">
						<p style="font-size: 20px; margin-bottom:40px;"><?php 
    _e("It seems the page you're looking for isn't here.<br>Try looking somewhere else and you might get lucky!", 'framework');
    ?>
</p>