????
| Current Path : /home2/morganrand/www/wp-content/themes/wanderfuls-2/partials/portfolio/ |
| Current File : /home2/morganrand/www/wp-content/themes/wanderfuls-2/partials/portfolio/portfolio-entry-media.php |
<?php
/**
* Portfolio entry content template part
*
* @package Wanderfuls WordPress theme
* @subpackage Partials
* @version 3.0.0
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Get video and thumbnail
$video = tb_get_portfolio_post_video();
$thumbnail = tb_get_portfolio_entry_thumbnail();
// Classes
$classes = array( 'portfolio-entry-media', 'clr' );
if ( $overlay = tb_overlay_classes() ) {
$classes[] = $overlay;
}
$classes = implode( ' ', $classes );
// Return if there isn't a video or a thumbnail
if ( ! $video && ! $thumbnail ) {
return;
} ?>
<div class="<?php echo $classes; ?>">
<?php
// If the portfolio post has a video display it
if ( $video ) : ?>
<?php echo $video; ?>
<?php
// Otherwise display thumbnail if one exists
elseif ( $thumbnail ) : ?>
<a href="<?php the_permalink(); ?>" title="<?php tb_esc_title(); ?>" class="portfolio-entry-media-link">
<?php echo $thumbnail; ?>
<?php tb_overlay( 'inside_link' ); ?>
</a>
<?php tb_overlay( 'outside_link' ); ?>
<?php endif; ?>
</div><!-- .portfolio-entry-media -->