From: Laury GvR Date: Tue, 23 Jan 2018 15:20:44 +0000 (-0500) Subject: Testing out nav dropdown images X-Git-Tag: v1.0.0^2~39 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=5463b9ff4cc1e9ad4d275aee40cba16d92180e7c;p=WP-Themes%2Fkhako.git Testing out nav dropdown images --- diff --git a/functions.php b/functions.php index f69de83..6153e20 100644 --- a/functions.php +++ b/functions.php @@ -140,6 +140,7 @@ add_action('init', 'mytheme_init', 10); function wpse_setup_theme() { add_image_size('glm-block-image', 290, 190,true); add_image_size('glm-blog-feed-image', 500, 320,true); + add_image_size('dropdown-image', 300, 200,true); // not actual size, just for testing purposes } add_action( 'after_setup_theme', 'wpse_setup_theme' ); @@ -196,19 +197,4 @@ if (!function_exists('is_in_tree')) { } return false; } -} - -if (!function_exists('ticket_url_base')) { - function ticket_url_base() - { - // get the option for the ticket url from the api plugin - // if not found then return false. - if ( defined('GLM_MEMBERS_APIS_STARLINE_OPTION_NAME') ) { - $starlineOptions = unserialize( get_option( GLM_MEMBERS_APIS_STARLINE_OPTION_NAME ) ); - $starlineUrl = ( isset( $starlineOptions['ticketUrl'] ) ) ? $starlineOptions['ticketUrl'] : ''; - return $starlineUrl; - } else { - return false; - } - } -} +} \ No newline at end of file diff --git a/header.php b/header.php index d36ab7b..8cff652 100644 --- a/header.php +++ b/header.php @@ -5,7 +5,7 @@ <?php wp_title(); ?> - + diff --git a/lib/menu-walker.php b/lib/menu-walker.php index d09caae..e3b7f0d 100644 --- a/lib/menu-walker.php +++ b/lib/menu-walker.php @@ -29,8 +29,10 @@ 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'); - $item_style .= ""; + $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id((int)$object->object_id), 'dropdown-image'); + $item_style .= ""; + } else { + $item_style .= ""; } //$output .= ( 0 == $depth ) ? '
  • ' : ''; $classes = empty( $object->classes ) ? array() : (array) $object->classes; @@ -47,7 +49,7 @@ class Glm_Theme_Top_Bar_Walker extends Walker_Nav_Menu { } function start_lvl( &$output, $depth = 0, $args = array() ) { - $output .= "\n