'; if ( get_theme_mod( 'bnt_font_headings' ) != '' && get_theme_mod( 'bnt_font_headings' ) != 'Open Sans' ) { $headings_font = get_theme_mod( 'bnt_font_headings' ); $headings_font = str_replace( ' ', '+', $headings_font ); $fonts .= ''; } $menu_font = 'Montserrat'; if ( get_theme_mod( 'bnt_font_menu' ) != '' ) { $menu_font = get_theme_mod( 'bnt_font_menu' ); } $menu_font = str_replace( ' ', '+', $menu_font ); $fonts .= ''; echo $fonts; } } // Display the logo if ( ! function_exists( 'bnt_logo' ) ) { function bnt_logo() { if ( get_theme_mod( 'custom_logo' ) != '' ) { $custom_logo_id = get_theme_mod( 'custom_logo' ); $logo_image = wp_get_attachment_image_src( $custom_logo_id , 'full' ); $logo_full = $logo_mobile = $logo_image[0]; if ( get_theme_mod( 'bnt_logo_mobile' ) != '' ) { $mobile_logo_id = get_theme_mod( 'bnt_logo_mobile' ); $mobile_logo_image = wp_get_attachment_image_src( $mobile_logo_id , 'full' ); $logo_mobile = $mobile_logo_image[0]; } echo ' '; } } } // Primary menu if ( ! function_exists( 'bnt_primary_menu' ) ) { function bnt_primary_menu() { $depth = '3'; if ( get_theme_mod( 'bnt_menu_config' ) == 2 ) { $depth = '1'; } ?>
'primary-menu', 'echo' => FALSE, 'fallback_cb' => '__return_false' ) ); if ( empty($menu) ) { return; } ?>
ID; } // Only display on single posts/pages if ( ! is_singular() ) { return; } // Set titles $title = get_the_title(); $subtitle = $cta = $video_header = ''; if ( get_post_meta( $postid, 'bnt_subtitle', true ) != '' ) { $subtitle = '
'.get_post_meta( $postid, 'bnt_subtitle', true ).'
'; } // Set call-to-action elements if defined if ( get_post_meta( $postid, 'bnt_cta_primary_text', true ) != '' ) { $cta_primary = $cta_secondary = ''; if ( get_post_meta( $postid, 'bnt_cta_primary_text', true ) != '' ) { if ( get_post_meta( $postid, 'bnt_cta_primary_link', true ) != '' ) { $cta_primary = ' '.get_post_meta( $postid, 'bnt_cta_primary_text', true ).' '; } else { $cta_primary = '
'.get_post_meta( $postid, 'bnt_cta_primary_text', true ).'
'; } } if ( get_post_meta( $postid, 'bnt_cta_secondary_text', true ) != '' ) { if ( get_post_meta( $postid, 'bnt_cta_secondary_link', true ) != '' ) { $cta_secondary = ' '.get_post_meta( $postid, 'bnt_cta_secondary_text', true ).' '; } else { $cta_secondary = '
'.get_post_meta( $postid, 'bnt_cta_secondary_text', true ).'
'; } } $cta = '
'.$cta_primary.' '.$cta_secondary.'
'; } // Set video if defined and if EP is activated if ( get_post_meta( $post->ID, 'bnt_header_video_source', true ) != '' && get_option( 'bnt_ep_license_status' ) == 'valid' && function_exists('bnt_ep_video_header') ) { $video_header = bnt_ep_video_header(); } // Set Google Maps if defined and if EP is activated if ( get_post_meta( $post->ID, 'bnt_activate_headermap', true ) == 'on' && get_option( 'bnt_ep_license_status' ) == 'valid' ) { echo '
'; return; } // Render the markup if ( get_post_meta( $postid, 'bnt_activate_header', true ) == 'on' && get_post_meta( $post->ID, 'bnt_activate_headermap', true ) != 'on' ) { echo '
'.$video_header.'

'.$title.'

