%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() ) ); $year = get_the_date('Y'); $month = get_the_date('m'); $day = get_the_date('d'); $link = get_day_link($year, $month, $day); if( $title ){ $posted_on = sprintf( /* translators: %s: post date. */ esc_html_x( 'Posted on %s', 'post date', 'asterisk-lite' ), '' . $time_string . '' ); }else{ $posted_on = '' . $time_string . ''; } echo '' . $posted_on . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif; if ( ! function_exists( 'asterisk_lite_posted_by' ) ) : /** * Prints HTML with meta information for the current author. */ function asterisk_lite_posted_by( $title = true, $image = false ) { if( $image ){ echo '
'; }else{ if( $title ){ $byline = sprintf( /* translators: %s: post author. */ esc_html_x( 'by %s', 'post author', 'asterisk-lite' ), '' ); }else{ $byline = ''; } echo ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } endif; if ( ! function_exists( 'asterisk_lite_entry_cat' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function asterisk_lite_entry_cat() { // 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 = get_the_category(); if ($categories) { /* translators: 1: list of categories. */ echo ''; foreach( $categories as $category ){ $cat_name = $category->name; $cat_slug = $category->slug; $cat_url = get_category_link( $category->term_id ); ?> '; } } } endif; if ( ! function_exists( 'asterisk_lite_entry_tag' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function asterisk_lite_entry_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__(',', 'asterisk-lite')); if ( $tags_list ) { /* translators: 1: list of tags. */ printf( '', $tags_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } } endif; if ( ! function_exists( 'asterisk_lite_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 asterisk_lite_post_thumbnail( $size = 'post-thumbnail', $else = true ) { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } if ( $else && is_singular() ) : ?>