<?php

/****************************/
/*   Post format: Quote     */
$href = meta_obtain('url', '_retro_format_standard', $post->ID);
$href = $href ? $href : get_thumb_src($post->ID, 'full');
?>

<div class="blog_section_pic">
	
	<a href="<?php 
echo '#' . sanitize_title(get_the_title());
?>
" title="<?php 
echo esc_attr(get_the_title());
?>
">
	
		<?php 
the_post_thumbnail('post-thumbnail', array('title' => ''));
?>
		
		<span class="icon_text"></span>
		
		<p><?php 
echo has_excerpt() ? get_the_excerpt() : get_the_time('F j');
?>
</p>
	
	</a>
<?php

/******************/
/*   Item count   */
global $count;
/**************************/
/*   Getting item metas   */
$meta = get_post_meta($post->ID, '_retro_format_standard', true);
/***********************/
/*   Item attributes   */
$item = array('filter' => haku_nice_classes(get_the_terms('portfolio', 'portfolio_filter')), 'meta' => esc_url(meta_get('url', $meta)), 'href' => esc_url(meta_get('url', $meta, get_thumb_src($post->ID, 'full'))), 'new_tab' => meta_get('new_tab', $meta), 'span_class' => 'icon_camera', 'class' => array('item_li'), 'is_quote' => get_post_format() == 'quote' ? true : false, 'is_audio' => get_post_format() == 'audio' ? true : false);
/***********************/
/*   Item span class   */
if (haku_get_url_type($item['href']) == 'youtube' || haku_get_url_type($item['href']) == 'vimeo') {
    $item['span_class'] = 'icon_video';
} elseif (haku_get_url_type($item['href']) != 'image') {
    $item['span_class'] = 'icon_link';
}
if ($item['is_quote']) {
    $item['href'] = '#' . sanitize_title(get_the_title());
    $item['span_class'] = 'icon_text';
}
if ($item['is_audio']) {
    $item['href'] = '#' . sanitize_title(get_the_title());
    $item['span_class'] = 'icon_audio';
    // Javascript
    global $retro_enqueue_audio_js;
    $retro_enqueue_audio_js = true;
}
/******************/
/*   Item class   */
_e('Content Url', 'haku');
?>
</label>

		</div>
		<!-- end: Info column -->
		
		<!-- Input column -->
		<div class="section">

			<?php 
$mb->the_field('url');
?>
			
			<?php 
$placeholder = isset($_GET['post']) && has_post_thumbnail($_GET['post']) ? get_thumb_src($_GET['post'], 'full') : 'http://';
?>
			
			<input type="text" placeholder="<?php 
echo $placeholder;
?>
" name="<?php 
$mb->the_name();
?>
" value="<?php 
$mb->the_value();
?>
"/>
			
			<span><?php 
_e('You can enter a Youtube, Vimeo, Audio (.mp3), Image or Website url.', 'haku');
示例#4
0
<?php

get_header();
$src = get_thumb_src($post->ID);
$args = ['numberposts' => 7, 'connected_type' => 'posts_to_projects', 'connected_items' => get_queried_object(), 'connected_direction' => 'to'];
$connected = get_posts($args);
?>

<?php 
if ($src) {
    ?>
	<div class="project_logo">
		<img src="<?php 
    echo $src;
    ?>
" alt="">
	</div>
<?php 
} else {
    ?>
	<div class="hands">
		<img src="<?php 
    echo THEME_URI;
    ?>
/img/hands.jpg" alt="">
	</div>
<?php 
}
?>

<div class="project">