%2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { /* translators: 1: published date & time 2: published date & time */ $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( DATE_W3C ) ), esc_html( get_the_date() ) ); $posted_on = sprintf( /* translators: 1: Post Link 2: Post Publish Time */ '%2$s', esc_url( get_permalink() ), $time_string ); echo '' . $posted_on . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif; if ( ! function_exists( 'eviewp_first_category' ) ) : /** * Gets first category from the list of category */ function eviewp_first_category() { if( empty( get_the_category() ) ) { return; } $category_name = get_the_category()[0]->cat_name; $category_link = get_category_link( get_cat_ID( $category_name ) ); if ( ! empty( $category_name ) ) { echo ''. $category_name .''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } endif; if ( ! function_exists( 'eviewp_get_breadcrumbs' ) ) : /** * Gets breadcrumbs for the page */ function eviewp_get_breadcrumbs() { echo 'Home'; if ( is_category() || is_single() ) { esc_html_e( ' > ', 'eviewp' ); the_category(' • '); if ( is_single() ) { esc_html_e( ' > ', 'eviewp' ); the_title(); } } elseif ( is_page() ) { esc_html_e( ' > ', 'eviewp' ); echo the_title(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } elseif ( is_search() ) { esc_html_e( ' > Search Results for... ', 'eviewp' ); echo '"'; echo the_search_query(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo '"'; } } endif; if ( ! function_exists( 'eviewp_posted_by' ) ) : /** * Prints HTML with meta information for the current author. */ function eviewp_posted_by() { $byline = sprintf( /* translators: %s: post author. */ esc_html_x( 'by %s', 'post author', 'eviewp' ), ' ' ); echo ' ' . $byline . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif; if ( ! function_exists( 'eviewp_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 eviewp_post_thumbnail() { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } if ( is_singular() ) : ?>