reducing the image sizes to medium
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 6 Jun 2018 12:56:53 +0000 (08:56 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 6 Jun 2018 12:56:53 +0000 (08:56 -0400)
reducing topbar nav dropdown menu image sizes to medium instead of full

lib/menu-walker.php

index ca9a046..f570ccd 100644 (file)
@@ -24,7 +24,7 @@ class Glm_Theme_Top_Bar_Walker extends Walker_Nav_Menu {
         $item_style = '';
 //        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' );
+             $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( (int)$object->object_id ), 'medium' );
 
             $item_style .= "<style>
             #menu-item-".$object->ID.":before {
@@ -38,7 +38,7 @@ class Glm_Theme_Top_Bar_Walker extends Walker_Nav_Menu {
 
         } else if( $depth !== 0 && $object->type == "taxonomy") {
 
-            $thumbnail = z_taxonomy_image_url( (int)$object->object_id );
+            $thumbnail = z_taxonomy_image_url( (int)$object->object_id, 'medium' );
 
             $item_style .= "<style>
             #menu-item-".$object->ID.":before {