Ejemplo n.º 1
0
			<ul class="participants">
			<?php 
    foreach ($exchange->participants as $p) {
        ?>
				<li class="participant">
					<?php 
        $org_name = isset($p->org_short_name) ? $p->org_short_name : $p->org_name;
        ?>
					<?php 
        echo '<span class="participant__name">' . $p->name . '</span>
					<span class="participant__organisation-details">' . $org_name . '</span>';
        ?>
				</li>
			<?php 
    }
    ?>
			</ul>
		</div>
	<?php 
}
?>

	<!-- READMORE -->
	<div class='griditem__button-wrapper'>
		<?php 
echo exchange_create_link($exchange, true, 'griditem__button button--small');
?>
	</div>

</div>
Ejemplo n.º 2
0
        ?>
</span>
					<?php 
    }
    ?>

				</li>
			<?php 
}
?>
			<?php 
if (!empty($user_meta['user_story_link'][0] && !empty($user_meta['first_name'][0]))) {
    ?>
				<li class="team-member__story-link">
					<span><?php 
    echo exchange_create_link($user_meta['user_story_link'][0], false, 'button--small') . sprintf(__("%s's story", 'exchange'), $user_meta['first_name'][0]) . '</a>';
    ?>
					</span>
				</li>
			<?php 
}
?>
		</ul>
		<!-- user contact-details -->
		<ul class="team-member__info__contact-details">
	<?php 