'.$subtitle.' '.$cta.'
'; } } } // Display an optional post thumbnail. if ( ! function_exists( 'bnt_post_thumbnail' ) ) { function bnt_post_thumbnail() { global $post; global $bnt_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() && get_post_meta( $post->ID, 'bnt_activate_header', true ) == 'on' && get_page_template_slug( $bnt_parent_page_id ) != 'page-grid.php' ) ) { return; } if ( is_singular() && get_page_template_slug( $bnt_parent_page_id ) != 'page-grid.php' ) { ?>
get_the_title() ) ); ?>
'; $post_date_link_close = ''; } else { $post_date_link = $post_date_link_close = ''; } $post_day = get_the_date('d'); $post_month = get_the_date('M'); $post_year = get_the_date('Y'); echo '
'.$post_date_link.'
'.$post_day.'
'.$post_month.'
'.$post_year.'
'.$post_date_link_close.'
'; } } // Display post title if ( ! function_exists( 'bnt_post_title' ) ) { function bnt_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, 'bnt_sidebar_layout', true ) != 'full-width' ) { return; } echo '
'; // Main title if ( is_single() ) { if ( get_post_meta( $post->ID, 'bnt_hide_title', true) != 'on' && get_post_meta( $post->ID, 'bnt_activate_header', true ) != 'on' ) { the_title( '

', '

' ); } } else { the_title( sprintf( '

', esc_url( get_permalink() ) ), '

' ); } // Subtitle if ( is_single() && get_post_meta( $post->ID, 'bnt_subtitle', true) != '' ) { echo '
'.get_post_meta( $post->ID, 'bnt_subtitle', true ).'
'; } echo '
'; } } // Display post content according to the post format if ( ! function_exists( 'bnt_post_content' ) ) { function bnt_post_content() { global $post; // If project post type and has a sidebar, exit if ( get_post_type() == 'project' && get_post_meta( $post->ID, 'bnt_sidebar_layout', true ) != 'full-width' ) { return; } echo '
'; // Check for post format and display respective content if ( get_post_format() === 'link' ) { echo bnt_link_format_content(); } elseif ( get_post_format() === 'quote' ) { echo bnt_quote_format_content(); } else { the_content( __( 'Continue reading', 'bento' ).' →' ); } // Navigation for paged posts wp_link_pages( array( 'before' => '', 'link_before' => '', 'link_after' => '', ) ); echo '
'; } } // Display entry meta if ( ! function_exists( 'bnt_entry_meta' ) ) { function bnt_entry_meta() { echo ''; return; } // If project, display navigation if ( get_post_type() == 'project' && is_singular('project') ) { if ( function_exists( 'bnt_ep_project_nav' ) ) { bnt_ep_project_nav(); } return; } // Display a pin for sticky posts if ( is_sticky() && is_home() && ! is_paged() ) { echo ''; } // Display post meta - author, category, and comments $post_author = ''.__( 'Posted by', 'bento' ).' '.get_the_author().''; $post_categories_ids = wp_get_post_categories( get_the_ID(), array('fields' => 'ids') ); $post_categories_names = array(); $post_categories = ''; if ( ! empty($post_categories_ids) && ( ! in_category('Uncategorized') ) ) { foreach ( $post_categories_ids as $c ) { $cat = get_category( $c ); $post_categories_names[] = $cat->name; } $post_categories_names = implode(", ", $post_categories_names); $post_categories = ' '.__( 'in', 'bento' ).' '.$post_categories_names.''; } $post_comments = ''; $num_comments = get_comments_number(); if ( comments_open() ) { if ( $num_comments == 0 ) { $comments = __( '0 comments', 'bento' ); } elseif ( $num_comments > 1 ) { $comments = $num_comments .' '. __( 'comments', 'bento' ); } else { $comments = __( '1 comment', 'bento' ); } $post_comments = ', '. $comments . ''; } $post_date = ''; if ( is_singular('post') ) { $post_date = ' '.__( 'on', 'bento' ).' '.the_date('j F Y', '', '', false).''; } $post_meta = $post_author . $post_date . $post_categories . $post_comments; if ( get_post_type() == 'post' ) { echo $post_meta; } edit_post_link( __( 'Edit this', 'bento' ), '
', '
' ); echo ''; } } // Display author information in posts if ( ! function_exists( 'bnt_author_info' ) ) { function bnt_author_info() { if ( is_singular('post') && get_theme_mod( 'bnt_author_meta' ) != 1 ) { ?>

