From 4c2a79b8e959013fad057482abe552bfcb527044 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 12 Apr 2016 10:55:01 -0400 Subject: [PATCH] adding dropdown size function --- functions.php | 1 + lib/menu-walker.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 8155269..db72134 100644 --- a/functions.php +++ b/functions.php @@ -54,6 +54,7 @@ set_post_thumbnail_size(120, 100, true); add_image_size('glm_block1_2', 511, 338, false); add_image_size('glm_block3_4', 346, 338, false); +add_image_size('dropdown', 434, 136, false); /** diff --git a/lib/menu-walker.php b/lib/menu-walker.php index 4066bbc..6deb771 100644 --- a/lib/menu-walker.php +++ b/lib/menu-walker.php @@ -23,7 +23,7 @@ class Glm_Theme_Top_Bar_Walker extends Walker_Nav_Menu { // Insert style to display page's thumbnail $item_style = ''; 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), 'dropdown'); $item_style .= ""; } //$output .= ( 0 == $depth ) ? '
  • ' : ''; -- 2.17.1