// $item_html .= "<ul class='sub-menu dropdown medium-block-grid-9'><li>test</li></ul>";
// }
////// echo "<pre>", print_r($object), "</pre>";
- if ( $depth !== 0 && has_post_thumbnail( (int)$object->object_id ) ) {
-
- $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( (int)$object->object_id ), 'dropdown-thumbnail' );
-
+ if( $depth !== 0 && 1464 == (int)$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[0]."');
+ background-image: url('".$thumbnail."');
background-size: cover;
</style>";
- } else if($object->classes[0] === 'family-specials' ){
- $thumbnail = get_template_directory_uri() . '/assets/family%20specials%20for%20nav.jpg';
+ } else if( $depth !== 0 && 1465 == (int)$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;
content: ' ';
background-image: url('".$thumbnail."');
background-size: cover;
- background-position: center bottom;
</style>";
-
- } else if($object->classes[0] === 'multiple-trips' ){
- $thumbnail = get_template_directory_uri() . '/assets/Multiple%20trips.jpg';
+ } else if ( $depth !== 0 && has_post_thumbnail( (int)$object->object_id ) ) {
+ $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( (int)$object->object_id ), 'dropdown-thumbnail' );
$item_style .= "<style>
#menu-main #menu-item-".$object->ID.":before {
display: inline-block;
width: 200px;
height: 100px;
content: ' ';
- background-image: url('".$thumbnail."');
+ background-image: url('".$thumbnail[0]."');
background-size: cover;
- background-position: center bottom;
</style>";
- } else if($object->classes[0] === 'classic-ferry' ){
- $thumbnail = get_template_directory_uri() . '/assets/classic-ferry.jpg';
+ } else if($object->classes[0] === 'family-specials' ){
+ $thumbnail = get_template_directory_uri() . '/assets/family%20specials%20for%20nav.jpg';
$item_style .= "<style>
#menu-main #menu-item-".$object->ID.":before {
display: inline-block;
background-position: center bottom;
</style>";
- } else if($object->classes[0] === 'all-ticket-options' ){
- $thumbnail = get_template_directory_uri() . '/assets/All-Tickets-to-Mackinac-Island-Option-Featured-Image-400x200.png';
+ } else if($object->classes[0] === 'multiple-trips' ){
+ $thumbnail = get_template_directory_uri() . '/assets/Multiple%20trips.jpg';
$item_style .= "<style>
#menu-main #menu-item-".$object->ID.":before {
display: inline-block;
background-position: center bottom;
</style>";
- } else if( $depth !== 0 && ! has_post_thumbnail( (int)$object->object_id ) ){
- $thumbnail = get_template_directory_uri() . '/assets/is43-1401554613-28521.jpg';
+ } else if($object->classes[0] === 'classic-ferry' ){
+ $thumbnail = get_template_directory_uri() . '/assets/classic-ferry.jpg';
$item_style .= "<style>
#menu-main #menu-item-".$object->ID.":before {
display: inline-block;
content: ' ';
background-image: url('".$thumbnail."');
background-size: cover;
+ background-position: center bottom;
</style>";
- } else if( $depth !== 0 && 1464 == (int)$object->ID ){
- $thumbnail = get_template_directory_uri() . '/assets/run-mackinac.jpg';
+ } else if($object->classes[0] === 'all-ticket-options' ){
+ $thumbnail = get_template_directory_uri() . '/assets/All-Tickets-to-Mackinac-Island-Option-Featured-Image-400x200.png';
$item_style .= "<style>
#menu-main #menu-item-".$object->ID.":before {
display: inline-block;
content: ' ';
background-image: url('".$thumbnail."');
background-size: cover;
+ background-position: center bottom;
</style>";
- } else if( $depth !== 0 && 1465 == (int)$object->ID ){
- $thumbnail = get_template_directory_uri() . '/assets/chicago-yacht-race.jpg';
+ } 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 {
display: inline-block;
background-image: url('".$thumbnail."');
background-size: cover;
</style>";
+
}
//$output .= ( 0 == $depth ) ? '<li class="divider"></li>' : '';
$classes = empty( $object->classes ) ? array() : (array) $object->classes;