Advertisement
jegtheme

scriptstyle.php

Jul 28th, 2015
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 26.49 KB | None | 0 0
  1. <?php
  2.  
  3. add_action('wp_enqueue_scripts', 'jeg_init_style');
  4. add_action('wp_enqueue_scripts', 'jeg_favicon');
  5. add_action('wp_enqueue_scripts', 'jeg_init_fonts');
  6. add_action('wp_enqueue_scripts', 'jeg_init_script');
  7. add_action('wp_head', 'jeg_html5shim');
  8. add_action('wp_head', 'jeg_customizer_style');
  9. add_action('wp_footer', 'jeg_additional_script');
  10.  
  11. /* ------------------------------------------------------------------------- *
  12.  *  Load CSS
  13. /* ------------------------------------------------------------------------- */
  14. function jeg_init_style() {
  15.     if(!jeg_is_login_page()) {
  16.  
  17.         $templateurl = get_template_directory_uri();
  18.  
  19.         wp_enqueue_style('wp-mediaelement',       null, JEG_VERSION);
  20.         wp_enqueue_style('jeg-fontawesome',    $templateurl .'/css/fontawesome/css/font-awesome.min.css', null, JEG_VERSION);
  21.         wp_enqueue_style('jeg-flexslider',     $templateurl .'/css/flexslider/flexslider.css', null, JEG_VERSION);
  22.         wp_enqueue_style('jeg-owlcarousel',    $templateurl .'/css/owl-carousel/owl.carousel.css', null, JEG_VERSION);
  23.         wp_enqueue_style('jeg-owltheme',       $templateurl .'/css/owl-carousel/owl.theme.css', null, JEG_VERSION);
  24.         wp_enqueue_style('jeg-owltransitions', $templateurl .'/css/owl-carousel/owl.transitions.css', null, JEG_VERSION);
  25.         wp_enqueue_style('jeg-main',           get_stylesheet_uri() , null, JEG_VERSION);
  26.         wp_enqueue_style('jeg-responsive',     $templateurl .'/css/responsive.css', null, JEG_VERSION);
  27.  
  28.     }
  29. }
  30.  
  31.  
  32. /* ------------------------------------------------------------------------- *
  33.  *  Load Javascripts
  34. /* ------------------------------------------------------------------------- */
  35. function jeg_init_script () {
  36.  
  37.     jeg_register_script();
  38.  
  39.     if(!jeg_is_login_page()) {
  40.         wp_enqueue_script( 'jquery' );
  41.         wp_enqueue_script( 'wp-mediaelement' );
  42.         wp_enqueue_script( 'jeg-main' );
  43.         wp_enqueue_script( 'jeg-hoverintent' );
  44.         wp_enqueue_script( 'jeg-flexslider' );
  45.         wp_enqueue_script( 'jeg-owlcarousel' );
  46.         wp_enqueue_script( 'jeg-events' );
  47.         wp_enqueue_script( 'jeg-mutate' );
  48.         wp_enqueue_script( 'jeg-jfollowsidebar' );
  49.         wp_enqueue_script( 'jeg-waypoints' );
  50.  
  51.         // Homepage
  52.         if (is_page_template( 'template-home.php' ) || vp_option('joption.archives_content_layout') == 'masonry' ) {
  53.             wp_enqueue_script( 'jeg-isotope' );
  54.             wp_enqueue_script( 'jeg-imagesloaded' );
  55.         }
  56.  
  57.         wp_localize_script('jeg-main', 'joption', jeg_get_admin_js_option());
  58.     }
  59. }
  60.  
  61.  
  62. function jeg_get_admin_js_option() {
  63.     $option = array();
  64.     $option['shareto'] = __('Share Article to ','jeg_textdomain');
  65.     $option['sticky'] = apply_filters('jeg_sticky_header', vp_option('joption.sticky_menu'));
  66.     return $option;
  67. }
  68.  
  69. function jeg_register_script() {
  70.  
  71.     $templateurl = get_template_directory_uri();
  72.  
  73.     wp_register_script( 'jeg-main',           $templateurl .'/js/main.js', null, JEG_VERSION, true);
  74.     wp_register_script( 'jeg-hoverintent',    $templateurl .'/js/jquery.hoverIntent.js', null, JEG_VERSION, true);
  75.     wp_register_script( 'jeg-flexslider',     $templateurl .'/js/jquery.flexslider-min.js', null, JEG_VERSION, true);
  76.     wp_register_script( 'jeg-owlcarousel',    $templateurl .'/js/owl.carousel.min.js', null, JEG_VERSION, true);
  77.     wp_register_script( 'jeg-events',         $templateurl .'/js/mutate/events.min.js', null, JEG_VERSION, true);
  78.     wp_register_script( 'jeg-mutate',         $templateurl .'/js/mutate/mutate.min.js', null, JEG_VERSION, true);
  79.     wp_register_script( 'jeg-jfollowsidebar', $templateurl .'/js/jquery.jfollowsidebar.js', null, JEG_VERSION, true);
  80.     // wp_register_script( 'jeg-mediaelement',   $templateurl .'/js/mediaelement-and-player.min.js', null, JEG_VERSION, true);
  81.     wp_register_script( 'jeg-html5shiv',      $templateurl . '/js/html5shiv.js', null, JEG_VERSION, true );
  82.     wp_register_script( 'jeg-isotope',        $templateurl . '/js/jquery.isotope.min.js', null, JEG_VERSION, true );
  83.     wp_register_script( 'jeg-imagesloaded',   $templateurl . '/js/imagesloaded.pkgd.min.js', null, JEG_VERSION, true );
  84.     wp_register_script( 'jeg-waypoints',      $templateurl . '/js/waypoints.js', null, JEG_VERSION, true );
  85.  
  86.     if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
  87. }
  88.  
  89. function jeg_html5shim () {
  90.     global $is_IE;
  91.  
  92.     if ($is_IE) :
  93.         echo "<!--[if lt IE 9]>\n";
  94.         echo '<script src="'. get_template_directory_uri() . "/js/html5shiv.min.js\"></script>\n";
  95.         echo "<![endif]-->";
  96.     endif;
  97. }
  98.  
  99. /* ------------------------------------------------------------------------- *
  100.  *  Load Favicon
  101. /* ------------------------------------------------------------------------- */
  102. function jeg_favicon() {
  103.     $favicon   = vp_option('joption.favicon', get_template_directory_uri() .'/images/favicon.ico');
  104.  
  105.     echo '<link rel="shortcut icon" href="'. esc_url( $favicon ) .'" type="image/x-icon">'.
  106.          '<link rel="icon" href="'. esc_url( $favicon ) .'" type="image/x-icon">';
  107. }
  108.  
  109. /* ------------------------------------------------------------------------- *
  110.  *  Fonts Customizer
  111. /* ------------------------------------------------------------------------- */
  112.  
  113. // url example : https://fonts.googleapis.com/css?family=Open+Sans:300,400,700|Playfair+Display:400normal,italic
  114. function jeg_init_fonts() {
  115.     $fonts = jeg_get_mods_fonts();
  116.  
  117.     foreach ( $fonts as $key => $font ) {
  118.         if ( $fonts[$key] === 'default' || empty($fonts[ $key ]) ) {
  119.             unset( $fonts[ $key ] );
  120.             continue;
  121.         }
  122.         $fonts[ $key ] = $fonts[ $key ] . ":400,400italic,700";
  123.     }
  124.  
  125.     if ( ! empty($fonts) )
  126.         echo '<link id="jeg-font-cuztomizer" href="http://fonts.googleapis.com/css?family='. urlencode( implode( "|", array_unique($fonts) ) ) .'&subset=latin,latin-ext" rel="stylesheet" type="text/css">';
  127. }
  128.  
  129. function jeg_cuztomize_fonts() {
  130.     $fonts = jeg_get_mods_fonts(); ?>
  131.  
  132.     <?php if( $fonts['body'] != 'default' && !empty($fonts['body']) ) : ?>
  133.     /*** Global Font ***/
  134.         body, input, textarea, button, select, label {
  135.             font-family: <?php echo esc_attr( $fonts['body'] ) ?>;
  136.         }
  137.     <?php endif; ?>
  138.  
  139.     <?php if( $fonts['heading'] != 'default' && !empty($fonts['heading']) ) : ?>
  140.     /*** Heading ***/
  141.         article .content-title, .meta-article-header, .widget h1.widget-title, .footerwidget-title h3, .entry h1, .entry h2, .entry h3, .entry h4, .entry h5, .entry h6, article .content-meta, .line-heading, h1, h2, h3, h4, h5,h6, .category-header span
  142.         {
  143.             font-family: <?php echo esc_attr( $fonts['heading'] ) ?>;
  144.         }
  145.     <?php endif; ?>
  146.  
  147.     <?php if( $fonts['menu'] != 'default' && !empty($fonts['menu']) ) : ?>
  148.     /*** Menu ***/
  149.         #heading .navigation, #heading .mobile-menu, .second-footer .footer-nav {
  150.             font-family: <?php echo esc_attr( $fonts['menu'] ) ?>;
  151.         }
  152.     <?php endif;
  153. }
  154.  
  155. function jeg_get_fontweight( $fontweightstyle ) {
  156.     $fontweight = '400';
  157.     $fontstyle  = 'normal';
  158.  
  159.     if ( $fontweightstyle == 'regular' ) {
  160.         $fontweight = '400';
  161.     } elseif ( $fontweightstyle == 'italic' ) {
  162.         $fontweight = '400';
  163.         $fontstyle  = 'italic';
  164.     } elseif ( strpos( $fontweightstyle, 'italic' ) ) {
  165.         $fontweight = str_replace( 'italic', '', $fontweightstyle );
  166.         $fontstyle  = 'italic';
  167.     } ?>
  168.  
  169.     font-weight: <?php echo esc_attr( $fontweight ) ?>;
  170.     font-style: <?php echo esc_attr( $fontstyle ) ?>;
  171.  
  172.     <?php
  173. }
  174.  
  175. function jeg_get_mods_fonts() {
  176.  
  177.     $fonts = array(
  178.         'body' => get_theme_mod( 'font_family_body' ),
  179.         'heading' => get_theme_mod( 'font_family_heading' ),
  180.         'menu' => get_theme_mod( 'font_family_menu' ),
  181.     );
  182.  
  183.  
  184.     if( $fonts['body'] === 'default' || empty($fonts['body']) ) $fonts['body'] = 'Droid Serif';
  185.     if( $fonts['heading'] === 'default' || empty($fonts['heading'])) $fonts['heading'] = 'Playfair Display';
  186.     if( $fonts['menu'] === 'default' || empty($fonts['menu']))  $fonts['menu'] = 'Lato';
  187.  
  188.  
  189.     return $fonts;
  190. }
  191.  
  192. /* ------------------------------------------------------------------------- *
  193.  *  Customizer Style
  194. /* ------------------------------------------------------------------------- */
  195. function jeg_customizer_style() { ?>
  196.     <style type="text/css">
  197.  
  198.     <?php if ( get_theme_mod( 'text_color' ) ) { ?>body {color: <?php echo get_theme_mod( 'text_color' ) ?>;}<?php } ?>
  199.     <?php if ( get_theme_mod( 'link_color' ) ) { ?>a {color: <?php echo get_theme_mod( 'link_color' ) ?>;}<?php } ?>
  200.     <?php if ( get_theme_mod( 'link_hover_color' ) ) { ?>a:hover {color: <?php echo get_theme_mod( 'link_hover_color' ) ?>;}<?php } ?>
  201.     <?php if ( get_theme_mod( 'button_color' ) ) { ?>
  202.     #popular-post .popular-excerpt .popular-category  a, .tag-wrapper > a, .entry a { color: <?php echo get_theme_mod( 'button_color' ) ?>; }
  203.     .subscribe-footer .sml_submit, .subscribe-footer .sml_submit:hover,
  204.     input[type="submit"], button[type="submit"], input[type="submit"]:hover, button[type="submit"]:hover { background: <?php echo get_theme_mod( 'button_color' ) ?>; border: 1px solid <?php echo get_theme_mod( 'button_color' ) ?>; }
  205.     article .content-meta a:hover { color: <?php echo get_theme_mod( 'button_color' ) ?>; }
  206.     article.short-content .readmore, article.short-content .more-link, .article-masonry-box .readmore  { background: <?php echo get_theme_mod( 'button_color' ) ?>; }
  207.     <?php } ?>
  208.  
  209.     /***  HEADER LAYOUT 1  ***/
  210.     #heading.first-nav .logo-wrapper a {padding: <?php echo get_theme_mod( 'header1_logo_padding_top', 80 ) ?>px 0 <?php echo get_theme_mod( 'header1_logo_padding_bottom', 60 ) ?>px}
  211.     <?php if ( get_theme_mod( 'header1_bg' ) ) { ?>#heading.first-nav .logo-wrapper {background: <?php echo get_theme_mod( 'header1_bg' ) ?>;}<?php } ?>
  212.  
  213.     <?php if ( get_theme_mod( 'header1_menubar_bg' ) ) { ?>#heading.first-nav .nav-wrapper {background: <?php echo get_theme_mod( 'header1_menubar_bg' ) ?>;}<?php } ?>
  214.     <?php if ( get_theme_mod( 'header1_menu_color' ) ) { ?>#heading.first-nav .navigation > ul > li > a {color: <?php echo get_theme_mod( 'header1_menu_color' ) ?>;}<?php } ?>
  215.     <?php if ( get_theme_mod( 'header1_menu_hover_color' ) ) { ?>#heading.first-nav .navigation > ul > li:hover > a {color: <?php echo get_theme_mod( 'header1_menu_hover_color' ) ?>;}<?php } ?>
  216.     <?php if ( get_theme_mod( 'header1_menu_hover_bg' ) ) { ?>#heading.first-nav .navigation > ul > li:hover {background: <?php echo get_theme_mod( 'header1_menu_hover_bg' ) ?>;}<?php } ?>
  217.  
  218.     <?php if ( get_theme_mod( 'header1_submenu_bg' ) ) { ?>#heading.first-nav .navigation .sub-menu {background: <?php echo get_theme_mod( 'header1_submenu_bg' ) ?>;}<?php } ?>
  219.     <?php if ( get_theme_mod( 'header1_submenu_line' ) ) { ?>#heading.first-nav .navigation .sub-menu li{border-bottom: 1px solid <?php echo get_theme_mod( 'header1_submenu_line' ) ?>;}<?php } ?>
  220.     <?php if ( get_theme_mod( 'header1_submenu_color' ) ) { ?>#heading.first-nav .navigation .sub-menu li a {color: <?php echo get_theme_mod( 'header1_submenu_color' ) ?>;}<?php } ?>
  221.     <?php if ( get_theme_mod( 'header1_submenu_hover_color' ) ) { ?>#heading.first-nav .navigation .sub-menu li:hover > a {color: <?php echo get_theme_mod( 'header1_submenu_hover_color' ) ?>;}<?php } ?>
  222.     <?php if ( get_theme_mod( 'header1_submenu_hover_bg' ) ) { ?>#heading.first-nav .navigation .sub-menu li:hover {background: <?php echo get_theme_mod( 'header1_submenu_hover_bg' ) ?>;}<?php } ?>
  223.  
  224.     <?php if ( get_theme_mod( 'header1_search_color' ) ) { ?>#heading.first-nav .nav-search i {color: <?php echo get_theme_mod( 'header1_search_color' ) ?>;}<?php } ?>
  225.     <?php if ( get_theme_mod( 'header1_search_bg' ) ) { ?>#heading.first-nav .nav-search {background: <?php echo get_theme_mod( 'header1_search_bg' ) ?>;}<?php } ?>
  226.  
  227.     <?php if ( get_theme_mod( 'header1_social_color' ) ) { ?>#heading.first-nav .nav-social li a {color: <?php echo get_theme_mod( 'header1_social_color' ) ?>;}<?php } ?>
  228.     <?php if ( get_theme_mod( 'header1_social_hover_color' ) ) { ?>#heading.first-nav .nav-social li a:hover {color: <?php echo get_theme_mod( 'header1_social_hover_color' ) ?>;}<?php } ?>
  229.     <?php if ( get_theme_mod( 'header1_social_hover_bg' ) ) { ?>#heading.first-nav .nav-social li a:hover {background: <?php echo get_theme_mod( 'header1_social_hover_bg' ) ?>;}<?php } ?>
  230.  
  231.     /***  HEADER LAYOUT 2  ***/
  232.     <?php if ( get_theme_mod( 'header2_height' ) ) { ?>#heading.second-nav .navigation > ul > li, #heading.second-nav .navigation > ul > li > a, #heading.second-nav .logo-wrapper, #heading.second-nav .nav-search i, #heading.second-nav .mobile-navigation i {line-height: <?php echo get_theme_mod( 'header2_height' ) ?>px;}<?php } ?>
  233.     <?php if ( get_theme_mod( 'header2_bg' ) ) { ?>#heading.second-nav .nav-wrapper {background: <?php echo get_theme_mod( 'header2_bg' ) ?>;}<?php } ?>
  234.  
  235.     <?php if ( get_theme_mod( 'header2_menu_color' ) ) { ?>#heading.second-nav .navigation > ul > li > a {color: <?php echo get_theme_mod( 'header2_menu_color' ) ?>;}<?php } ?>
  236.     <?php if ( get_theme_mod( 'header2_menu_hover_color' ) ) { ?>#heading.second-nav .navigation > ul > li:hover > a {color: <?php echo get_theme_mod( 'header2_menu_hover_color' ) ?>;}<?php } ?>
  237.     <?php if ( get_theme_mod( 'header2_menu_hover_bg' ) ) { ?>#heading.second-nav .navigation > ul > li:hover {background: <?php echo get_theme_mod( 'header2_menu_hover_bg' ) ?>;}<?php } ?>
  238.  
  239.     <?php if ( get_theme_mod( 'header2_submenu_bg' ) ) { ?>#heading.second-nav .navigation .sub-menu {background: <?php echo get_theme_mod( 'header2_submenu_bg' ) ?>;}<?php } ?>
  240.     <?php if ( get_theme_mod( 'header2_submenu_line' ) ) { ?>#heading.second-nav .navigation .sub-menu li{border-bottom: 1px solid <?php echo get_theme_mod( 'header2_submenu_line' ) ?>;}<?php } ?>
  241.     <?php if ( get_theme_mod( 'header2_submenu_color' ) ) { ?>#heading.second-nav .navigation .sub-menu li a {color: <?php echo get_theme_mod( 'header2_submenu_color' ) ?>;}<?php } ?>
  242.     <?php if ( get_theme_mod( 'header2_submenu_hover_color' ) ) { ?>#heading.second-nav .navigation .sub-menu li:hover > a {color: <?php echo get_theme_mod( 'header2_submenu_hover_color' ) ?>;}<?php } ?>
  243.     <?php if ( get_theme_mod( 'header2_submenu_hover_bg' ) ) { ?>#heading.second-nav .navigation .sub-menu li:hover {background: <?php echo get_theme_mod( 'header2_submenu_hover_bg' ) ?>;}<?php } ?>
  244.  
  245.     <?php if ( get_theme_mod( 'header2_search_color' ) ) { ?>#heading.second-nav .nav-search i {color: <?php echo get_theme_mod( 'header2_search_color' ) ?>;}<?php } ?>
  246.     <?php if ( get_theme_mod( 'header2_search_bg' ) ) { ?>#heading.second-nav .nav-search {background: <?php echo get_theme_mod( 'header2_search_bg' ) ?>;}<?php } ?>
  247.  
  248.     /***  HEADER LAYOUT 3  ***/
  249.     #heading.third-nav .logo-wrapper {padding: <?php echo get_theme_mod( 'header3_logo_padding_top', 80 ) ?>px 0 <?php echo get_theme_mod( 'header3_logo_padding_bottom', 80 ) ?>px}
  250.     <?php if ( get_theme_mod( 'header3_bg' ) ) { ?>#heading.third-nav .logo-wrapper {background: <?php echo get_theme_mod( 'header3_bg' ) ?>;}<?php } ?>
  251.  
  252.     <?php if ( get_theme_mod( 'header3_menubar_bg' ) ) { ?>#heading.third-nav .nav-container {background: <?php echo get_theme_mod( 'header3_menubar_bg' ) ?>;}<?php } ?>
  253.     <?php if ( get_theme_mod( 'header3_menu_color' ) ) { ?>#heading.third-nav .navigation > ul > li > a {color: <?php echo get_theme_mod( 'header3_menu_color' ) ?>;}<?php } ?>
  254.     <?php if ( get_theme_mod( 'header3_menu_hover_color' ) ) { ?>#heading.third-nav .navigation > ul > li:hover > a {color: <?php echo get_theme_mod( 'header3_menu_hover_color' ) ?>;}<?php } ?>
  255.     <?php if ( get_theme_mod( 'header3_menu_hover_bg' ) ) { ?>#heading.third-nav .navigation > ul > li:hover {background: <?php echo get_theme_mod( 'header3_menu_hover_bg' ) ?>;}<?php } ?>
  256.  
  257.     <?php if ( get_theme_mod( 'header3_submenu_bg' ) ) { ?>#heading.third-nav .navigation .sub-menu {background: <?php echo get_theme_mod( 'header3_submenu_bg' ) ?>;}<?php } ?>
  258.     <?php if ( get_theme_mod( 'header3_submenu_line' ) ) { ?>#heading.third-nav .navigation .sub-menu li{border-bottom: 1px solid <?php echo get_theme_mod( 'header3_submenu_line' ) ?>;}<?php } ?>
  259.     <?php if ( get_theme_mod( 'header3_submenu_color' ) ) { ?>#heading.third-nav .navigation .sub-menu li a {color: <?php echo get_theme_mod( 'header3_submenu_color' ) ?>;}<?php } ?>
  260.     <?php if ( get_theme_mod( 'header3_submenu_hover_color' ) ) { ?>#heading.third-nav .navigation .sub-menu li:hover > a {color: <?php echo get_theme_mod( 'header3_submenu_hover_color' ) ?>;}<?php } ?>
  261.     <?php if ( get_theme_mod( 'header3_submenu_hover_bg' ) ) { ?>#heading.third-nav .navigation .sub-menu li:hover {background: <?php echo get_theme_mod( 'header3_submenu_hover_bg' ) ?>;}<?php } ?>
  262.  
  263.     <?php if ( get_theme_mod( 'header3_search_color' ) ) { ?>#heading.third-nav .nav-search i {color: <?php echo get_theme_mod( 'header3_search_color' ) ?>;}<?php } ?>
  264.     <?php if ( get_theme_mod( 'header3_search_bg' ) ) { ?>#heading.third-nav .nav-search {background: <?php echo get_theme_mod( 'header3_search_bg' ) ?>;}<?php } ?>
  265.  
  266.     <?php if ( get_theme_mod( 'header3_social_color' ) ) { ?>#heading.third-nav .nav-social li a {color: <?php echo get_theme_mod( 'header3_social_color' ) ?>;}<?php } ?>
  267.     <?php if ( get_theme_mod( 'header3_social_hover_color' ) ) { ?>#heading.third-nav .nav-social li a:hover {color: <?php echo get_theme_mod( 'header3_social_hover_color' ) ?>;}<?php } ?>
  268.     <?php if ( get_theme_mod( 'header3_social_hover_bg' ) ) { ?>#heading.third-nav .nav-social li a:hover {background: <?php echo get_theme_mod( 'header3_social_hover_bg' ) ?>;}<?php } ?>
  269.  
  270.     /***  HEADER LAYOUT 4  ***/
  271.     #heading.four-nav .logo-wrapper {padding: <?php echo get_theme_mod( 'header4_logo_padding_top', 80 ) ?>px 0 <?php echo get_theme_mod( 'header4_logo_padding_bottom', 80 ) ?>px}
  272.     <?php if ( get_theme_mod( 'header4_bg' ) ) { ?>#heading.four-nav .nav-wrapper {background: <?php echo get_theme_mod( 'header4_bg' ) ?>;}<?php } ?>
  273.  
  274.     <?php if ( get_theme_mod( 'header4_menubar_bg' ) ) { ?>#heading.four-nav .nav-container {background: <?php echo get_theme_mod( 'header4_menubar_bg' ) ?>;}<?php } ?>
  275.     <?php if ( get_theme_mod( 'header4_menu_color' ) ) { ?>#heading.four-nav .navigation > ul > li > a {color: <?php echo get_theme_mod( 'header4_menu_color' ) ?>;}<?php } ?>
  276.     <?php if ( get_theme_mod( 'header4_menu_hover_color' ) ) { ?>#heading.four-nav .navigation > ul > li:hover > a {color: <?php echo get_theme_mod( 'header4_menu_hover_color' ) ?>;}<?php } ?>
  277.     <?php if ( get_theme_mod( 'header4_menu_hover_bg' ) ) { ?>#heading.four-nav .navigation > ul > li:hover {background: <?php echo get_theme_mod( 'header4_menu_hover_bg' ) ?>;}<?php } ?>
  278.  
  279.     <?php if ( get_theme_mod( 'header4_submenu_bg' ) ) { ?>#heading.four-nav .navigation .sub-menu {background: <?php echo get_theme_mod( 'header4_submenu_bg' ) ?>;}<?php } ?>
  280.     <?php if ( get_theme_mod( 'header4_submenu_line' ) ) { ?>#heading.four-nav .navigation .sub-menu li{border-bottom: 1px solid <?php echo get_theme_mod( 'header4_submenu_line' ) ?>;}<?php } ?>
  281.     <?php if ( get_theme_mod( 'header4_submenu_color' ) ) { ?>#heading.four-nav .navigation .sub-menu li a {color: <?php echo get_theme_mod( 'header4_submenu_color' ) ?>;}<?php } ?>
  282.     <?php if ( get_theme_mod( 'header4_submenu_hover_color' ) ) { ?>#heading.four-nav .navigation .sub-menu li:hover > a {color: <?php echo get_theme_mod( 'header4_submenu_hover_color' ) ?>;}<?php } ?>
  283.     <?php if ( get_theme_mod( 'header4_submenu_hover_bg' ) ) { ?>#heading.four-nav .navigation .sub-menu li:hover {background: <?php echo get_theme_mod( 'header4_submenu_hover_bg' ) ?>;}<?php } ?>
  284.  
  285.     <?php if ( get_theme_mod( 'header4_search_color' ) ) { ?>#heading.four-nav .nav-search i {color: <?php echo get_theme_mod( 'header4_search_color' ) ?>;}<?php } ?>
  286.     <?php if ( get_theme_mod( 'header4_search_bg' ) ) { ?>#heading.four-nav .nav-search {background: <?php echo get_theme_mod( 'header4_search_bg' ) ?>;}<?php } ?>
  287.  
  288.     <?php if ( get_theme_mod( 'header4_social_color' ) ) { ?>#heading.four-nav .nav-social li a {color: <?php echo get_theme_mod( 'header4_social_color' ) ?>;}<?php } ?>
  289.     <?php if ( get_theme_mod( 'header4_social_hover_color' ) ) { ?>#heading.four-nav .nav-social li a:hover {color: <?php echo get_theme_mod( 'header4_social_hover_color' ) ?>;}<?php } ?>
  290.     <?php if ( get_theme_mod( 'header4_social_hover_bg' ) ) { ?>#heading.four-nav .nav-social li a:hover {background: <?php echo get_theme_mod( 'header4_social_hover_bg' ) ?>;}<?php } ?>
  291.  
  292.     /***  HEADER LAYOUT 5  ***/
  293.     #heading.fifth-nav .logo-wrapper {padding: <?php echo get_theme_mod( 'header5_logo_padding_top', 80 ) ?>px 0 <?php echo get_theme_mod( 'header5_logo_padding_bottom', 80 ) ?>px}
  294.     <?php if ( get_theme_mod( 'header5_bg' ) ) { ?>#heading.fifth-nav .top-wrapper {background: <?php echo get_theme_mod( 'header5_bg' ) ?>;}<?php } ?>
  295.  
  296.     <?php if ( get_theme_mod( 'header5_menubar_bg' ) ) { ?>#heading.fifth-nav .nav-wrapper {background: <?php echo get_theme_mod( 'header5_menubar_bg' ) ?>;}<?php } ?>
  297.     <?php if ( get_theme_mod( 'header5_menu_color' ) ) { ?>#heading.fifth-nav .navigation > ul > li > a {color: <?php echo get_theme_mod( 'header5_menu_color' ) ?>;}<?php } ?>
  298.     <?php if ( get_theme_mod( 'header5_menu_hover_color' ) ) { ?>#heading.fifth-nav .navigation > ul > li:hover > a {color: <?php echo get_theme_mod( 'header5_menu_hover_color' ) ?>;}<?php } ?>
  299.     <?php if ( get_theme_mod( 'header5_menu_hover_bg' ) ) { ?>#heading.fifth-nav .navigation > ul > li:hover {background: <?php echo get_theme_mod( 'header5_menu_hover_bg' ) ?>;}<?php } ?>
  300.  
  301.     <?php if ( get_theme_mod( 'header5_submenu_bg' ) ) { ?>#heading.fifth-nav .navigation .sub-menu {background: <?php echo get_theme_mod( 'header5_submenu_bg' ) ?>;}<?php } ?>
  302.     <?php if ( get_theme_mod( 'header5_submenu_line' ) ) { ?>#heading.fifth-nav .navigation .sub-menu li{border-bottom: 1px solid <?php echo get_theme_mod( 'header5_submenu_line' ) ?>;}<?php } ?>
  303.     <?php if ( get_theme_mod( 'header5_submenu_color' ) ) { ?>#heading.fifth-nav .navigation .sub-menu li a {color: <?php echo get_theme_mod( 'header5_submenu_color' ) ?>;}<?php } ?>
  304.     <?php if ( get_theme_mod( 'header5_submenu_hover_color' ) ) { ?>#heading.fifth-nav .navigation .sub-menu li:hover > a {color: <?php echo get_theme_mod( 'header5_submenu_hover_color' ) ?>;}<?php } ?>
  305.     <?php if ( get_theme_mod( 'header5_submenu_hover_bg' ) ) { ?>#heading.fifth-nav .navigation .sub-menu li:hover {background: <?php echo get_theme_mod( 'header5_submenu_hover_bg' ) ?>;}<?php } ?>
  306.  
  307.     <?php if ( get_theme_mod( 'header5_search_color' ) ) { ?>#heading.fifth-nav .nav-search i {color: <?php echo get_theme_mod( 'header5_search_color' ) ?>;}<?php } ?>
  308.     <?php if ( get_theme_mod( 'header5_search_bg' ) ) { ?>#heading.fifth-nav .nav-search {background: <?php echo get_theme_mod( 'header5_search_bg' ) ?>;}<?php } ?>
  309.  
  310.     <?php if ( get_theme_mod( 'header5_social_color' ) ) { ?>#heading.fifth-nav .nav-social li a {color: <?php echo get_theme_mod( 'header5_social_color' ) ?>;}<?php } ?>
  311.     <?php if ( get_theme_mod( 'header5_social_hover_color' ) ) { ?>#heading.fifth-nav .nav-social li a:hover {color: <?php echo get_theme_mod( 'header5_social_hover_color' ) ?>;}<?php } ?>
  312.     <?php if ( get_theme_mod( 'header5_social_hover_bg' ) ) { ?>#heading.fifth-nav .nav-social li a:hover {background: <?php echo get_theme_mod( 'header5_social_hover_bg' ) ?>;}<?php } ?>
  313.  
  314.     /***  MOBILE  ***/
  315.     <?php if ( get_theme_mod( 'mobile_menu_bg' ) ) { ?>#heading .mobile-menu {background: <?php echo get_theme_mod( 'mobile_menu_bg' ) ?>;}<?php } ?>
  316.     <?php if ( get_theme_mod( 'mobile_menu_color' ) ) { ?>#heading .mobile-menu a {color: <?php echo get_theme_mod( 'mobile_menu_color' ) ?>;}<?php } ?>
  317.     <?php if ( get_theme_mod( 'mobile_submenu_bg' ) ) { ?>#heading .mobile-menu .sub-menu li {background: <?php echo get_theme_mod( 'mobile_submenu_bg' ) ?>;}<?php } ?>
  318.     <?php if ( get_theme_mod( 'mobile_menu_line' ) ) { ?>#heading .mobile-menu a {border-top: <?php echo get_theme_mod( 'mobile_menu_line' ) ?>;}<?php } ?>
  319.  
  320.     /***  SIDEBAR  ***/
  321.     <?php if ( get_theme_mod( 'sidebar_heading_color' ) ) { ?>.widget .widget-title {color: <?php echo get_theme_mod( 'sidebar_heading_color' ) ?>;}<?php } ?>
  322.     <?php if ( get_theme_mod( 'sidebar_heading_bg' ) ) { ?>.widget .widget-title span:after, .widget .widget-title span:before {border-top-color: <?php echo get_theme_mod( 'sidebar_heading_bg' ) ?>;}<?php } ?>
  323.  
  324.     /***  FOOTER  ***/
  325.     <?php if ( get_theme_mod( 'footer_bg' ) ) { ?>.first-footer, .second-footer .footer-bottom {background: <?php echo get_theme_mod( 'footer_bg' ) ?>;}<?php } ?>
  326.     <?php if ( get_theme_mod( 'footer_text_color' ) ) { ?>.footer-bottom .social-copy span {color: <?php echo get_theme_mod( 'footer_text_color' ) ?>;}<?php } ?>
  327.  
  328.     /***  WEBSITE BACKGROUND  ***/
  329.     <?php if( get_theme_mod('website_color_background') ) { ?>body { background-color: <?php echo get_theme_mod('website_color_background'); ?>; }<?php } ?>
  330.     <?php if( get_theme_mod('website_image_background') ) {
  331.         $backgroundimage = get_theme_mod('website_image_background');
  332.         if(ctype_digit($backgroundimage) || is_int($backgroundimage)) {
  333.             $backgroundimage = jeg_get_image_src($backgroundimage, "full"); ?>
  334.  
  335.             body { background-image: url('<?php echo esc_html( $backgroundimage ); ?>'); }
  336.             <?php if( get_theme_mod('website_background_repeat') ) { ?>body { background-repeat: <?php echo get_theme_mod('website_background_repeat'); ?>; }<?php } ?>
  337.             <?php if( get_theme_mod('website_background_fullscreen') ) { ?>
  338.                 body { background-attachment: fixed; -webkit-background-size: cover; -o-background-size: cover; -moz-background-size: cover; background-size: cover; }
  339.             <?php } ?>
  340.  
  341.             body { background-position: <?php echo get_theme_mod('website_background_vertical_position', 'center'); ?> <?php echo get_theme_mod('website_background_horizontal_position', 'center'); ?>; }
  342.             <?php
  343.         }
  344.     }
  345.     ?>
  346.  
  347.     /***  CUSTOM FONTS  ***/
  348.     <?php echo esc_attr( jeg_cuztomize_fonts() ); ?>
  349.  
  350.     /***  CUSTOM CSS  ***/
  351.     <?php if( vp_option('joption.custom_css') ) { echo vp_option('joption.custom_css'); }?>
  352.  
  353.     </style><?php
  354. }
  355.  
  356. /* ------------------------------------------------------------------------- *
  357.  *  Additional Script
  358. /* ------------------------------------------------------------------------- */
  359. function jeg_additional_script() {
  360.     echo "<script>\n" . vp_option('joption.custom_js') . "\n</script>\n";
  361. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement