Пример #1
0
              </div><!--/#header-ads-->
            <?php 
    }
    ?>

          </div>

        <?php 
} else {
    ?>
            <a href="<?php 
    echo home_url('/');
    ?>
" rel="home">
              <img class="site-image" src="<?php 
    echo hu_get_img_src('header-image');
    ?>
" alt="<?php 
    echo get_bloginfo('name');
    ?>
">
            </a>
        <?php 
}
?>

        <?php 
if (has_nav_menu('header')) {
    ?>
          <nav class="nav-container group" id="nav-header">
            <div class="nav-toggle"><i class="fa fa-bars"></i></div>
Пример #2
0
 function hu_site_title()
 {
     // Text or image?
     if (false != hu_get_img_src('custom-logo')) {
         $logo = '<img src="' . hu_get_img_src('custom-logo') . '" alt="' . get_bloginfo('name') . '">';
     } else {
         $logo = get_bloginfo('name');
     }
     $link = '<a href="' . home_url('/') . '" rel="home">' . $logo . '</a>';
     if (is_front_page() || is_home()) {
         $sitename = '<h1 class="site-title">' . $link . '</h1>' . "\n";
     } else {
         $sitename = '<p class="site-title">' . $link . '</p>' . "\n";
     }
     return $sitename;
 }
Пример #3
0
    function hu_dynamic_css()
    {
        if (!hu_is_checked('dynamic-styles')) {
            return;
        }
        // rgb values
        $color_1 = hu_get_option('color-1');
        $color_1_rgb = hu_hex2rgb($color_1);
        // start output
        $styles = '<style type="text/css">' . "\n";
        $styles .= '/* Dynamic CSS: For no styles in head, copy and put the css below in your child theme\'s style.css, disable dynamic styles */' . "\n";
        // google fonts
        if (hu_get_option('font') == 'titillium-web-ext') {
            $styles .= 'body { font-family: "Titillium Web", Arial, sans-serif; }' . "\n";
        }
        if (hu_get_option('font') == 'droid-serif') {
            $styles .= 'body { font-family: "Droid Serif", serif; }' . "\n";
        }
        if (hu_get_option('font') == 'source-sans-pro') {
            $styles .= 'body { font-family: "Source Sans Pro", Arial, sans-serif; }' . "\n";
        }
        if (hu_get_option('font') == 'lato') {
            $styles .= 'body { font-family: "Lato", Arial, sans-serif; }' . "\n";
        }
        if (hu_get_option('font') == 'raleway') {
            $styles .= 'body { font-family: "Raleway", Arial, sans-serif; }' . "\n";
        }
        if (hu_get_option('font') == 'ubuntu' || hu_get_option('font') == 'ubuntu-cyr') {
            $styles .= 'body { font-family: "Ubuntu", Arial, sans-serif; }' . "\n";
        }
        if (hu_get_option('font') == 'roboto-condensed' || hu_get_option('font') == 'roboto-condensed-cyr') {
            $styles .= 'body { font-family: "Roboto Condensed", Arial, sans-serif; }' . "\n";
        }
        if (hu_get_option('font') == 'roboto-slab' || hu_get_option('font') == 'roboto-slab-cyr') {
            $styles .= 'body { font-family: "Roboto Slab", Arial, sans-serif; }' . "\n";
        }
        if (hu_get_option('font') == 'playfair-display' || hu_get_option('font') == 'playfair-display-cyr') {
            $styles .= 'body { font-family: "Playfair Display", Arial, sans-serif; }' . "\n";
        }
        if (hu_get_option('font') == 'open-sans' || hu_get_option('font') == 'open-sans-cyr') {
            $styles .= 'body { font-family: "Open Sans", Arial, sans-serif; }' . "\n";
        }
        if (hu_get_option('font') == 'pt-serif' || hu_get_option('font') == 'pt-serif-cyr') {
            $styles .= 'body { font-family: "PT Serif", serif; }' . "\n";
        }
        if (hu_get_option('font') == 'arial') {
            $styles .= 'body { font-family: Arial, sans-serif; }' . "\n";
        }
        if (hu_get_option('font') == 'georgia') {
            $styles .= 'body { font-family: Georgia, serif; }' . "\n";
        }
        if (hu_get_option('font') == 'verdana') {
            $styles .= 'body { font-family: Verdana, sans-serif; }' . "\n";
        }
        if (hu_get_option('font') == 'tahoma') {
            $styles .= 'body { font-family: Tahoma, sans-serif; }' . "\n";
        }
        // container width
        if (hu_get_option('container-width') != '1380') {
            if (hu_is_checked('boxed')) {
                $styles .= '.boxed #wrapper, .container-inner { max-width: ' . hu_get_option('container-width') . 'px; }' . "\n";
            } else {
                $styles .= '.container-inner { max-width: ' . hu_get_option('container-width') . 'px; }' . "\n";
            }
        }
        // sidebar padding
        if (hu_get_option('sidebar-padding') != '30') {
            $styles .= '.sidebar .widget { padding-left: ' . hu_get_option('sidebar-padding') . 'px; padding-right: ' . hu_get_option('sidebar-padding') . 'px; padding-top: ' . hu_get_option('sidebar-padding') . 'px; }' . "\n";
        }
        // primary color
        if (hu_get_option('color-1') != '#3b8dbd') {
            $styles .= '
::selection { background-color: ' . hu_get_option('color-1') . '; }
::-moz-selection { background-color: ' . hu_get_option('color-1') . '; }

a,
.themeform label .required,
#flexslider-featured .flex-direction-nav .flex-next:hover,
#flexslider-featured .flex-direction-nav .flex-prev:hover,
.post-hover:hover .post-title a,
.post-title a:hover,
.s1 .post-nav li a:hover i,
.content .post-nav li a:hover i,
.post-related a:hover,
.s1 .widget_rss ul li a,
#footer .widget_rss ul li a,
.s1 .widget_calendar a,
#footer .widget_calendar a,
.s1 .alx-tab .tab-item-category a,
.s1 .alx-posts .post-item-category a,
.s1 .alx-tab li:hover .tab-item-title a,
.s1 .alx-tab li:hover .tab-item-comment a,
.s1 .alx-posts li:hover .post-item-title a,
#footer .alx-tab .tab-item-category a,
#footer .alx-posts .post-item-category a,
#footer .alx-tab li:hover .tab-item-title a,
#footer .alx-tab li:hover .tab-item-comment a,
#footer .alx-posts li:hover .post-item-title a,
.comment-tabs li.active a,
.comment-awaiting-moderation,
.child-menu a:hover,
.child-menu .current_page_item > a,
.wp-pagenavi a { color: ' . hu_get_option('color-1') . '; }

.themeform input[type="submit"],
.themeform button[type="submit"],
.s1 .sidebar-top,
.s1 .sidebar-toggle,
#flexslider-featured .flex-control-nav li a.flex-active,
.post-tags a:hover,
.s1 .widget_calendar caption,
#footer .widget_calendar caption,
.author-bio .bio-avatar:after,
.commentlist li.bypostauthor > .comment-body:after,
.commentlist li.comment-author-admin > .comment-body:after { background-color: ' . hu_get_option('color-1') . '; }

.post-format .format-container { border-color: ' . hu_get_option('color-1') . '; }

.s1 .alx-tabs-nav li.active a,
#footer .alx-tabs-nav li.active a,
.comment-tabs li.active a,
.wp-pagenavi a:hover,
.wp-pagenavi a:active,
.wp-pagenavi span.current { border-bottom-color: ' . hu_get_option('color-1') . '!important; }
        ' . "\n";
        }
        // secondary color
        if (hu_get_option('color-2') != '#82b965') {
            $styles .= '
.s2 .post-nav li a:hover i,
.s2 .widget_rss ul li a,
.s2 .widget_calendar a,
.s2 .alx-tab .tab-item-category a,
.s2 .alx-posts .post-item-category a,
.s2 .alx-tab li:hover .tab-item-title a,
.s2 .alx-tab li:hover .tab-item-comment a,
.s2 .alx-posts li:hover .post-item-title a { color: ' . hu_get_option('color-2') . '; }

.s2 .sidebar-top,
.s2 .sidebar-toggle,
.post-comments,
.jp-play-bar,
.jp-volume-bar-value,
.s2 .widget_calendar caption { background-color: ' . hu_get_option('color-2') . '; }

.s2 .alx-tabs-nav li.active a { border-bottom-color: ' . hu_get_option('color-2') . '; }
.post-comments span:before { border-right-color: ' . hu_get_option('color-2') . '; }
        ' . "\n";
        }
        // topbar color
        if (hu_get_option('color-topbar') != '#26272b') {
            $styles .= '
.search-expand,
#nav-topbar.nav-container { background-color: ' . hu_get_option('color-topbar') . '; }
@media only screen and (min-width: 720px) {
  #nav-topbar .nav ul { background-color: ' . hu_get_option('color-topbar') . '; }
}
        ' . "\n";
        }
        // header color
        if (hu_get_option('color-header') != '#33363b') {
            $styles .= '
#header { background-color: ' . hu_get_option('color-header') . '; }
@media only screen and (min-width: 720px) {
  #nav-header .nav ul { background-color: ' . hu_get_option('color-header') . '; }
}
        ' . "\n";
        }
        // header menu color
        if (hu_get_option('color-header-menu') != '') {
            $styles .= '
#nav-header.nav-container { background-color: ' . hu_get_option('color-header-menu') . '; }
@media only screen and (min-width: 720px) {
  #nav-header .nav ul { background-color: ' . hu_get_option('color-header-menu') . '; }
}
        ' . "\n";
        }
        // footer color
        if (hu_get_option('color-footer') != '#33363b') {
            $styles .= '#footer-bottom { background-color: ' . hu_get_option('color-footer') . '; }' . "\n";
        }
        // header logo max-height
        if (hu_get_option('logo-max-height') != '60') {
            $styles .= '.site-title a img { max-height: ' . hu_get_option('logo-max-height') . 'px; }' . "\n";
        }
        // image border radius
        if (hu_get_option('image-border-radius') != '0') {
            $styles .= 'img { -webkit-border-radius: ' . hu_get_option('image-border-radius') . 'px; border-radius: ' . hu_get_option('image-border-radius') . 'px; }' . "\n";
        }
        // // body background (old)
        // if ( hu_get_option('body-background') != '#eaeaea' ) {
        //  $styles .= 'body { background-color: '.hu_get_option('body-background').'; }'."\n";
        // }
        // body background (@fromfull) => keep on wp.org
        $body_bg = hu_get_option('body-background');
        if (!empty($body_bg)) {
            //for users of wp.org version prior to 3.0+, this option is an hex color string.
            if (is_string($body_bg)) {
                $styles .= 'body { background-color: ' . $body_bg . '; }' . "\n";
            } elseif (is_array($body_bg)) {
                //set-up sub-options
                foreach (array('color', 'image', 'attachment', 'position', 'size', 'repeat') as $prop) {
                    $body_bg["background-{$prop}"] = isset($body_bg["background-{$prop}"]) ? $body_bg["background-{$prop}"] : '';
                }
                //background_image retrieve src
                $body_bg['background-image'] = hu_get_img_src($body_bg['background-image']);
                //set-up style
                if ($body_bg['background-image'] && $body_bg['background-size'] == "") {
                    $styles .= 'body { background: ' . $body_bg['background-color'] . ' url(' . $body_bg['background-image'] . ') ' . $body_bg['background-attachment'] . ' ' . $body_bg['background-position'] . ' ' . $body_bg['background-repeat'] . '; }' . "\n";
                } elseif ($body_bg['background-image'] && $body_bg['background-size'] != "") {
                    $styles .= 'body { background: ' . $body_bg['background-color'] . ' url(' . $body_bg['background-image'] . ') ' . $body_bg['background-attachment'] . ' ' . $body_bg['background-position'] . ' ' . $body_bg['background-repeat'] . '; background-size: ' . $body_bg['background-size'] . '; }' . "\n";
                } elseif ($body_bg['background-color']) {
                    $styles .= 'body { background-color: ' . $body_bg['background-color'] . '; }' . "\n";
                }
            }
        }
        $styles .= '</style>' . "\n";
        // end output
        echo $styles;
    }
Пример #4
0
</div>
      </nav><!--/#nav-footer-->
    <?php 
}
?>

    <section class="container" id="footer-bottom">
      <div class="container-inner">

        <a id="back-to-top" href="#"><i class="fa fa-angle-up"></i></a>

        <div class="pad group">

          <div class="grid one-half">
            <?php 
$_footer_logo_img_src = hu_get_img_src('footer-logo');
?>
            <?php 
if (false !== $_footer_logo_img_src && !empty($_footer_logo_img_src)) {
    ?>
              <img id="footer-logo" src="<?php 
    echo $_footer_logo_img_src;
    ?>
" alt="<?php 
    get_bloginfo('name');
    ?>
">
            <?php 
}
?>
Пример #5
0
/**
* wrapper of hu_get_img_src specific for theme options
* @return logo src string
*/
function hu_get_img_src_from_option($option_name)
{
    $_img_option = esc_attr(hu_get_option($option_name));
    if (!$_img_option) {
        return;
    }
    $_logo_src = hu_get_img_src($_img_option);
    //hook
    return apply_filters("hu_logo_src", $_logo_src);
}