Exemple #1
0
    /**
     * Prints HTML with meta information for the current post-date/time and author.
     */
    function masonic_posted_on()
    {
        if (is_single()) {
            $cat_list = get_the_category_list(__(' ', 'masonic'));
            if ($cat_list && masonic_categorized_blog()) {
                echo '<div class="catagory-type">' . $cat_list . '</div>';
            }
        }
        $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
        if (get_the_time('U') !== get_the_modified_time('U')) {
            $time_string .= '<time class="updated" datetime="%3$s">%4$s</time>';
        }
        $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()));
        printf(__('<div class="entry-date fa fa-clock-o"><a href="%1$s" title="%2$s" rel="bookmark">%3$s</a></div>', 'masonic'), esc_url(get_permalink()), esc_attr(get_the_time()), $time_string);
        echo '<div class="entry-author vcard author fa fa-user"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . esc_html(get_the_author()) . '</a></div>';
        if (!is_single()) {
            $categories_list = get_the_category_list(__(', ', 'masonic'));
            if ($categories_list && masonic_categorized_blog()) {
                echo '<div class="entry-standard fa fa-folder-open">' . $categories_list . '</div>';
            }
        }
        if (is_single()) {
            if (comments_open()) {
                ?>
            <div class="entry-date fa fa-comments"><?php 
                comments_popup_link(__('No Comment', 'masonic'), __('1 Comment', 'masonic'), __('% Comments', 'masonic'));
                ?>
</div>
            <?php 
            }
        }
        $tags_list = get_the_tag_list('', __(', ', 'masonic'));
        if (is_single()) {
            if ($tags_list) {
                ?>
            <div class="entry-tag fa fa-tags"><?php 
                printf(__(' %1$s', 'masonic'), $tags_list);
                ?>
</div>
            <?php 
            }
        }
    }
    /**
     * Prints HTML with meta information for the current post-date/time and author.
     */
    function masonic_posted_on()
    {
        if (is_single()) {
            $cat_list = get_the_category_list(__(' ', 'masonic'));
            if ($cat_list && masonic_categorized_blog()) {
                echo '<div class="catagory-type">' . $cat_list . '</div>';
            }
        }
        echo '<div class="entry-date updated fa fa-clock-o"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . get_the_date() . '</a></div>';
        echo '<div class="entry-author vcard author fa fa-user"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . esc_html(get_the_author()) . '</a></div>';
        if (!is_single()) {
            $categories_list = get_the_category_list(__(', ', 'masonic'));
            if ($categories_list && masonic_categorized_blog()) {
                echo '<div class="entry-standard fa fa-folder-open">' . $categories_list . '</div>';
            }
        }
        if (is_single()) {
            if (comments_open()) {
                ?>
            <div class="entry-date fa fa-comments"><?php 
                comments_popup_link(__('No Comment', 'masonic'), __('1 Comment', 'masonic'), __('% Comments', 'masonic'));
                ?>
</div>
            <?php 
            }
        }
        $tags_list = get_the_tag_list('', __(', ', 'masonic'));
        if (is_single()) {
            if ($tags_list) {
                ?>
            <div class="entry-tag fa fa-tags"><?php 
                printf(__(' %1$s', 'masonic'), $tags_list);
                ?>
</div>
            <?php 
            }
        }
    }