'.$instance['custom_css'].''; } if($instance['itemstoshow']!=0){ $numberofitems = $instance['itemstoshow']; } else{ $numberofitems = count($awp_all_events); } if(!empty($awp_all_events)){ if ($instance['title']) echo $before_title . apply_filters('widget_title', $instance['title']) . $after_title; foreach($awp_all_events as $events){ if($count <= $numberofitems){ if( $events->publishedAt == '' ) { $creationDate = explode('T',$events->creationDate); $ListDate=strtotime($creationDate[0]); $post_date=date('M d, y',$ListDate); }else { $post_date = $events->publishedAt; } echo '
'; } $count++; } echo $css; } echo $after_widget; ?>