if (!empty($user_meta['user_phone'][0]) || !empty($user_info['user_email'])) {
    ?>
		<?php 
    if (!empty($user_meta['user_phone'][0])) {
        ?>
Ejemplo n.º 3
0
echo bloginfo('name') . __(' is an initiative of European Cultural Foundation and MitOst e.V.', 'exchange');
?>
					<!-- <a href="https://creativecommons.org/licenses/by-nc/3.0/"
					title="<?php 
_e('Find out more about this license', 'exchange');
?>
"
					target="_blank">
					<?php 
echo __('CC BY-NC 3.0', 'exchange');
?>
</a> -->
				<?php 
$page = get_option('options_imprint_page_link');
if (!empty($page)) {
    echo ' | ' . exchange_create_link($page);
}
?>
				</p>
			</section>
		</footer> <!-- end .footer -->
		<?php 
wp_footer();
?>
		<script>
		(function( w ){
		if( w.document.documentElement.className.indexOf( "fonts-loaded" ) > -1 ){
			return;
		}
		var font1 = new w.FontFaceObserver( "Open Sans", {
		    weight: 300
 /**
  * If storyteller is set, Replace placeholders in template with personal details connected to the storyteller.
  *
  * @since 0.1.0
  * @access protected
  **/
 protected function set_byline()
 {
     if (!is_object($this->container->storyteller)) {
         return;
     }
     $this->container->storyteller->controller->set_collaboration();
     if (!is_object($this->container->storyteller->collaboration)) {
         return;
     }
     $templates = $this->get_byline_templates();
     if ($this->container->storyteller->collaboration->programme_round->is_active) {
         $byline_template = $templates['present'];
     } else {
         $byline_template = $templates['past'];
     }
     $collab_term = $this->container->storyteller->collaboration->programme_round->term;
     if (!empty($collab_term)) {
         $term = get_term_by('slug', $collab_term, 'post_tag');
     }
     if (!empty($term) && $term instanceof WP_Term) {
         $term_link = exchange_create_link($term);
     } else {
         $term_link = $this->container->storyteller->collaboration->programme_round->title;
     }
     $byline_template = str_replace('[[storyteller]]', $this->container->storyteller->name, $byline_template);
     $byline_template = str_replace('[[programme_round]]', $term_link, $byline_template);
     $byline = '<p>' . str_replace('[[collaboration]]', exchange_create_link($this->container->storyteller->collaboration), $byline_template) . '</p>';
     $this->container->byline = new Byline($byline, 'footer');
 }
Ejemplo n.º 5
0
<h4 class="share-cta-header share-cta-story"><?php 
_e('Do you have a Tandem story you would like to share?', 'exchange');
?>
</h4>

<div class="button-wrapper">
<?php 
$story_form_page = get_option('options_story_update_form_page');
if (!empty($story_form_page)) {
    $exchange_form = BaseController::exchange_factory($story_form_page);
    if ($exchange_form instanceof Exchange) {
        echo exchange_create_link($exchange_form, false, 'button--large button--share-cta') . __('Share your story', 'exchange') . '</a>';
    }
}
?>
</div><!-- button-wrapper -->
Ejemplo n.º 6
0
<section class="story__section">
	<div class="section-inner">
		<figure class="section__slice section__image">
			<div id="programmes">
			<?php 
$img_root = get_template_directory() . '/assets/images/';
global $post;
$all_pages = BaseController::get_all_from_type('page');
$programmes = get_page_children($post->ID, $all_pages);
foreach ($programmes as $page_obj) {
    $anchor = '<a href="#">';
    if (!$page_obj instanceof WP_Post || 'publish' !== $page_obj->post_status) {
        continue;
    } else {
        $anchor = exchange_create_link(BaseController::exchange_factory($page_obj), false);
        $slug = array_search($page_obj->post_title, $GLOBALS['EXCHANGE_PLUGIN_CONFIG']['IMAGES']['programme-logos']);
        if (!empty($slug)) {
            echo $anchor . exchange_build_svg($img_root . 'svg/T_logo_' . $slug . '_WEB.svg', true) . '</a>';
        }
    }
}
?>
			</div>
			<?php 
if (class_exists('Caption')) {
    $caption_text = '<p>Building it together. Illustration copyright &copy; Erica Brisson, 2014-15</p>';
    $modifiers = array('classes' => array('text-right'));
    $caption = new Caption($caption_text, 'image');
    $caption->publish();
}
?>
Ejemplo n.º 7
0
 /**
  * Prepare map marker.
  * @param array $marker_location Array with lat and long
  * @return string array $marker_label Array with title and possibly page ID as link.
  */
 protected function prepare_map_marker($marker_location, $marker_label)
 {
     $marker = array('message' => $marker_label['title'], 'lat' => $marker_location['lat'], 'lng' => $marker_location['lng']);
     if (!empty($marker_label['linked_object'])) {
         // Create link from object
         $object = BaseController::exchange_factory($marker_label['linked_object']);
         $link = exchange_create_link($object, false);
     }
     if (isset($link)) {
         $marker['message'] = $link . $marker_label['title'] . '</a>';
     }
     return $marker;
 }
Ejemplo n.º 8
0
function exchange_build_breadcrumb_base($exchange)
{
    global $post;
    $arrow = '<li>' . exchange_build_svg(get_stylesheet_directory() . '/assets/images/svg/T_arrows_Single_WEB.svg') . '</li>';
    $title_string = $exchange->title;
    $tag = '';
    $maxchars = $GLOBALS['EXCHANGE_PLUGIN_CONFIG']['BREADCRUMBS']['max-chars-default'];
    switch ($exchange->type) {
        case 'story':
            $type_string = 'Stories';
            $maxchars = $GLOBALS['EXCHANGE_PLUGIN_CONFIG']['BREADCRUMBS']['max-chars-story'];
            break;
        case 'collaboration':
            $type_string = 'Collaborations';
            $maxchars = $GLOBALS['EXCHANGE_PLUGIN_CONFIG']['BREADCRUMBS']['max-chars-collaboration'];
            if (!empty($exchange->programme_round) && is_string($exchange->programme_round->term)) {
                $participant_list = array();
                $tag = '<li>' . exchange_create_link($exchange->ordered_tag_list[0]) . '</li>' . $arrow;
            }
            if (!empty($exchange->participants)) {
                foreach ($exchange->participants as $participant) {
                    $participant_list[] = $participant->title;
                }
                if (count($participant_list) > 0) {
                    $title_string = implode(' & ', $participant_list);
                }
            }
            break;
        case 'page':
            $parent = get_post($post->post_parent);
            $type_string = $parent->post_title;
            break;
        default:
            return;
    }
    $type = '<li><a href="' . get_post_type_archive_link($exchange->type) . '">' . $type_string . '</a></li>' . $arrow;
    if (strlen($title_string) > $maxchars) {
        $title_string = substr($title_string, 0, $maxchars) . __('...', EXCHANGE_PLUGIN);
    }
    $title = '<li><span class="show-for-sr">Current: </span>' . $title_string . '</li>';
    return '<ol>' . $type . $tag . $title . '</ol>';
}