%2$s'; $time = $post_id ? get_the_time( 'U', $post_id ) : get_the_time( 'U' ); $modified_time = $post_id ? get_the_modified_time( 'U', $post_id ) : get_the_modified_time( 'U' ); if ( $time !== $modified_time ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( $post_id ? get_the_date( DATE_W3C, $post_id ) : get_the_date( DATE_W3C ) ), esc_html( blogcast_get_published_date($post_id) ), esc_attr( $post_id ? get_the_modified_date( DATE_W3C, $post_id ) : get_the_modified_date( DATE_W3C ) ), esc_html( blogcast_get_modified_date($post_id) ) ); $posted_on = '' . $time_string . ''; if( $for == 'banner' ) { $main_banner_date_icon = BD\blogcast_get_customizer_option( 'main_banner_date_icon' ); $icon_html = blogcast_get_icon_control_html( $main_banner_date_icon ); if( $icon_html ) $posted_on = $icon_html . $posted_on; } else if( $for == 'carousel' ) { $carousel_date_icon = BD\blogcast_get_customizer_option( 'carousel_date_icon' ); $icon_html = blogcast_get_icon_control_html( $carousel_date_icon ); if( $icon_html ) $posted_on = $icon_html . $posted_on; }else if( is_home() || is_archive() ) { $archive_date_icon = BD\blogcast_get_customizer_option( 'archive_date_icon' ); $icon_html = blogcast_get_icon_control_html( $archive_date_icon ); if( $icon_html ) $posted_on = $icon_html . $posted_on; } else if( is_single() ) { $single_date_icon = BD\blogcast_get_customizer_option( 'single_date_icon' ); $icon_html = blogcast_get_icon_control_html( $single_date_icon ); if( $icon_html ) $posted_on = $icon_html . $posted_on; } echo '' . $posted_on . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif; if ( ! function_exists( 'blogcast_posted_by' ) ) : /** * Prints HTML with meta information for the current author. */ function blogcast_posted_by( $for = '' ) { $byline = sprintf( /* translators: %s: post author. */ esc_html_x( '%s', 'post author', 'blogcast' ), '' ); if( $for == 'banner' ) { $author_image = get_avatar( get_the_author_meta( 'ID' ), 40 ); if( $author_image ) $byline = $author_image . $byline; } else if( $for == 'carousel' ) { $author_image = get_avatar( get_the_author_meta( 'ID' ), 40 ); if( $author_image ) $byline = $author_image . $byline; } else { if( is_home() || is_archive() ) : $author_image = get_avatar( get_the_author_meta( 'ID' ), 40 ); if( $author_image ) $byline = $author_image . $byline; endif; if( is_single() ) : $author_image = get_avatar( get_the_author_meta( 'ID' ), 40 ); if( $author_image ) $byline = $author_image . $byline; endif; if( is_search() ) : $author_image = get_avatar( get_the_author_meta( 'ID' ), 40 ); if( $author_image ) $byline = $author_image . $byline; endif; } echo ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif; if( ! function_exists( 'blogcast_tags_list' ) ) : /** * print the html for tags list */ function blogcast_tags_list() { // 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( '', ' ' ); if ( $tags_list ) { /* translators: 1: list of tags. */ printf( '', $tags_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } } endif; if ( ! function_exists( 'blogcast_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function blogcast_entry_footer() { edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __( 'Edit %s', 'blogcast' ), array( 'span' => array( 'class' => array(), ), ) ), wp_kses_post( get_the_title() ) ), '', '' ); } endif; if ( ! function_exists( 'blogcast_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 blogcast_post_thumbnail( $size = 'thumbnail' ) { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } if ( is_singular() ) : ?>