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

Commit

Permalink
Browse files Browse the repository at this point in the history
Adding Megamenu CSS support
  • Loading branch information
andrewmbacon committed Aug 19, 2015
1 parent 4317999 commit 5e4f576
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions 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' ));
};
}



Expand Down

0 comments on commit 5e4f576

Please sign in to comment.