', esc_url(home_url("/{$year}/{$month}/")), esc_attr(get_the_modified_date(DATE_W3C)), esc_html(get_the_modified_date()) ); } else { $date_string = sprintf( '', esc_url(home_url("/{$year}/{$month}/")), esc_attr(get_the_date(DATE_W3C)), esc_html(get_the_date()) ); } $date_display = ''; ob_start(); blog_build_get_svg_icon('time'); $date_display .= ob_get_clean(); $date_display .= $date_string . ''; echo '' . $date_display . ''; } endif; if (! function_exists('blog_build_posted_by')) : /** * Prints HTML with meta information for the current author. */ function blog_build_posted_by() { // Add author icon $author_display = ''; // Add author icon using SVG function ob_start(); blog_build_get_svg_icon('author'); $author_display .= ob_get_clean(); // Add author name with link $author_display .= '' . esc_html(get_the_author()) . ''; $author_display .= ''; echo '' . $author_display . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif; if (! function_exists('blog_build_entry_footer')) : /** * Prints HTML with meta information for the categories, tags and comments. */ function blog_build_entry_footer() { // Display tags with # prefix blog_build_display_tag_list(false); edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __('Edit %s', 'blog-build'), array( 'span' => array( 'class' => array(), ), ) ), wp_kses_post(get_the_title()) ), '', '' ); } endif; if (! function_exists('blog_build_post_thumbnail')) : /** * Displays an optional post thumbnail. * * Wraps the post thumbnail in an anchor element on index views, or a div * element when on single views. */ function blog_build_post_thumbnail() { if (post_password_required() || is_attachment() || ! has_post_thumbnail()) { return; } if (is_singular()) : ?>
'; // Add comment icon using the SVG function ob_start(); blog_build_get_svg_icon('comment'); $comment_display .= ob_get_clean(); // Add the count with link to comments $comment_display .= ''; $comment_display .= '' . esc_html__('Comments', 'blog-build') . ''; $comment_display .= esc_html($comment_count); $comment_display .= ''; echo '' . $comment_display . ''; } } } if (!function_exists('blog_build_header_meta')) { /** * Display post meta information (author, date, comments) * Can be controlled via customizer settings */ function blog_build_header_meta() { // Check if we're on a single post or blog page and get appropriate setting if (is_single()) { $show_author = get_theme_mod('blog_build_single_show_author', 1); $show_date = get_theme_mod('blog_build_single_show_date', 1); $show_comments = get_theme_mod('blog_build_single_show_comments', 1); } else { $show_author = get_theme_mod('blog_build_show_author', 1); $show_date = get_theme_mod('blog_build_show_date', 1); $show_comments = get_theme_mod('blog_build_show_comments', 1); } // Return if all settings are disabled if (!$show_author && !$show_date && !$show_comments) { return; } // Open meta container echo '
'; // Display author if enabled if ($show_author) { blog_build_posted_by(); } // Display date if enabled if ($show_date) { blog_build_posted_on(); } // Display comments if enabled if ($show_comments) { blog_build_comment_count(); } // Close meta container echo '
'; } }