$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));
- //$item_style .= "<style>#menu-item-".$object->ID." > .dropdown:before { background-image: url('".$thumbnail[0]."');</style>";
+ if ($thumbnail[0]) {
+ //$item_style .= '<style>#menu-item-'.$object->ID.' > .dropdown::before {
+ //border: 5px solid #fdefd4;
+ //box-shadow: 1px 2px 9px -1px grey;
+ //height: 140px;
+ //width: 200px;
+ //top:20px;
+ //right:20px;
+ //position:absolute;content:"";background-image: url("'.$thumbnail[0].'");</style>';
+ }
+ //$item_style .= '<li class="nav-img">' . $thumbnail[0] . '</li>';
}
//$output .= ( 0 == $depth ) ? '<li class="divider"></li>' : '';
$classes = empty( $object->classes ) ? array() : (array) $object->classes;