%2$s'; $time_string = sprintf( $time_string, esc_attr( get_the_date( get_option('date_format') ) ), esc_html( get_the_date(get_option('date_format')) ) ); $posted_on = sprintf( /* translators: %s: post date. */ esc_html( '%s', 'post date' ), '' .$time_string. '' ); echo '' . $posted_on . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'best_news_posted_by' ) ) : /** * Prints HTML with meta information for the current author. */ function best_news_posted_by() { $byline = sprintf( /* translators: %s: post author. */ esc_html_x( 'by %s', 'post author', 'best-news' ), '' ); echo ''; // WPCS: XSS OK. } endif; /** * Prints HTML with meta information for the categories, tags and comments. */ function best_news_post_comment() { if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( __( '0 comment', 'best-news' ), __( '1 Comment', 'best-news' ), __( '% Comments', 'best-news' ) ); echo ''; } } function best_news_post_tag() { // 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', 'best-news' ) ); if ( $tags_list ) { /* translators: 1: list of tags. */ printf( '', $tags_list ); // WPCS: XSS OK. } } } if ( ! function_exists( 'best_news_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 best_news_post_thumbnail() { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } if ( is_singular() ) : ?>