Beispiel #1
0
    ?>

				</div>
				<div class="entry-meta">
					<span class="author vcard"><?php 
    printf(__('By %s', 'sandbox'), '<a class="url fn n" href="' . get_author_link(false, $authordata->ID, $authordata->user_nicename) . '" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">' . get_the_author() . '</a>');
    ?>
</span>
					<span class="meta-sep">|</span>
					<span class="cat-links"><?php 
    printf(__('Posted in %s', 'sandbox'), get_the_category_list(', '));
    ?>
</span>
					<span class="meta-sep">|</span>
<?php 
    if ($tag_ur_it = sandbox_tag_ur_it(', ')) {
        // Returns tags other than the one queried
        ?>
					<span class="tag-links"><?php 
        printf(__('Also tagged %s', 'sandbox'), $tag_ur_it);
        ?>
</span>
					<span class="meta-sep">|</span>
<?php 
    }
    edit_post_link(__('Edit', 'sandbox'), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n");
    ?>
					<span class="comments-link"><?php 
    comments_popup_link(__('Comments (0)', 'sandbox'), __('Comments (1)', 'sandbox'), __('Comments (%)', 'sandbox'));
    ?>
</span>
Beispiel #2
0
function vanilla_postfooter()
{
    global $id, $post;
    // Display the tags
    if (is_single()) {
        $tagtext = __(' and tagged', 'thematic');
        $posttags = get_the_tag_list("<span class=\"tag-links\"> {$tagtext} ", ', ', '</span>');
    } elseif (is_tag() && ($tag_ur_it = sandbox_tag_ur_it(', '))) {
        /* Returns tags other than the one queried */
        $posttags = '<span class="tag-links">' . __(' Also tagged ', 'thematic') . $tag_ur_it . '</span> <span class="meta-sep">|</span>';
    } else {
        $tagtext = __('Tagged', 'thematic');
        $posttags = get_the_tag_list("<span class=\"tag-links\"> {$tagtext} ", ', ', '</span> <span class="meta-sep">|</span>');
    }
    // Display comments link and edit link
    $postcomments = ' <span class="comments-link"><span class="bracket">{</span>';
    if (comments_open()) {
        $postcommentnumber = get_comments_number();
        if ($postcommentnumber != '1') {
            $postcomments .= ' <a href="' . get_permalink() . '#comments" title="' . __('Comment on ', 'thematic') . the_title_attribute('echo=0') . '">';
            $postcomments .= '<span>' . get_comments_number() . '</span>' . __(' comments', 'thematic') . '</a>';
        } else {
            $postcomments .= ' <a href="' . get_permalink() . '#comments" title="' . __('Comment on ', 'thematic') . the_title_attribute('echo=0') . '">';
            $postcomments .= '<span>' . get_comments_number() . '</span>' . __(' comment', 'thematic') . '</a>';
        }
    } else {
        $postcomments .= __('Comments closed', 'thematic');
    }
    $postcomments .= ' <span class="bracket">}</span></span>';
    // Display permalink, comments link, and RSS on single posts
    $postconnect .= __('. Bookmark the ', 'thematic') . '<a href="' . get_permalink() . '" title="' . __('Permalink to ', 'thematic') . the_title_attribute('echo=0') . '">';
    $postconnect .= __('permalink', 'thematic') . '</a>.';
    if ('open' == $post->comment_status && 'open' == $post->ping_status) {
        /* Comments are open */
        $postconnect .= ' <a class="comment-link" href="#respond" title ="' . __('Post a comment', 'thematic') . '">' . __('Post a comment', 'thematic') . '</a>';
        $postconnect .= __(' or leave a trackback: ', 'thematic');
        $postconnect .= '<a class="trackback-link" href="' . trackback_url(FALSE) . '" title ="' . __('Trackback URL for your post', 'thematic') . '" rel="trackback">' . __('Trackback URL', 'thematic') . '</a>.';
    } elseif (!('open' == $post->comment_status) && 'open' == $post->ping_status) {
        /* Only trackbacks are open */
        $postconnect .= __(' Comments are closed, but you can leave a trackback: ', 'thematic');
        $postconnect .= '<a class="trackback-link" href="' . trackback_url(FALSE) . '" title ="' . __('Trackback URL for your post', 'thematic') . '" rel="trackback">' . __('Trackback URL', 'thematic') . '</a>.';
    } elseif ('open' == $post->comment_status && !('open' == $post->ping_status)) {
        /* Only comments open */
        $postconnect .= __(' Trackbacks are closed, but you can ', 'thematic');
        $postconnect .= '<a class="comment-link" href="#respond" title ="' . __('Post a comment', 'thematic') . '">' . __('post a comment', 'thematic') . '</a>.';
    } elseif (!('open' == $post->comment_status) && !('open' == $post->ping_status)) {
        /* Comments and trackbacks closed */
        $postconnect .= __(' Both comments and trackbacks are currently closed.', 'thematic');
    }
    // Display edit link on single posts
    if (current_user_can('edit_posts')) {
        $postconnect .= ' ' . $posteditlink;
    }
    // Add it all up
    $postfooter = '<div class="entry-utility">';
    if ($post->post_type == 'page' && current_user_can('edit_posts')) {
        /* For logged-in "page" search results */
        $postfooter .= $posteditlink;
    } elseif ($post->post_type == 'page') {
        /* For logged-out "page" search results */
        // nothing
    } else {
        if (is_single()) {
            $postfooter .= $posttags . $postconnect;
        } else {
            $postfooter .= $posttags . $postcomments;
        }
    }
    $postfooter .= "</div><!-- .entry-utility -->\n";
    // Put it on the screen
    echo apply_filters('vanilla_postfooter', $postfooter);
    // Filter to override default post footer
}