%2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); $posted_on = sprintf( /* translators: %s: post date */ __( 'Posted on %s', 'foodie-world' ), '' . $time_string . '' ); // Get the author name; wrap it in a link. $byline = sprintf( /* translators: %s: post author */ __( 'By %s', 'foodie-world' ), '' . esc_html( get_the_author() ) . '' ); echo ' ' . $byline . '' . $posted_on . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'foodie_world_entry_category' ) ) : /** * Prints HTML with meta information for the category. */ function foodie_world_entry_category( $echo = true ) { $output = ''; // 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_list = get_the_category_list( ' ' ); if ( $categories_list ) { /* translators: 1: list of categories. */ $output = sprintf( '%1$s%2$s', sprintf( _x( 'Categories', 'Used before category names.', 'foodie-world' ) ), $categories_list ); // WPCS: XSS OK. } } if ( 'ect-service' === get_post_type() ) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_term_list( get_the_ID(), 'ect-service-type' ); if ( $categories_list ) { /* translators: 1: list of categories. */ $output = sprintf( '%1$s%2$s', sprintf( _x( 'Categories', 'Used before category names.', 'foodie-world' ) ), $categories_list ); // WPCS: XSS OK. } } if ( $echo ) { echo $output; } else { return $output; } } endif; if ( ! function_exists( 'foodie_world_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function foodie_world_entry_footer() { // 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_list = get_the_category_list( ' ' ); if ( $categories_list ) { /* translators: 1: list of categories. */ printf( '%1$s%2$s', sprintf( _x( 'Categories', 'Used before category names.', 'foodie-world' ) ), $categories_list ); // WPCS: XSS OK. } /* 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( '%1$s%2$s', sprintf( _x( 'Tags', 'Used before tag names.', 'foodie-world' ) ), $tags_list ); // WPCS: XSS OK. } } if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( sprintf( wp_kses( /* translators: %s: post title */ __( 'Leave a Comment on %s', 'foodie-world' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); echo ''; } edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __( 'Edit %s', 'foodie-world' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } endif; if ( ! function_exists( 'foodie_world_author_bio' ) ) : /** * Prints HTML with meta information for the author bio. */ function foodie_world_author_bio() { if ( '' !== get_the_author_meta( 'description' ) ) { get_template_part( 'template-parts/biography' ); } } endif; if ( ! function_exists( 'foodie_world_header_title' ) ) : /** * Display Header Media Title */ function foodie_world_header_title() { if ( is_front_page() ) { echo wp_kses_post( get_theme_mod( 'foodie_world_header_media_title' ) ); } elseif ( is_singular() ) { the_title(); } elseif ( is_404() ) { esc_html_e( 'Oops! That page can’t be found.', 'foodie-world' ); } elseif ( is_search() ) { /* translators: %s: search query. */ printf( esc_html__( 'Search Results for: %s', 'foodie-world' ), '' . get_search_query() . '' ); } elseif( class_exists( 'WooCommerce' ) && is_woocommerce() ) { woocommerce_page_title(); } else { the_archive_title(); } } endif; if ( ! function_exists( 'foodie_world_header_text' ) ) : /** * Display Header Media Text */ function foodie_world_header_text() { if ( is_front_page() ) { $header_media_text = get_theme_mod( 'foodie_world_header_media_text' ); echo wp_kses_post( $header_media_text ); } elseif ( is_singular() ) { echo '
'; foodie_world_posted_on(); echo '
'; } elseif ( is_404() ) { esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'foodie-world' ); } elseif( is_search() || ( class_exists( 'WooCommerce' ) && is_woocommerce() ) ) { // No Header Media Text. } else { the_archive_description(); } } endif; if ( ! function_exists( 'foodie_world_single_image' ) ) : /** * Display Single Page/Post Image */ function foodie_world_single_image() { global $post, $wp_query; // Get Page ID outside Loop $page_id = $wp_query->get_queried_object_id(); if ( $post) { if ( is_attachment() ) { $parent = $post->post_parent; $metabox_feat_img = get_post_meta( $parent,'foodie-world-featured-image', true ); } else { $metabox_feat_img = get_post_meta( $page_id,'foodie-world-featured-image', true ); } } if ( empty( $metabox_feat_img ) || ( !is_page() && !is_single() ) ) { $metabox_feat_img = 'default'; } $featured_image = get_theme_mod( 'foodie_world_single_layout', 'disabled' ); if ( ( 'disabled' == $metabox_feat_img || ! has_post_thumbnail() || ( 'default' == $metabox_feat_img && 'disabled' == $featured_image ) ) ) { echo ''; return false; } else { $class = ''; if ( 'default' == $metabox_feat_img ) { $class = $featured_image; } else { $class = 'from-metabox ' . $metabox_feat_img; $featured_image = $metabox_feat_img; } ?>