From 104ae480bf82172ffda3bc025471fa2496fd6eab Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 9 May 2017 12:19:19 -0400 Subject: [PATCH] Use smaller size for drop down images. Not sure why we need the biggest image here. --- lib/menu-walker.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/menu-walker.php b/lib/menu-walker.php index aee5a43..1a0635a 100644 --- a/lib/menu-walker.php +++ b/lib/menu-walker.php @@ -27,16 +27,16 @@ class Glm_Theme_Top_Bar_Walker extends Walker_Nav_Menu { // Insert style to display page's thumbnail $depth == 0 && has_post_thumbnail((int)$object->object_id $item_style = ''; -// echo $object->classes[0]; +// echo $object->classes[0]; // echo '
', print_r($object), '
'; - + // if($object->ID == 330 && $object->has_children == 1){ // $item_html .= ""; // } ////// echo "
", print_r($object), "
"; 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 .= ""; - + } else if($object->classes[0] === 'multiple-trips' ){ $thumbnail = get_template_directory_uri() . '/assets/Multiple%20trips.jpg'; $item_style .= ""; - + }else if( $depth !== 0 && ! has_post_thumbnail( (int)$object->object_id ) ){ $thumbnail = get_template_directory_uri() . '/assets/interior-pg-header-image.jpg'; $item_style .= ""; - } + } //$output .= ( 0 == $depth ) ? '
  • ' : ''; $classes = empty( $object->classes ) ? array() : (array) $object->classes; if ( in_array( 'label', $classes ) ) { -- 2.17.1