From: Anthony Talarico Date: Tue, 12 Apr 2016 14:55:01 +0000 (-0400) Subject: adding dropdown size function X-Git-Tag: v1.0.0^2~89 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=4c2a79b8e959013fad057482abe552bfcb527044;p=WP-Themes%2Fthinkdunes.git adding dropdown size function --- 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 ) ? '
  • ' : '';