%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 = '' . $time_string . ''; echo '' . $posted_on . ''; // phpcs:ignore WordPress.Security.EscapeOutput } endif; if ( ! function_exists( 'artblog_posted_by' ) ) : /** * Displays post author. * * @since 1.0.0 */ function artblog_posted_by() { $byline = '' . esc_html( get_the_author() ) . ''; echo ' ' . $byline . ''; // phpcs:ignore WordPress.Security.EscapeOutput } endif; if ( ! function_exists( 'artblog_posted_category' ) ) : /** * Displays post categories. * * @since 1.0.0 * * @param bool $only_one If true show only one category. */ function artblog_posted_category( $only_one = false ) { $all_categories = get_the_category(); $cat_content = ''; if ( true === $only_one && count( $all_categories ) > 1 ) { $categories_list = array_slice( $all_categories, 0, 1 ); } else { $categories_list = $all_categories; } if ( ! empty( $categories_list ) ) { foreach ( $categories_list as $cat ) { $cat_content .= ' ' . $cat->name . ''; } } if ( $cat_content ) { printf( '%1$s', $cat_content ); // phpcs:ignore WordPress.Security.EscapeOutput } } endif; if ( ! function_exists( 'artblog_posted_tags' ) ) : /** * Displays post tags. * * @since 1.0.0 */ function artblog_posted_tags() { /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'artblog' ) ); if ( $tags_list ) { printf( '%1$s', $tags_list ); // phpcs:ignore WordPress.Security.EscapeOutput } } endif; if ( ! function_exists( 'artblog_posted_comments' ) ) : /** * Displays post comment link. * * @since 1.0.0 */ function artblog_posted_comments() { if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( sprintf( wp_kses( /* translators: %s: post title */ __( 'Leave a Comment on %s', 'artblog' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); echo ''; } } endif; if ( ! function_exists( 'artblog_posted_edit_link' ) ) : /** * Displays post edit link. * * @since 1.0.0 */ function artblog_posted_edit_link() { if ( ! is_singular() ) { return; } edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __( 'Edit %s', 'artblog' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } endif; if ( ! function_exists( 'artblog_entry_footer' ) ) : /** * Displays post footer meta. */ function artblog_entry_footer() { if ( is_singular( 'post' ) ) { artblog_posted_tags(); } artblog_posted_edit_link(); } endif; if ( ! function_exists( 'artblog_post_thumbnail' ) ) : /** * Displays post thumbnail. * * @since 1.0.0 */ function artblog_post_thumbnail() { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } if ( is_singular() ) : ?>
%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 = '' . $time_string . ''; echo '' . $posted_on . ''; // phpcs:ignore WordPress.Security.EscapeOutput } endif; if ( ! function_exists( 'artblog_posted_author' ) ) : /** * Displays post author. * * @since 1.0.0 */ function artblog_posted_author() { $byline = '' . esc_html( get_the_author() ) . ''; echo ' ' . $byline . ''; // phpcs:ignore WordPress.Security.EscapeOutput } endif;