Esempio n. 1
0
    /**
     * Prints HTML with meta information for the categories, tags and comments.
     */
    function lesse_entry_footer()
    {
        $posted_on = lesse_posted_on();
        $allowed_meta = get_theme_mod('lesse_manage_meta', array('author', 'date', 'comment'));
        $byline = sprintf(esc_html_x('%s', 'post author', 'lesse-lite'), '<span class="author vcard">
			<a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . esc_html(get_the_author()) . '</a>
		 </span>');
        $cat_links = false;
        $tags_list = false;
        // 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(esc_html__(', ', 'lesse-lite'));
            if ($categories_list && lesse_categorized_blog()) {
                $cat_links = sprintf(esc_html__('%1$s', 'lesse-lite'), $categories_list);
                // WPCS: XSS OK.
            }
            /* translators: used between list items, there is a space after the comma */
            $tags_list = get_the_tag_list('<ul class="lesse-tags"><li>', '</li><li>', '</li></ul>');
        }
        if (in_array('author', $allowed_meta)) {
            echo "<span class='byline lesse-meta-item icon-user-1'>{$byline}</span>";
        }
        if (in_array('date', $allowed_meta)) {
            echo "<span class='posted-on lesse-meta-item icon-calendar'>{$posted_on}</span>";
        }
        if ($cat_links && in_array('categories', $allowed_meta)) {
            echo "<span class='cat-links lesse-meta-item icon-category'>{$cat_links}</span>";
        }
        if ($tags_list && in_array('tags', $allowed_meta)) {
            echo "<span class='tag-links lesse-meta-item icon-tags'>{$tags_list}</span>";
        }
        if (!is_single() && !post_password_required() && (comments_open() || get_comments_number()) && in_array('comment', $allowed_meta)) {
            echo '<span class="comments-link lesse-meta-item icon-comment-empty">';
            comments_popup_link(esc_html__('Leave a comment', 'lesse-lite'), esc_html__('Comment (1)', 'lesse-lite'), esc_html__('Comments (%)', 'lesse-lite'));
            echo '</span>';
        }
        edit_post_link(esc_html__('Edit', 'lesse-lite'), '<i class="edit-link icon-pencil-alt">', '</i>');
    }
Esempio n. 2
0
post_class();
?>
>
	<header class="entry-header">
		<?php 
the_title(sprintf('<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h2>');
?>
		<?php 
lesse_thumbnail('medium', sprintf('<figure class="lesse-post-thumb" ><a href="%s">', get_permalink()), '</a></figure>');
?>
		<?php 
if ('post' == get_post_type()) {
    ?>
		<div class="entry-meta">
			<?php 
    echo lesse_posted_on();
    ?>
		</div><!-- .entry-meta -->
		<?php 
}
?>
	</header><!-- .entry-header -->

	<div class="entry-summary">
		<?php 
the_excerpt();
?>
	</div><!-- .entry-summary -->

	<footer class="entry-footer">
		<?php