function kvarteret_fullEvent($rawEvent, array $config = array()) { // All named arguments are required in the format /** * $config can be an associative array * array( * 'no_title' => bool, // Whether to include the title or not * 'exclude_metadata' => bool, // Whether to include the metadata (start/end, location, etc) or not * ) */ $event = new DEW_event($rawEvent); $googleCalUrl = DEW_tools::createGoogleCalUrl($rawEvent); $title = '<h2>' . $event->getTitle() . '</h2>'; if (isset($config['no_title']) && $config['no_title'] == true) { $title = ''; } ?> <div class="agenda_event_wrapper"> <p><?php echo $event->getLeadParagraph(); ?> </p> <?php echo $event->getDescription(); ?> <?php if ($event->hasPrimaryPicture()) { ?> <img src="<?php echo DEW_tools::getPictureUrl($event->getPrimaryPicture()); ?> " alt="<?php echo $event->getPrimaryPicture()->description; ?> " /> <?php } ?> <p><small><a href="<?php echo $event->getUrl(false); ?> "><?php _e('Orginal event', 'dak_events_wp'); ?> </a></small></p> </div> <?php }