Fix error by ian that removed some menu images
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 19 Aug 2016 16:09:56 +0000 (12:09 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 19 Aug 2016 16:09:56 +0000 (12:09 -0400)
Talked to Ian about being careful not to do these things.

lib/menu-walker.php

index 43fd756..ca9a046 100644 (file)
@@ -25,40 +25,40 @@ class Glm_Theme_Top_Bar_Walker extends Walker_Nav_Menu {
 //        echo "<pre>", print_r($object), "</pre>";
         if ( $depth !== 0 && has_post_thumbnail( (int)$object->object_id ) ) {
              $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( (int)$object->object_id ), 'large' );
-            
+
             $item_style .= "<style>
-            #menu-item-".$object->ID.":before { 
+            #menu-item-".$object->ID.":before {
             display: inline-block;
-            width: 200px; 
-            height: 100px; 
-            content: ' '; 
+            width: 200px;
+            height: 100px;
+            content: ' ';
             background-image: url('".$thumbnail[0]."');
             background-size: cover;
             </style>";
-            
-        } else if( $depth !== 0 && $object->type == "taxonomy") { 
-            
-            //$thumbnail = z_taxonomy_image_url( (int)$object->object_id );
+
+        } else if( $depth !== 0 && $object->type == "taxonomy") {
+
+            $thumbnail = z_taxonomy_image_url( (int)$object->object_id );
 
             $item_style .= "<style>
-            #menu-item-".$object->ID.":before { 
+            #menu-item-".$object->ID.":before {
             display: inline-block;
-            width: 200px; 
-            height: 100px; 
-            content: ' '; 
+            width: 200px;
+            height: 100px;
+            content: ' ';
             background-image: url('".$thumbnail."');
             background-size: cover;
             </style>";
-            
+
         } else if( $depth !== 0 && ! has_post_thumbnail( (int)$object->object_id ) ){
-            
+
             $thumbnail = get_template_directory_uri() . '/assets/header-images-2.jpg';
             $item_style .= "<style>
-            #menu-item-".$object->ID.":before { 
+            #menu-item-".$object->ID.":before {
             display: inline-block;
-            width: 200px; 
-            height: 100px; 
-            content: ' '; 
+            width: 200px;
+            height: 100px;
+            content: ' ';
             background-image: url('".$thumbnail."');
             background-size: cover;
             </style>";