%2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( DATE_W3C ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( DATE_W3C ) ), esc_html( get_the_modified_date() ) ); $posted_on = sprintf( $date_text, '' . $time_string . '' ); echo '' . $posted_on . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'zakra_posted_by' ) ) : /** * Prints HTML with meta information for the current author. */ function zakra_posted_by() { $meta_style = get_theme_mod( 'zakra_blog_archive_meta_style', 'tg-meta-style-one' ); /* translators: %s: post author. */ $author_text = ( 'tg-meta-style-one' === $meta_style ) ? esc_html_x( 'By %s', 'post author', 'zakra' ) : '%s'; $byline = sprintf( $author_text, '' . esc_html( get_the_author() ) . '' ); echo ' ' . $byline . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'zakra_posted_in' ) ) : /** * Prints HTML with meta information of post categories. */ function zakra_posted_in() { $meta_style = get_theme_mod( 'zakra_blog_archive_meta_style', 'tg-meta-style-one' ); /* translators: 1: list of categories. */ $catgories_text = ( 'tg-meta-style-one' === $meta_style ) ? esc_html__( 'Posted in %1$s', 'zakra' ) : '%1$s'; // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( esc_html__( ', ', 'zakra' ) ); if ( $categories_list ) { printf( '' . $catgories_text . '', $categories_list ); // WPCS: XSS OK. } } } endif; if ( ! function_exists( 'zakra_post_comments' ) ) : /** * Prints HTML with comments on current post. */ function zakra_post_comments() { if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( sprintf( wp_kses( /* translators: %s: post title */ __( 'No Comments on %s', 'zakra' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); echo ''; } } endif; if ( ! function_exists( 'zakra_post_tags' ) ) : /** * Prints HTML with tags of current post. */ function zakra_post_tags() { $meta_style = get_theme_mod( 'zakra_blog_archive_meta_style', 'tg-meta-style-one' ); /* translators: 1: list of tags. */ $tags_text = ( 'tg-meta-style-one' === $meta_style ) ? esc_html__( 'Tagged %1$s', 'zakra' ) : '%1$s'; // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'zakra' ) ); if ( $tags_list ) { printf( '' . $tags_text . '', $tags_list ); // WPCS: XSS OK. } } } endif; if ( ! function_exists( 'zakra_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 zakra_post_thumbnail() { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } if ( is_singular() ) : ?>