%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()) ); $posted_on = sprintf( '%s', '' . $time_string . '' ); $show_posted_date = 0; global $allure_news_theme_options; if (is_singular()) { if(!empty($allure_news_theme_options['allure-news-enable-single-date'])) { $show_posted_date = $allure_news_theme_options['allure-news-enable-single-date']; } } else { if(!empty($allure_news_theme_options['allure-news-enable-blog-date'])) { $show_posted_date = $allure_news_theme_options['allure-news-enable-blog-date']; } } if ($show_posted_date == 1) { echo '' . $posted_on . ''; // WPCS: XSS OK. } } endif; /** * Custom template tags for this theme * * Eventually, some of the functionality here could be replaced by core features. * * @package Allure News */ if (!function_exists('allure_news_widget_posted_on')) : /** * Prints HTML with meta information for the current post-date/time. */ function allure_news_widget_posted_on() { $time_string = ''; 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()) ); $posted_on = sprintf( '%s', '' . $time_string . '' ); echo '' . $posted_on . ''; // WPCS: XSS OK. } endif; if (!function_exists('allure_news_posted_by')) : /** * Prints HTML with meta information for the current author. */ function allure_news_posted_by() { $byline = sprintf( '%s', '' ); global $allure_news_theme_options; if (is_singular()) { $show_post_author = $allure_news_theme_options['allure-news-enable-single-author']; } else { $show_post_author = $allure_news_theme_options['allure-news-enable-blog-author']; } if ($show_post_author == 1) { echo ''; // WPCS: XSS OK. } } endif; if (!function_exists('allure_news_widget_posted_by')) : /** * Prints HTML with meta information for the current author. */ function allure_news_widget_posted_by() { $byline = sprintf( '%s', '' ); echo ''; // WPCS: XSS OK. } endif; if (!function_exists('allure_news_entry_category')) : /** * Prints HTML with meta information for the categories */ function allure_news_entry_category() { // Hide category 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. */ global $allure_news_theme_options; if (is_singular()) { $show_post_category = $allure_news_theme_options['allure-news-enable-single-category']; } else { $show_post_category = $allure_news_theme_options['allure-news-enable-blog-category']; } if ($show_post_category == 1) { echo '' . $categories_list . ''; // WPCS: XSS OK. } } } } endif; if (!function_exists('allure_news_widget_entry_category')) : /** * Prints HTML with meta information for the categories */ function allure_news_widget_entry_category() { // Hide category 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. */ echo '' . $categories_list . ''; // WPCS: XSS OK. } } } endif; if (!function_exists('allure_news_entry_footer')) : /** * Prints HTML with meta information for the tags and comments. */ function allure_news_entry_footer() { // Hide tag text for pages. if ('post' === get_post_type()) { global $allure_news_theme_options; $allure_news_enable_tags = $allure_news_theme_options['allure-news-enable-blog-tags']; if($allure_news_enable_tags == 1 || is_singular()) { /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html_x(', ', 'list item separator', 'allure-news')); if ($tags_list) { /* translators: 1: list of tags. */ echo '' . $tags_list; } } } global $allure_news_theme_options; if (!is_single() && !post_password_required() && (comments_open() || get_comments_number()) && ($allure_news_theme_options['allure-news-enable-blog-comment'] == 1)) { echo ''; comments_popup_link( sprintf( wp_kses( /* translators: %s: post title */ __('Leave a Comment on %s', 'allure-news'), 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', 'allure-news'), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } endif; if (!function_exists('allure_news_entry_footer')) : /** * Prints HTML with meta information for the tags and comments. */ function allure_news_entry_footer() { // Hide 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_x(', ', 'list item separator', 'allure-news')); if ($tags_list) { /* translators: 1: list of tags. */ echo ''. $tags_list; // WPCS: XSS OK. } } global $allure_news_theme_options; if (!is_single() && !post_password_required() && (comments_open() || get_comments_number()) && ($allure_news_theme_options['allure-news-enable-blog-comment'] == 1)) { echo ''; comments_popup_link( sprintf( wp_kses( /* translators: %s: post title */ __('Leave a Comment on %s', 'allure-news'), 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', 'allure-news'), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } endif; if (!function_exists('allure_news_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 allure_news_post_thumbnail() { if (post_password_required() || is_attachment() || !has_post_thumbnail()) { return; } if (is_singular()) : ?>