From: Anthony Talarico Date: Tue, 28 Jun 2016 15:18:55 +0000 (-0400) Subject: fixing bad conditional expression for dropdown images X-Git-Tag: v1.0.0^2~129 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=71f31182715f6d83a3347c6a36c7977e57425c4f;p=WP-Themes%2Ffrancejourneys.git fixing bad conditional expression for dropdown images --- diff --git a/lib/menu-walker.php b/lib/menu-walker.php index 1319937..b50cef7 100644 --- a/lib/menu-walker.php +++ b/lib/menu-walker.php @@ -22,31 +22,31 @@ 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 = ''; - - if ( $depth !== 0 ) { - $thumbnail = z_taxonomy_image_url( (int)$object->object_id ); - -// $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id((int)$object->object_id), 'large'); +// 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'); + $item_style .= ""; - } else if ( $depth !== 0 && has_post_thumbnail( (int)$object->object_id ) ) { + } else if( $depth !== 0 && $object->type == "taxonomy") { - $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id( (int)$object->object_id ), 'large'); + $thumbnail = z_taxonomy_image_url( (int)$object->object_id ); + $item_style .= ""; }