Permalink
Browse files

Update functions.php

  • Loading branch information...
milohuang committed Jul 24, 2012
1 parent 237ead4 commit 6bad6966d7c383ba79ee4e6ce9500971fb68faa6
Showing with 9 additions and 6 deletions.
  1. +9 −6 functions.php
View
@@ -195,12 +195,15 @@ function start_lvl(&$output, $depth) {
}
// Add Foundation 'active' class for the current menu item
-add_filter('nav_menu_css_class' , function ($classes, $item){
- if($item->current == 1){ //Notice you can change the conditional from is_single() and $item->title
- $classes[] = "active";
- }
- return $classes;
-} , 10 , 2);
+function reverie_active_nav_class( $classes, $item )
+{
+ if($item->current == 1)
+ {
+ $classes[] = 'active';
+ }
+ return $classes;
+}
+add_filter( 'nav_menu_css_class', 'reverie_active_nav_class', 10, 2 );
// img unautop, Courtesy of Interconnectit http://interconnectit.com/2175/how-to-remove-p-tags-from-images-in-wordpress/
function img_unautop($pee) {

0 comments on commit 6bad696

Please sign in to comment.