1 && get_option( 'page_comments' ) ) { ?>
id="comment-">
$depth, ) ) ); ?>
comment_approved == '0' ) { ?> '← '.__( 'Previous page', 'bento' ), 'next_text' => __( 'Next page', 'bento' ).' →', ) ); } } // Display a pager for grid pages if ( ! function_exists( 'bnt_grid_pagination' ) ) { function bnt_grid_pagination() { global $bnt_query; ?> '.$anchor.''; } else { return $url; } } } // Display content for the "quote" post type if ( ! function_exists( 'bnt_quote_format_content' ) ) { function bnt_quote_format_content() { $quote = get_the_content(); $author = get_the_title(); $output = '
'.$quote.'
'; if ( $author != '' ) { $output .= '
'.$author.'
'; } return $output; } } // Display the copyright in the footer if ( ! function_exists( 'bnt_copyright' ) ) { function bnt_copyright() { $author = 'Bento WordPress '.__( 'theme', 'bento' ); if ( is_front_page() ) { $author = 'Bento WordPress '.__( 'theme', 'bento' ).''; } $copyright = ''; echo $copyright; } } // Display the button for the ajax loader if ( ! function_exists( 'bnt_ajax_load_more' ) ) { function bnt_ajax_load_more() { if ( is_home() || is_archive() || is_search() ) { $class = ''; } else { $class = 'grid-ajax-load-more'; } ?>
', ']]>', $content ); // First check if the post has an excerpt if ( has_excerpt() ) { $excerpt = get_the_excerpt(); } else { $content_main = $content['main']; if ( strlen($content_main) > $length ) { $pos = strpos( $content_main, ' ', $length ); if ( $pos === false ) { $excerpt = $content_main; } else { $excerpt = substr( $content_main, 0, $pos ); $excerpt .= '.. '; } } else { $excerpt = $content_main; } } if ( get_post_format() === 'link' ) { $excerpt = bnt_link_format_content(); } elseif ( get_post_format() === 'quote' ) { $excerpt = bnt_quote_format_content(); } echo '
'.$excerpt.'
'; } } // Render masonry tile content if ( ! function_exists( 'bnt_masonry_item_content' ) ) { function bnt_masonry_item_content() { global $post; global $bnt_parent_page_id; $tile_content = $tile_title = $tile_content_opacity = $tile_text_style = $tile_project_types = $tile_text_color = $tile_background = $tile_image = $tile_overlay = $tile_color = $tile_opacity = ''; // Content if ( get_post_format( $post->ID ) === 'quote' ) { $tile_title = '"'.get_the_content().'"

'.get_the_title().''; } else { $tile_title = get_the_title(); } if ( get_post_meta( $bnt_parent_page_id, 'bnt_hide_tile_overlays', true) == 'on' ) { $tile_content_opacity = 'style="opacity: 0.0"'; } if ( implode( get_post_meta( $bnt_parent_page_id, 'bnt_page_content_types', true ) ) == 'project' ) { $types_objects = get_the_terms( $post->ID, 'project_type' ); $tile_project_types_list = array(); if ( $types_objects != false ) { foreach ( $types_objects as $types_object ) { $tile_project_types_list[] = $types_object->name; } $tile_project_types_list = implode(', ', $tile_project_types_list); $tile_project_types = '
'.$tile_project_types_list.'
'; } } $tile_text_color = 'color:'.get_post_meta( $post->ID, 'bnt_tile_text_color', true ).';'; $tile_text_size = 'font-size:'.get_post_meta( $post->ID, 'bnt_tile_text_size', true ).'px;'; $tile_text_style .= 'style="'.$tile_text_color.$tile_text_size.'"'; $tile_content .= '

'.$tile_title.'

'.$tile_project_types.'
'; // Background if ( get_post_meta( $post->ID, 'bnt_tile_image', true ) != '' ) { $tile_image = get_post_meta( $post->ID, 'bnt_tile_image', true ); } else if ( has_post_thumbnail() ) { $post_thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); $tile_image = $post_thumb[0]; } $tile_background .= 'style=background-image:url("'.$tile_image.'")'; if ( get_post_meta( $post->ID, 'bnt_tile_overlay_opacity', true) != '' ) { if ( get_post_meta( $bnt_parent_page_id, 'bnt_hide_tile_overlays', true) != 'on' ) { $tile_opacity = 'opacity:'.get_post_meta( $post->ID, 'bnt_tile_overlay_opacity', true).';'; } else { $tile_opacity = 'opacity: 0.0'; } } if ( get_post_meta( $post->ID, 'bnt_tile_overlay_color', true ) != '' ) { $tile_color = 'background-color:'.get_post_meta( $post->ID, 'bnt_tile_overlay_color', true ).';'; } $tile_overlay .= 'style="'.$tile_color.$tile_opacity.'"'; $tile_content .= '
'; echo $tile_content; } } // Display info header for new users if ( ! function_exists( 'bnt_novice_header' ) ) { function bnt_novice_header() { $status = get_option( 'novice_header' ); if ( $status != 'dismissed' ) { ?>
Bento