';
}
$author_frag = '
' . $author_icon . '' . esc_html( get_the_author() ) . '';
}
// Construct the date html fragment if option to show date is set.
if ( ! empty( $blogcentral_layout_opts['show_date'] ) ) {
$date_icon = '';
if ( ! empty( $blogcentral_layout_opts['show_icons'] ) && ! empty( $blogcentral_layout_opts['date_icon'] ) ) {
$date_icon = '';
}
$date_format = esc_html( get_the_date() );
$date_frag = '' . $date_icon . '' . $date_format . '';
}
// Construct the post content html fragment if option to show content is set.
if ( ! empty( $blogcentral_layout_opts['show_content'] ) ) {
global $more;
ob_start();
if ( $single ) {
$more = 1;
} else {
$more = 0;
}
$format = get_post_format();
// Get the excerpt or content.
if ( ! $single && has_excerpt() || 'quote' === $format ) {
the_excerpt();
} else {
the_content();
}
if ( $single ) {
wp_link_pages(array(
'before' => '' . __( 'Pages:', BLOGCENTRAL_TXT_DOMAIN ) . '',
'after' => '
',
'link_before' => '',
'link_after' => '',
'pagelink' => '' . __( 'Page', BLOGCENTRAL_TXT_DOMAIN ) . ' %',
'separator' => ', ',
));
}
$content_frag = '' . ob_get_clean() . '
';
}
// Construct the comments fragment if option to show stats is set.
if ( ! empty( $blogcentral_layout_opts['show_stats'] ) ) {
$comments_icon = '';
if ( ! empty( $blogcentral_layout_opts['show_icons'] ) && ! empty( $blogcentral_layout_opts['comments_icon'] ) ) {
$comments_icon = '';
}
ob_start();
comments_popup_link( '' . _x( '0', 'comments number', BLOGCENTRAL_TXT_DOMAIN ) . '',
_x( '1', 'comments number', BLOGCENTRAL_TXT_DOMAIN ), _x( '%', 'comments number', BLOGCENTRAL_TXT_DOMAIN ),
'comments-link' );
$stats_frag = '' . $comments_icon . '' .
__( 'Comments: ', BLOGCENTRAL_TXT_DOMAIN ) . ob_get_clean() . '';
}
// Construct the categories html fragment if option to show categories is set
if ( ! empty( $blogcentral_layout_opts['show_categories'] ) && ( $categories_list = get_the_category_list( ', ' ) ) ) {
$cat_icon = '';
if ( ! empty( $blogcentral_layout_opts['show_icons'] ) && ! empty( $blogcentral_layout_opts['categories_icon'] ) ) {
$cat_icon = '';
}
$cats_frag = '' . $cat_icon . '' .
__( 'Categories: ', BLOGCENTRAL_TXT_DOMAIN ) . $categories_list . '';
}
// Construct the tags html fragment if option to show tags is set
if ( ! empty( $blogcentral_layout_opts['show_tags'] ) && ( $tags_list = get_the_tag_list( '', ', ' ) ) ) {
$tags_icon = '';
if ( ! empty( $blogcentral_layout_opts['show_icons'] ) && ! empty( $blogcentral_layout_opts['tags_icon'] ) ) {
$tags_icon = '';
}
$tags_frag = '' . $tags_icon . '' .
__( 'Tags: ', BLOGCENTRAL_TXT_DOMAIN ) . $tags_list . '';
}
// Construct the social share html fragment if option to show share is set
if ( ! empty( $blogcentral_layout_opts['show_social'] ) ) {
$share_title = '';
if ( ! empty( $blogcentral_layout_opts['show_icons'] ) && ! empty( $blogcentral_layout_opts['share_title'] ) ) {
$share_title = '' . esc_html( $blogcentral_layout_opts['share_title'] ) . '';
}
$share_frag = '';
}
if ( ! isset( $blogcentral_query ) ) {
$title_pre = '';
$title_end = '
';
} else {
$title_pre = '';
$title_end = '';
}
$meta_layout_frag = $blogcentral_post_format_icon;
if ( ! empty( $blogcentral_layout_opts['show_title'] ) ) {
$meta_layout_frag .= $title_pre . '' .
get_the_title() . "$title_end";
}
/*
* Assemble the various html fragments constructed above according the options chosen, making sure not to output
* empty tags.
*/
$extra = $blogcentral_meta_content = '';
if ( $author_frag || $date_frag || $cats_frag || $tags_frag || $stats_frag ) {
$blogcentral_meta_content .= '' . $author_frag;
$blogcentral_meta_content .= $date_frag . $cats_frag . $tags_frag . $stats_frag ;
$blogcentral_meta_content .= '
';
}
if ( $content_frag || $blogcentral_meta_content || $share_frag ) {
if ( ! empty( $blogcentral_layout_opts['post_meta_btm'] ) ) {
$blogcentral_meta_content = $content_frag . $blogcentral_meta_content . $share_frag;
} else {
$blogcentral_meta_content .= $content_frag . $share_frag;
}
}
if ( $meta_layout_frag ) {
$blogcentral_meta_content = '' . $meta_layout_frag . $blogcentral_meta_content . '
';
}