Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Adding Megamenu CSS support

  • Loading branch information
andrewmbacon
andrewmbacon committed Aug 19, 2015
1 parent 4317999 commit 5e4f5768076e4cd13107ce05e13201bddef0e88f
Showing with 8 additions and 5 deletions.
  1. +8 −5 functions.php
@@ -1,19 +1,22 @@
<?php


add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 99 );
function theme_enqueue_styles() {
$stylesheet = get_theme_mod('themeColor');
if( $stylesheet ){
wp_enqueue_style( $stylesheet, get_stylesheet_directory_uri() . '/css/'.$stylesheet.'.css', array('cs-style') );
} else {
wp_enqueue_style( 'hale2015-blue', get_stylesheet_directory_uri() . '/css/hale2015-blue.css', array('cs-style') );
}
}




include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
$maxMegaMenuActive = is_plugin_active('megamenu/megamenu.php');
if ($maxMegaMenuActive){
wp_dequeue_style( 'cs-megamenu' );
wp_enqueue_style( 'megamenu-hale2015', get_stylesheet_directory_uri(). '/css/megamenu-hale2015.css', array( 'cs-style' ));
};
}



0 comments on commit 5e4f576

Please sign in to comment.
You can’t perform that action at this time.