'. esc_html__('Published: ','beautytemple').'%2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = '
'. esc_html__('Published: ','beautytemple').'%2$s'. esc_html__('Updated: ','beautytemple').'%4$s
'; } $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() ) ); echo $time_string; // WPCS: XSS OK. } } if ( ! function_exists( 'beautytemple_entry_category' ) ){ /** * Prints HTML with meta information for the categories. */ function beautytemple_entry_category() { // 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__( ' / ', 'beautytemple' ) ); if ( $categories_list ) { echo ''; /* translators: 1: list of categories. */ printf( esc_html__( '%1$s', 'beautytemple' ), $categories_list ); // WPCS: XSS OK. echo ''; } } } } if ( ! function_exists( 'beautytemple_entry_tags' ) ){ /** * Prints HTML with meta information for the categories. */ function beautytemple_entry_tags() { // 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', 'beautytemple' ) ); if ( $tags_list ) { echo ''; /* translators: 1: list of tags. */ printf( esc_html__( 'Tags: %1$s', 'beautytemple' ), $tags_list ); // WPCS: XSS OK. echo ' '; } } } } if ( ! function_exists( 'beautytemple_post_thumbnail' ) ){ /** * Prints HTML with meta information for the categories. */ function beautytemple_post_thumbnail() { $output = null; if(has_post_thumbnail()){ $output = '
'; $output .= get_the_post_thumbnail(); $output .= '
'; } echo $output; } } if ( ! function_exists( 'beautytemple_posted_by' ) ) : /** * Prints HTML with meta information for the current author. */ function beautytemple_posted_by() { global $post; $byline = sprintf( /* translators: %s: post author. */ esc_html_x( 'by %s', 'post author', 'beautytemple' ), '' . esc_html( get_the_author_meta( 'display_name', $post->post_author )) . '' ); echo ' ' . $byline . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif; if ( ! function_exists( 'beautytemple_mins_to_read' ) ) : /** * Prints HTML with meta information for the current author. */ function beautytemple_mins_to_read() { $minsToRead = ceil(str_word_count(get_the_content()) / 200); echo ' ' . $minsToRead . esc_html__(' min to read','beautytemple').''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif;