%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.OutputNotEscaped } endif; if ( ! function_exists( 'ascendoor_magazine_posted_by' ) ) : /** * Prints HTML with meta information for the current author. */ function ascendoor_magazine_posted_by() { if ( get_theme_mod( 'ascendoor_magazine_post_hide_author', false ) ) { return; } $byline = '' . esc_html( get_the_author() ) . ''; echo ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif; if ( ! function_exists( 'ascendoor_magazine_categories_list' ) ) : /** * Prints HTML with meta information for the categories. */ function ascendoor_magazine_categories_list( $with_background = false ) { if ( 'post' === get_post_type() ) { $categories = get_the_category(); $separator = $with_background ? '' : ', '; $output = ''; if ( ! empty( $categories ) ) { foreach ( $categories as $category ) { $category_color = get_term_meta( $category->term_id, '_category_color', true ); $style_attr = ''; if ( ! empty( $category_color ) ) { if ( $with_background ) { $style_attr = ' style="background-color: #' . esc_attr( $category_color ) . ';"'; } else { $style_attr = ' style="color: #' . esc_attr( $category_color ) . ';"'; } } $output .= '' . esc_html( $category->name ) . '' . $separator; } echo trim( $output, $separator ); } } } endif; if ( ! function_exists( 'ascendoor_magazine_entry_footer' ) ) : /** * Prints HTML with meta information for the tags and comments. */ function ascendoor_magazine_entry_footer() { // Hide category and tag text for pages. if ( 'post' === get_post_type() && is_singular() ) { $hide_tag = get_theme_mod( 'ascendoor_magazine_post_hide_tags', false ); if ( ! $hide_tag ) { /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'ascendoor-magazine' ) ); if ( $tags_list ) { /* translators: 1: list of tags. */ printf( '', $tags_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } } edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __( 'Edit %s', 'ascendoor-magazine' ), array( 'span' => array( 'class' => array(), ), ) ), wp_kses_post( get_the_title() ) ), '', '' ); } endif; if ( ! function_exists( 'ascendoor_magazine_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 ascendoor_magazine_post_thumbnail() { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } if ( is_singular() ) : ?>