%2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); return $time_string; } endif; if ( ! function_exists( 'hitmag_posted_on' ) ) : /** * Prints HTML with meta information for the current post-date/time and author. */ function hitmag_posted_on() { if ( is_single() ) { $meta_display = get_theme_mod( 'single_post_meta', array( 'categories', 'date', 'author', 'comments' ) ); } elseif ( is_page_template() ) { $meta_display = array( 'categories', 'date', 'author', 'comments' ); } else { $meta_display = get_theme_mod( 'blog_post_meta', array( 'categories', 'date', 'author', 'comments' ) ); } // Return if the $meta_display array is empty. if ( empty( $meta_display ) ) { return; } $hitmag_meta = array(); if ( in_array( 'date', $meta_display ) ) { $time_string = hitmag_posted_datetime(); $posted_on = '' . $time_string . ''; $hitmag_meta[] = '' . $posted_on . ''; } if ( in_array( 'author', $meta_display ) ) { $byline = sprintf( esc_html_x( 'by %s', 'post author', 'hitmag' ), ' ' ); $hitmag_meta[] = ' '; } if ( in_array( 'comments', $meta_display ) ) { if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) { $num_comments = esc_attr( get_comments_number() ); if ( $num_comments == 0 ) { $comments_txt = esc_html__( 'Leave a Comment', 'hitmag' ); } elseif ( $num_comments > 1 ) { /* translators: %d: number of comments */ $comments_txt = sprintf( esc_html__( '%d Comments.', 'hitmag' ), $num_comments ); } else { $comments_txt = esc_html__( '1 Comment', 'hitmag' ); } $hitmag_meta[] = '' . $comments_txt . ''; } } if ( ! empty( $hitmag_meta ) ) { $hitmag_meta_str = implode( ' ', $hitmag_meta ); echo $hitmag_meta_str; } } endif; if ( ! function_exists( 'hitmag_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function hitmag_entry_footer() { // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { if ( true == get_theme_mod( 'taglist_sw' , true ) ) : /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list(); if ( $tags_list ) { echo ' '; } endif; } edit_post_link( sprintf( /* translators: %s: Name of current post */ esc_html__( 'Edit %s', 'hitmag' ), the_title( '"', '"', false ) ), '', '' ); } endif; if ( ! function_exists( 'hitmag_category_list' ) ) : /** * Prints categories list. */ function hitmag_category_list() { if ( 'post' === get_post_type() ) { if ( is_single() ) { $meta_display = get_theme_mod( 'single_post_meta', array( 'categories', 'date', 'author', 'comments' ) ); } elseif ( is_page_template() ) { $meta_display = array( 'categories', 'date', 'author', 'comments' ); } else { $meta_display = get_theme_mod( 'blog_post_meta', array( 'categories', 'date', 'author', 'comments' ) ); } if( in_array( 'categories', $meta_display ) ) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( esc_html__( ' / ', 'hitmag' ) ); if ( $categories_list && hitmag_categorized_blog() ) { echo '