protected function prepare_quotes()
 {
     $open_path = get_stylesheet_directory() . '/assets/images/svg/T_quotes_Opening_WEB.svg';
     $open_icon = exchange_build_svg($open_path);
     $close_path = get_stylesheet_directory() . '/assets/images/svg/T_quotes_Closing_WEB.svg';
     $close_icon = exchange_build_svg($close_path);
     $this->quotes['close'] = $close_icon ? '<div class="pullquote__quote--close">' . $close_icon . '</div>' : '';
     $this->quotes['open'] = $open_icon ? '<div class="pullquote__quote--open">' . $open_icon . '</div>' : '';
 }
	<div class="section-inner">
		<figure class="section__slice section__image section__image--programme-logo">
			<?php 
$programme = array_search($post->post_title, $GLOBALS['EXCHANGE_PLUGIN_CONFIG']['IMAGES']['programme-logos']);
$img_root = get_template_directory() . '/assets/images/';
if (!empty($programme)) {
    echo exchange_build_svg($img_root . 'svg/T_logo_' . $programme . '_WEB.svg', true);
}
?>
		</figure>
	</div>
			<?php 
    if (!empty($p_obj->org_description)) {
        ?>
				<?php 
        $p_obj->publish_org_description();
        ?>
			<?php 
    }
    ?>

		<?php 
}
?>

		<?php 
if ($p_obj->has_contactme) {
    ?>
			<p class="participant__contactme">
				<?php 
    echo exchange_build_svg(get_stylesheet_directory() . '/assets/images/svg/T_icon_email_WEB.svg');
    ?>
				<?php 
    $p_obj->publish_contactme();
    ?>
			</p>
		<?php 
}
?>
	</div>
</div>
		<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();
}
?>
		</figure>
	</div>
Exemple #5
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>';
}
<div class="story__modal--gallery full reveal" role="dialog" id="story__modal--gallery" aria-describedby="description" data-reveal>

	<button class="modal__button--close" data-close aria-label="Close reveal" type="button">

		<?php 
$close_button = get_stylesheet_directory() . '/assets/images/svg/T_cross_WEB.svg';
?>

		<?php 
echo $close_button ? exchange_build_svg($close_button, true) : 'X';
?>

	</button>

	<div class="orbit" data-use-m-u-i="false" role="region" aria-label="<?php 
printf(esc_html__('Gallery for "%s"', 'exchange'), get_the_title());
?>
" data-orbit data-auto-play="false">

		<?php 
$exchange->publish_gallery('gallery');
?>

	</div>

</div>