Пример #1
0
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 
}
Пример #2
0
}
if ($event_id > 0) {
    $dew_title = $rawEvent->title;
    $title = apply_filters('the_title', $dew_title);
} else {
    $title = the_title('', '', false);
}
get_header();
?>
				<?php 
echo dew_agenda_menu_shortcode_handler();
?>
				<?php 
$event = new DEW_event($rawEvent);
if ($event->hasPrimaryPicture()) {
    $eventPic = DEW_tools::getPicture($event->getPrimaryPicture(), 960, 400);
    ?>
						<div class="wrapper post_thumbnail">
							<img src="<?php 
    echo home_url();
    ?>
/wp-content/uploads<?php 
    echo $eventPic['relative'];
    ?>
" alt="" />';
							<h1 class="article post_thumbnail"><?php 
    echo $title;
    ?>
</h1>
						</div>
					<?php