Add custom dropdown images for Chicago yacht and mackinac run
authorLaury GvR <laury@gaslightmedia.com>
Tue, 7 May 2019 20:16:01 +0000 (16:16 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 7 May 2019 20:16:01 +0000 (16:16 -0400)
assets/chicago-yacht-race.jpg [new file with mode: 0644]
assets/run-mackinac.jpg [new file with mode: 0644]
lib/menu-walker.php

diff --git a/assets/chicago-yacht-race.jpg b/assets/chicago-yacht-race.jpg
new file mode 100644 (file)
index 0000000..f20d73b
Binary files /dev/null and b/assets/chicago-yacht-race.jpg differ
diff --git a/assets/run-mackinac.jpg b/assets/run-mackinac.jpg
new file mode 100644 (file)
index 0000000..607469e
Binary files /dev/null and b/assets/run-mackinac.jpg differ
index 4dec90d..19d6096 100644 (file)
@@ -100,7 +100,7 @@ class Glm_Theme_Top_Bar_Walker extends Walker_Nav_Menu {
             background-position: center bottom;
             </style>";
 
-        }else if( $depth !== 0 && ! has_post_thumbnail( (int)$object->object_id ) ){
+        } else if( $depth !== 0 && ! has_post_thumbnail( (int)$object->object_id ) ){
             $thumbnail = get_template_directory_uri() . '/assets/is43-1401554613-28521.jpg';
             $item_style .= "<style>
             #menu-main #menu-item-".$object->ID.":before {
@@ -111,6 +111,30 @@ class Glm_Theme_Top_Bar_Walker extends Walker_Nav_Menu {
             background-image: url('".$thumbnail."');
             background-size: cover;
             </style>";
+
+        } else if( $depth !== 0 && 1410 == $object->object_id ){
+            $thumbnail = get_template_directory_uri() . '/assets/run-mackinac.jpg';
+            $item_style .= "<style>
+            #menu-main #menu-item-".$object->ID.":before {
+            display: inline-block;
+            width: 200px;
+            height: 100px;
+            content: ' ';
+            background-image: url('".$thumbnail."');
+            background-size: cover;
+            </style>";
+            
+        } else if( $depth !== 0 && 1433 == $object->object_id ){
+            $thumbnail = get_template_directory_uri() . '/assets/chicago-yacht-race.jpg';
+            $item_style .= "<style>
+            #menu-main #menu-item-".$object->ID.":before {
+            display: inline-block;
+            width: 200px;
+            height: 100px;
+            content: ' ';
+            background-image: url('".$thumbnail."');
+            background-size: cover;
+            </style>";
         }
         //$output .= ( 0 == $depth ) ? '<li class="divider"></li>' : '';
         $classes = empty( $object->classes ) ? array() : (array) $object->classes;