%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' ), '' . esc_html( get_the_author() ) . '' ); 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() ) : ?>
the_title_attribute( array( 'echo' => false, ) ), 'class' => 'featured-image' ) ); ?>
user_id > 0 ) { $user = get_userdata( $comment->user_id ); $post = get_post( $comment->comment_post_ID ); if ( ! empty( $user ) && ! empty( $post ) ) { return $comment->user_id === $post->post_author; } } return false; } endif; if ( ! function_exists( 'eviewp_site_footer' ) ) { /** * Display footer */ function eviewp_site_footer() { /* translators: 1: current year 2: site title 3: theme's dev URL 4: Powered by string 5: Theme name */ $footerText = sprintf( '© %1$s %2$s • %4$s ', date( 'Y' ), get_bloginfo( 'name' ), esc_url( 'http://akashgupta.xyz' ), _x( 'Powered by', 'EvieWP', 'eviewp' ), __( 'EvieWP', 'eviewp' ) ); echo $footerText; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } if ( ! function_exists( 'eviewp_pagination' ) ) : /** * Display pagination for archives. */ function eviewp_pagination() { ?> 1, 'prev_text' => '< ' . esc_html__( 'Previous', 'eviewp' ), 'next_text' => esc_html__( 'Next', 'eviewp' ).' >', ) ); ?> '; if ( $tags && ! is_wp_error( $tags ) ) { foreach ($tags as $tag ) { echo ''. ucfirst( $tag->name ) .''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } echo ''; } endif; if ( ! function_exists( 'eviewp_singular_pagination' ) ) : /** * Gets the page for single post */ function eviewp_singular_pagination() { // Article Navigation $next_post = get_next_post(); $prev_post = get_previous_post(); if ( $next_post || $prev_post ) { ?>