';
}
// Set video if defined and if EP is activated
if (
get_post_meta( $post->ID, 'bento_header_video_source', true ) != '' &&
get_option( 'bento_ep_license_status' ) == 'valid' &&
function_exists('bento_ep_video_header')
) {
$video_header = bento_ep_video_header();
}
// Set Google Maps if defined and if EP is activated
if ( get_post_meta( $post->ID, 'bento_activate_headermap', true ) == 'on' && get_option( 'bento_ep_license_status' ) == 'valid' ) {
echo '';
return;
}
// Render the markup
if ( get_post_meta( $postid, 'bento_activate_header', true ) == 'on' && get_post_meta( $post->ID, 'bento_activate_headermap', true ) != 'on' ) {
echo '
'.$video_header.'
'.$title.'
'.$subtitle.'
'.$cta.'
';
}
}
}
// Display an optional post thumbnail.
if ( ! function_exists( 'bento_post_thumbnail' ) ) {
function bento_post_thumbnail() {
global $post;
global $bento_parent_page_id;
// Check if it's one of the situations when a thumbnail is not needed, and exit if yes
if (
! has_post_thumbnail() ||
post_password_required() ||
is_attachment() ||
get_post_format( $post->ID ) === 'quote' ||
( is_singular( array( 'post' , 'project' ) ) && get_post_meta( $post->ID, 'bento_hide_thumb', true ) == 'on' ) ||
( is_singular() && get_post_meta( $post->ID, 'bento_activate_header', true ) == 'on' && get_page_template_slug( $bento_parent_page_id ) != 'page-grid.php' )
) {
return;
}
if ( is_singular() && get_page_template_slug( $bento_parent_page_id ) != 'page-grid.php' ) {
?>
';
}
}
// Display post title
if ( ! function_exists( 'bento_post_title' ) ) {
function bento_post_title() {
global $post;
// Check for formats which do not imply a title
if ( in_array( get_post_format(), array('link','aside','status','quote'), true ) ) {
return;
}
// If project post type and has a sidebar, exit
if ( get_post_type() == 'project' && get_post_meta( $post->ID, 'bento_sidebar_layout', true ) != 'full-width' ) {
return;
}
echo '';
// Main title
if ( is_single() ) {
if ( get_post_meta( $post->ID, 'bento_hide_title', true) != 'on' && get_post_meta( $post->ID, 'bento_activate_header', true ) != 'on' ) {
the_title( '
';
}
echo '';
}
}
// Display post content according to the post format
if ( ! function_exists( 'bento_post_content' ) ) {
function bento_post_content() {
global $post;
// If project post type and has a sidebar, exit
if ( get_post_type() == 'project' && get_post_meta( $post->ID, 'bento_sidebar_layout', true ) != 'full-width' ) {
return;
}
echo '
';
// Check for post format and display respective content
if ( get_post_format() === 'link' ) {
echo bento_link_format_content();
} elseif ( get_post_format() === 'quote' ) {
echo bento_quote_format_content();
} else {
the_content( __( 'Continue reading', 'bento' ).' →' );
}
// Navigation for paged posts
wp_link_pages(
array(
'before' => '