Ejemplo n.º 1
4
        the_time(get_option('date_format'));
        ?>
</div>
			<div class="entry">
				<?php 
        the_content();
        ?>
				<?php 
        the_tags(__('<p class="tags"><small>Tags: ', "feed-me-seymour"), ', ', '</small></p>');
        ?>
				<p class="postmetadata alt">
					<small>
						<?php 
        _e('This entry was posted on ', "feed-me-seymour") . the_time(get_option('date_format')) . _e(' at ', "feed-me-seymour") . the_time() . _e(' and is filed under ', "feed-me-seymour") . the_category(', ');
        echo '. ';
        _e('You can follow any responses to this entry through the ', "feed-me-seymour") . post_comments_feed_link('RSS 2.0') . _e(' feed.', "feed-me-seymour");
        ?>
					</small>
				</p>
			</div>
       		<?php 
        wp_link_pages(array('before' => '<p><strong>' . __('Pages', "feed-me-seymour") . '</strong> ', 'after' => '</p>', 'next_or_number' => 'number'));
        ?>
		</div>
		<?php 
        comments_template();
        ?>
	<?php 
    }
} else {
    ?>
Ejemplo n.º 2
2
<a href="#" class="tabs selected"><span><?php 
_e('Comments', 'lightword');
?>
 (<?php 
echo $comments_nr;
?>
)</span></a>
<a href="#" class="tabs"><span><?php 
_e('Trackbacks', 'lightword');
?>
 (<?php 
echo $trackbacks_nr;
?>
)</span></a>
<span class="subscribe_comments"><?php 
post_comments_feed_link(__('( subscribe to comments on this post )', 'lightword'));
?>
</span>
<div class="clear_tab"></div>
<div class="tab-content selected">
<a name="comments"></a>

<?php 
if ($comments) {
    ?>
<div id="comentarii">
<ol class="commentlist">
<?php 
    wp_list_comments('type=comment&callback=nested_comments');
    ?>
</ol>
Ejemplo n.º 3
0
        the_tags('<p>Tags: ', ', ', '</p>');
        ?>

                    <p>
                        Dieser Artikel wurde pfostiert am <?php 
        the_time('l, F jS, Y');
        ?>
 um <?php 
        the_time();
        ?>
 und ist kategorisiert <?php 
        the_category(', ');
        ?>
. 
                        Du kannst Kommentaren mit Hilfe des Feeds folgen: <?php 
        post_comments_feed_link('RSS 2.0');
        ?>

                        <?php 
        if ('open' == $post->comment_status && 'open' == $post->ping_status) {
            // both comments and pings open
            ?>
                            Das Hinterlassen von <a href="#respond">Kommentaren</a> und <a href="<?php 
            trackback_url();
            ?>
" rel="trackback">Trackbacks</a> ist erlaubt und erwünscht.

                        <?php 
        } elseif (!('open' == $post->comment_status) && 'open' == $post->ping_status) {
            // only pings are open
            ?>
Ejemplo n.º 4
0
        the_tags('Tags: ');
        ?>
<br />
                    Category: <?php 
        the_category(', ');
        ?>
 <br />
                    This entry was posted <?php 
        the_time('l, j F, Y');
        ?>
 at <?php 
        the_time();
        ?>
<br />
                    You can follow any responses to this entry via <?php 
        post_comments_feed_link('RSS');
        ?>
.<br />
                </div>
            </div>
            <?php 
        comments_template('', true);
        ?>
            <div class="navigation">
                <div class="nav-prev"><?php 
        previous_post_link('&laquo; %link');
        ?>
</div>
                <div class="nav-next"><?php 
        next_post_link('%link &raquo;');
        ?>
Ejemplo n.º 5
0
</span>
				</p>
				<div class="clear"></div>
			</div>
			<small><?php 
        edit_post_link('Admin: Edit this entry', '', '');
        ?>
</small>

			<div class="postmetabottom">
				<div class="tags"><?php 
        the_tags('Tags: ', ', ', '');
        ?>
</div>
				<div class="readmore"><?php 
        post_comments_feed_link(__('Comments <abbr title="Really Simple Syndication">RSS</abbr> feed'));
        ?>
</div>
			</div>

		</div><!-- /post -->

		<div id="comments">
		<?php 
        if (function_exists('wp_list_comments')) {
            ?>

		<!-- WP 2.7 and above -->
		<?php 
            comments_template('', true);
            ?>
Ejemplo n.º 6
0
&amp;title=<?php 
the_title();
?>
"><img class="bookmark_icon" src="<?php 
bloginfo('stylesheet_directory');
?>
/images/bookmark/stumbleupon.png" alt="StumbleUpon" /></a></li>
	<li><a href="http://reddit.com/submit?url=<?php 
the_permalink();
?>
&amp;title=<?php 
the_title();
?>
"><img class="bookmark_icon" src="<?php 
bloginfo('stylesheet_directory');
?>
/images/bookmark/reddit.png" alt="Reddit" /></a></li>
	<li><a href="http://twitter.com/home?status=<?php 
the_permalink();
?>
"><img class="bookmark_icon" src="<?php 
bloginfo('stylesheet_directory');
?>
/images/bookmark/twitter.png" alt="Twitter" /></a></li>
	<li><?php 
$themePath = get_bloginfo('template_url');
$imagePath = '<img class="bookmark_icon" src="' . $themePath . '/images/bookmark/rss.png" alt="RSS" />';
post_comments_feed_link($link_text = $imagePath);
?>
</li>
</ul>
Ejemplo n.º 7
0
<div id="comments">
	<div class="pagewrap">
<?php 
}
?>

<?php 
if ($post->comment_status == 'open') {
    ?>
	<div class="info">
		<a href="#respond" title="Skip all the comments"><?php 
    _e('Reply now', 'guangzhou');
    ?>
</a> | 
		<?php 
    post_comments_feed_link('<img src="' . get_bloginfo('template_url') . '/image/feed.png" width="16" height="16" alt="Feed"/>');
    ?>
	</div>
<?php 
}
?>

<?php 
if (GZ_Comments::comments_number() > 0) {
    ?>
	<h3><?php 
    echo GZ_Comments::comments_title();
    ?>
</h3>

	<?php 
Ejemplo n.º 8
0
 */
// Password Protection
if (post_password_required()) {
    return;
}
?>

		<h4><?php 
/* translators: 1: language string for the number of comment(s), 2: post title */
printf(_n('<span id="comments">1</span> Response to %2$s', '<span id="comments">%1$s</span> Responses to %2$s', get_comments_number(), 'k2'), number_format_i18n(get_comments_number()), '&#8220;' . get_the_title() . '&#8221;');
?>
</h4>

		<div class="metalinks">
			<span class="commentsrsslink"><?php 
post_comments_feed_link(__('Feed for this Entry', 'k2'));
?>
</span>
			<?php 
if (pings_open()) {
    ?>
			<span class="trackbacklink"><a href="<?php 
    trackback_url();
    ?>
" title="<?php 
    _e('Copy this URI to trackback this entry.', 'k2');
    ?>
"><?php 
    _e('Trackback Address', 'k2');
    ?>
</a></span>
Ejemplo n.º 9
0
        }
        ?>


<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>

<p><input name="submit" type="submit" id="commentsubmit" tabindex="5" value="Post" />
<?php 
        comment_id_fields();
        ?>
</p>
<?php 
        do_action('comment_form', $post->ID);
        ?>

</form>

<div class="comment-rss"><?php 
        post_comments_feed_link('Subscribe to Comments via RSS');
        ?>
</div>

<?php 
    }
    // If registration required and not logged in
    ?>
</div>

<?php 
}
// if you delete this the sky will fall on your head
Ejemplo n.º 10
0
    return;
}
$comments_nr = get_comment_type_count('comment');
$trackbacks_nr = get_comment_type_count('ping');
?>
<div id="tabsContainer">

<a href="#" class="tabs selected"><span>Comments (<?php 
echo $comments_nr;
?>
)</span></a>
<a href="#" class="tabs"><span>Trackbacks (<?php 
echo $trackbacks_nr;
?>
)</span></a>  <?php 
post_comments_feed_link(__('<span class="subscribe_comments">( subscribe to comments on this post )</span>'));
?>
<div class="clear_tab"></div>
<div class="tab-content selected">
<?php 
if ($comments) {
    ?>
<div id="comentarii">
<ol class="commentlist">

<?php 
    foreach ($comments as $comment) {
        $comment_type = get_comment_type();
        if ($comment_type == 'comment') {
            ?>
<li class="alt <?php 
Ejemplo n.º 11
0
        the_category_rss();
        ?>
			<guid isPermaLink="false"><?php 
        echo get_permalink($post->ID);
        ?>
</guid>
			<description><![CDATA[<?php 
        the_excerpt();
        ?>
]]></description>
			<content:encoded><![CDATA[<?php 
        the_content('Read more...');
        ?>
]]></content:encoded>
			<wfw:commentRss><?php 
        post_comments_feed_link();
        ?>
</wfw:commentRss>
			<slash:comments><?php 
        comments_number('zero', 'one', 'more');
        ?>
</slash:comments>
			</item>
			
	<?php 
    }
} else {
    ?>

<?php 
}
Ejemplo n.º 12
0
			
			<?php 
        show_post_attachment($post->ID);
        ?>
      
			<dl class="aside">
			  <?php 
        the_tags('<dt class="tags">Tagged</dt><dd>', ', ', '</dd>');
        ?>
			  <dt class="category">Posted in</dt>
			  <dd><?php 
        the_category(', ');
        ?>
</dd>
			  <dt class="comments">Follow the <?php 
        post_comments_feed_link('comments');
        ?>
.</dt>
			  <?php 
        edit_post_link('Edit this entry', '<dt class="edit">', '</dt>');
        ?>
			</dl>
		</div>

    <div class="comments-wrapper">
		<?php 
        if (!('open' == $post->comment_status) && 'open' == $post->ping_status) {
            // Only Pings are Open
            ?>
			Comments are currently closed.
		<?php 
Ejemplo n.º 13
0
} else {
    // this is displayed if there are no comments so far
    ?>

	<?php 
    if (comments_open()) {
        ?>
		<!-- If comments are open, but there are no comments. -->
        <p class="simple-red tac squeezepad">At last you are here. Be bold. Sieze the moment. Be the first to take the opportunity to post a comment here. <br /><br /><em>We have beeen waiting for you to arrive here to provide your feedback. Now that you are here, go ahead and post a quick note. We would appreciate it. </em></p>

	 <?php 
    } else {
        // comments are closed
        ?>
		<p class="nocomments"><?php 
        !is_page() ? _e('Comments are closed.', 'wordsmith-anvil') : '';
        ?>
</p>
	<?php 
    }
}
$fields = array('author' => '<div class="comment-form-info"><p class="comment-form-author">' . '<label for="author">' . __('Name') . '</label> ' . ($req ? '<span class="required">*</span>' : '') . '<input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="40" /></p>', 'email' => '<p class="comment-form-email"><label for="email">' . __('Email') . '</label> ' . ($req ? '<span class="required">*</span>' : '') . '<input id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="40"/></p>', 'url' => '<p class="comment-form-url"><label for="url">' . __('Website') . '</label>' . '<input id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="40" /></p></div>');
comment_form(array('fields' => apply_filters('comment_form_default_fields', $fields), 'comment_field' => '<div class="comment-form-msg"><p class="comment-form-comment"><label for="comment">' . __('My Feedback is: ', 'wordsmith-anvil') . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p></div>', 'comment_notes_before' => '<p class="comment-notes">' . __('Your email is safe here. It will not be published or shared.', 'wordsmith-anvil') . ($req ? __(' Required fields are marked <span class="required">*</span>', 'wordsmith-anvil') : '') . '</p>', 'comment_notes_after' => '<p class="form-allowed-tags">' . sprintf(__('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', 'wordsmith-anvil'), ' <br /><br /><code>' . allowed_tags() . '</code>') . '</p>', 'id_submit' => 'submit', 'title_reply' => __('Add Your Comment, Feedback or Opinion Here', 'wordsmith-anvil'), 'cancel_reply_link' => __('(Cancel Reply)', 'wordsmith-anvil'), 'label_submit' => __('Add Comment', 'wordsmith-anvil')));
?>
<div class="comments-rss"><?php 
post_comments_feed_link(__('Subscribe to comments', 'wordsmith-anvil'));
// addedin 1.6.8
?>
</div>
<br class="clearboth" />
</div><!-- #comments -->
Ejemplo n.º 14
0
						Both comments and pings are currently closed.
					<?php 
        }
        ?>
          <?php 
        render_partial('meta');
        ?>
			</p>

		</div><!-- .entry -->
	</div>

<div id="comments-container">
<?php 
        comments_template();
        ?>
<span id="comments-rss"><?php 
        post_comments_feed_link('Article Comments RSS');
        ?>
</p>
</div>

<?php 
    }
} else {
    ?>

	<p>Sorry, no posts matched your criteria.</p>

<?php 
}
Ejemplo n.º 15
0
    if (!comments_open()) {
        // There are comments but comments are now closed
        ?>
    	<p class="nocomments"><?php 
        _e('Comments are closed.', 'gridby');
        ?>
</p>
    <?php 
    }
} else {
    // I.E. There are no Comments
    if (comments_open()) {
        // Comments are open, but there are none yet
        // echo"<p>Be the first to write a comment.</p>";
    } else {
        // comments are closed
        ?>
       <p class="nocomments"><?php 
        _e('Comments are closed.', 'gridby');
        ?>
</p>
    <?php 
    }
}
// Display Form/Login info Section
// the comment_form() function handles this and can be used without any paramaters simply as "comment_form()"
comment_form(array('comment_field' => '<p><textarea name="comment" id="comment" cols="58" rows="10" tabindex="4" aria-required="true"></textarea></p>', 'label_submit' => '' . __('Submit Comment') . '', 'comment_notes_after' => ''));
// RSS comments link
echo '<div class="comments_rss">';
post_comments_feed_link('' . __('Comments RSS Feed') . '');
echo '</div>';
Ejemplo n.º 16
0
        ?>
" />
<input type="hidden" name="comment_post_ID" value="<?php 
        echo $id;
        ?>
" />
</p>
<?php 
        do_action('comment_form', $post->ID);
        ?>

</form>


<div class="reference-urls"><?php 
        post_comments_feed_link(__('<abbr title="Really Simple Syndication">RSS</abbr> feed for these comments'));
        if (pings_open()) {
            ?>
	<a href="<?php 
            trackback_url();
            ?>
" rel="trackback" class="trackback"><?php 
            _e('TrackBack <abbr title="Universal Resource Locator">URL</abbr>');
            ?>
</a>
<?php 
        }
        ?>
</div>

Ejemplo n.º 17
0
    ?>
	<p><a href="<?php 
    trackback_url('display');
    ?>
"><?php 
    _e('Trackback this post', 'flower-power');
    ?>
</a> &nbsp;|&nbsp; <?php 
    post_comments_feed_link(__('Subscribe to comments via RSS Feed', 'flower-power'));
    ?>
</p>
<?php 
} elseif (comments_open()) {
    ?>
	<p><?php 
    post_comments_feed_link(__('Subscribe to comments via RSS Feed', 'flower-power'));
    ?>
</p>
<?php 
} elseif (pings_open()) {
    ?>
	<p><a href="<?php 
    trackback_url('display');
    ?>
"><?php 
    _e('Trackback', 'flower-power');
    ?>
</a></p>
<?php 
}
?>
Ejemplo n.º 18
0
        ?>
" rel="bookmark" title="Permanent Link to <?php 
        the_title_attribute();
        ?>
"><?php 
        the_title();
        ?>
</a></h3>
                <small>Posted on <?php 
        the_time('l, F jS, Y');
        ?>
 at <?php 
        the_time();
        ?>
 | <?php 
        post_comments_feed_link('Subscribe to Comments');
        ?>
</small>
                <?php 
        the_excerpt();
        ?>
			<?php 
    }
    ?>

			<?php 
} else {
    ?>

			<p><?php 
    _e('Sorry, no posts matched your criteria.');
Ejemplo n.º 19
0
</div>
            		<div class="next"><?php 
    next_post_link('%link &raquo;');
    ?>
</div>
          		</nav>

				<footer class="post-info">
    				<small>Category: <?php 
    the_category(', ');
    ?>
 | <?php 
    the_tags('Tags: ', ', ', '');
    ?>
    				<?php 
    post_comments_feed_link('RSS (for these comments)');
    ?>
 |  
						
    				<?php 
    if ('open' == $post->comment_status && 'open' == $post->ping_status) {
        ?>
      				<!-- Both Comments and Pings are open -->
      				<a href="#respond">Leave a comment</a> | <a href="<?php 
        trackback_url(true);
        ?>
" rel="trackback">Trackback</a>
						
    				<?php 
    } elseif (!('open' == $post->comment_status) && 'open' == $post->ping_status) {
        ?>
Ejemplo n.º 20
0
		<div class="icon"><span class="ui-icon ui-icon-clock"></span> <?php 
        the_time('l, F jS, Y');
        ?>
 at <?php 
        the_time();
        ?>
</div> 
		<div class="icon"><span class="ui-icon ui-icon-folder-open"></span> <?php 
        the_category(' | ');
        if (get_the_tags()) {
            the_tags(' | ');
        }
        ?>
</div>
		<div class="icon"><span class="ui-icon ui-icon-signal-diag"></span>  <?php 
        post_comments_feed_link('Feed');
        ?>
</div> 
		<div id="dialog_link"><span class="ui-icon ui-icon-comment"></span><a href="#"> <?php 
        _e('Comments', 'fullscreen');
        ?>
</a></div>
		<div class="icon"><?php 
        edit_post_link(esc_html__('Edit', 'fullscreen'), '<span class="ui-icon ui-icon-pencil"></span>', '');
        ?>
</div>
		<div id="post-nav">
		    <div class="post-nav-prev"><?php 
        previous_post_link('%link', __('<span class="ui-icon ui-icon-circle-triangle-w"></span> Previous', 'fullscreen'), TRUE);
        ?>
</div>
Ejemplo n.º 21
0
    }
}
/* This variable is for alternating comment background */
$oddcomment = 'alt';
?>

<!-- You can start editing here. -->

<?php 
if ($comments) {
    ?>
	<h3 id="comments"><?php 
    comments_number(esc_html__('No Responses', 'fullscreen'), esc_html__('One Response', 'fullscreen'), esc_html__('% Responses', 'fullscreen'));
    ?>
 <span class="comments-subscribe"><?php 
    post_comments_feed_link(esc_html__('Subscribe to comments', 'fullscreen'));
    ?>
</span></h3>

	<ol class="commentlist">

	<?php 
    foreach ($comments as $comment) {
        ?>

		<li class="<?php 
        echo $oddcomment;
        ?>
" id="comment-<?php 
        comment_ID();
        ?>
Ejemplo n.º 22
0
            <div class="alignleft"><?php 
    previous_comments_link();
    ?>
</div>
            <div class="alignright"><?php 
    next_comments_link();
    ?>
</div>
        </div>
    <?php 
    if (!comments_open()) {
        // There are comments but comments are now closed
        echo "<p class='nocomments'>Comments are closed.</p>";
    }
} else {
    // I.E. There are no Comments
    if (comments_open()) {
        // Comments are open, but there are none yet
        // echo"<p>Be the first to write a comment.</p>";
    } else {
        // comments are closed
        echo "<p class='nocomments'>Comments are closed.</p>";
    }
}
// Display Form/Login info Section
// the comment_form() function handles this and can be used without any paramaters simply as "comment_form()"
comment_form(array('comment_field' => '<p><textarea name="comment" id="comment" cols="58" rows="10" tabindex="4" aria-required="true"></textarea></p>', 'label_submit' => 'Submit Comment', 'comment_notes_after' => ''));
// RSS comments link
echo '<div class="comments_rss">';
post_comments_feed_link('Comments RSS Feed');
echo '</div>';
Ejemplo n.º 23
0
			<?php 
    get_template_part('content', 'single');
    ?>

			<?php 
    daily_cooking_custom_post_nav();
    ?>

			<?php 
    // If comments are open or we have at least one comment, load up the comment template
    if (comments_open() || get_comments_number()) {
        ?>
				<p class="rss">
				<?php 
        post_comments_feed_link(__('Subscribe to these comments', 'daily-cooking-custom'));
        ?>
				</p>
				<?php 
        comments_template();
    }
    ?>

		<?php 
}
// end of the loop.
?>

		</main><!-- #main -->
	</div><!-- #primary -->
Ejemplo n.º 24
0
    ?>
</p>

<?php 
    return;
}
?>

	<h4><?php 
printf('%1$s %2$s to &#8220;%3$s&#8221;', '<span id="comments">' . count($comments) . '</span>', count($comments) ? 'Responses' : 'Response', the_title('', '', false));
?>
</h4>

	<div class="metalinks">
		<span class="commentsrsslink"><?php 
post_comments_feed_link('Feed for this Entry');
?>
</span>
		<?php 
if (pings_open()) {
    ?>
<span class="trackbacklink"><a href="<?php 
    trackback_url();
    ?>
" title="<?php 
    echo 'Copy this URI to trackback this entry.';
    ?>
"><?php 
    echo 'Trackback Address';
    ?>
</a></span><?php 
Ejemplo n.º 25
0
 function comment_count()
 {
     global $post;
     if ($post->comment_status != 'closed') {
         global $wpdb;
         $comments = $wpdb->get_var("SELECT COUNT(comment_ID) FROM {$wpdb->comments} WHERE comment_post_ID='{$post->ID}' AND comment_type='' AND comment_approved='1'");
         $pings = $wpdb->get_var("SELECT COUNT(comment_ID) FROM {$wpdb->comments} WHERE comment_post_ID='{$post->ID}' AND comment_type!='' AND comment_type!='gone' AND comment_approved='1'");
         echo '<p>';
         if ($pings > 0 && $comments > 0) {
             printf(_n('There is <strong>%d comment</strong>', 'There are <strong>%d comments</strong>', $comments, 'guangzhou'), $comments);
             printf(_n(' and <strong>%d ping</strong>.', ' and <strong>%d pings</strong>.', $pings, 'guangzhou'), $pings);
         } else {
             if ($comments > 0) {
                 printf(_n('There is <strong>%d comment</strong>.', 'There are <strong>%d comments</strong>.', $comments, 'guangzhou'), $comments);
             } else {
                 if ($pings > 0) {
                     printf(_n('There is <strong>%d ping</strong>.', 'There are <strong>%d pings</strong>.', $pings, 'guangzhou'), $pings);
                 } else {
                     echo __('There are <strong>no comments</strong>.', 'guangzhou');
                 }
             }
         }
         echo __(' You can keep track of all comments with the ', 'guangzhou');
         post_comments_feed_link('RSS');
         echo __(' feed.</p>', 'guangzhou');
     }
 }
Ejemplo n.º 26
0
		<!-- If comments are open, but there are no comments. -->

	 <?php 
    } else {
        // comments are closed
        ?>
		<!-- If comments are closed. -->
		<p class="nocomments">Comments are closed.</p>

	<?php 
    }
}
?>

	<p style="font-size:12px;"><?php 
post_comments_feed_link(__('RSS feed for comments on this post.'));
?>
	<?php 
if (pings_open()) {
    ?>
	         <a href="<?php 
    trackback_url();
    ?>
" rel="trackback"><?php 
    _e('TrackBack URL');
    ?>
</a>
	<?php 
}
?>
	</p>
Ejemplo n.º 27
0
<div style="clear: both;"></div>
<?php 
} else {
    // If there are no comments yet
    ?>
<p>
    <?php 
    _e('No comments yet.');
    ?>
</p>
<?php 
}
?>
<p>
    <?php 
post_comments_feed_link(__('<abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.'));
?>
    <?php 
if (pings_open()) {
    ?>
    <a href="<?php 
    trackback_url();
    ?>
" rel="trackback">
    <?php 
    _e('TrackBack <abbr title="Universal Resource Locator">URL</abbr>');
    ?>
    </a>
    <?php 
}
?>
Ejemplo n.º 28
0
function bfa_postinfo($postinfo_string)
{
    // one theme option needed below for nofollow trackback / RSS links yes/no
    global $bfa_ata, $post;
    /* replace date format escape placeholders(#) with the actual escpae
    	character (=backslashes). This function removes all backslashes from
    	post info strings to avoid issues with hosts that have magic_quotes_gpc ON.
    	But we want to keep the backslashes inside date items, because they are
    	needed to escape literal strings inside dates */
    $postinfo_string = str_replace("#", "\\", $postinfo_string);
    $postinfo = $postinfo_string;
    // Author public name
    if (strpos($postinfo_string, '%author%') !== FALSE) {
        ob_start();
        the_author();
        $author = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author%", $author, $postinfo);
    }
    // Public name of Author who last modified a post, since WordPress 2.8.
    // Check first if function is available (= if this is WP 2.8+)
    if (function_exists('the_modified_author')) {
        if (strpos($postinfo_string, '%modified-author%') !== FALSE) {
            ob_start();
            the_modified_author();
            $modified_author = ob_get_contents();
            ob_end_clean();
            $postinfo = str_replace("%modified-author%", $modified_author, $postinfo);
        }
    }
    // Author about yourself
    if (strpos($postinfo_string, '%author-description%') !== FALSE) {
        ob_start();
        the_author_meta('description');
        $author_description = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-description%", $author_description, $postinfo);
    }
    // Author login name
    if (strpos($postinfo_string, '%author-login%') !== FALSE) {
        ob_start();
        the_author_meta('user_login');
        $author_login = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-login%", $author_login, $postinfo);
    }
    // Author first name
    if (strpos($postinfo_string, '%author-firstname%') !== FALSE) {
        ob_start();
        the_author_meta('first_name');
        $author_firstname = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-firstname%", $author_firstname, $postinfo);
    }
    // Author last name
    if (strpos($postinfo_string, '%author-lastname%') !== FALSE) {
        ob_start();
        the_author_meta('last_name');
        $author_lastname = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-lastname%", $author_lastname, $postinfo);
    }
    // Author nickname
    if (strpos($postinfo_string, '%author-nickname%') !== FALSE) {
        ob_start();
        the_author_meta('nickname');
        $author_nickname = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-nickname%", $author_nickname, $postinfo);
    }
    // Author ID
    if (strpos($postinfo_string, '%author-id%') !== FALSE) {
        ob_start();
        the_author_meta('ID');
        $author_ID = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-id%", $author_ID, $postinfo);
    }
    // Author email address, clear text in HTML source code
    if (strpos($postinfo_string, '%author-email-clear%') !== FALSE) {
        ob_start();
        the_author_meta('email');
        $author_email_clear = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-email-clear%", $author_email_clear, $postinfo);
    }
    // Author email address obfuscated
    if (strpos($postinfo_string, '%author-email%') !== FALSE) {
        $postinfo = str_replace("%author-email%", antispambot(get_the_author_email()), $postinfo);
    }
    // Author website URL
    if (strpos($postinfo_string, '%author-url%') !== FALSE) {
        ob_start();
        the_author_meta('url');
        $author_url = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-url%", $author_url, $postinfo);
    }
    // Author website link
    if (strpos($postinfo_string, '%author-link%') !== FALSE) {
        ob_start();
        the_author_link();
        $author_link = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-link%", $author_link, $postinfo);
    }
    // Author posts archive link
    if (strpos($postinfo_string, '%author-posts-link%') !== FALSE) {
        ob_start();
        the_author_posts_link();
        $author_posts_link = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-posts-link%", $author_posts_link, $postinfo);
    }
    //  LEGACY: %author-linked% replaced by %author-posts-link% in 3.3.2, but displays the same: Author posts archive link
    if (strpos($postinfo_string, '%author-linked%') !== FALSE) {
        ob_start();
        the_author_posts_link();
        $author_posts_link = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-linked%", $author_posts_link, $postinfo);
    }
    // Author post count
    if (strpos($postinfo_string, '%author-post-count%') !== FALSE) {
        ob_start();
        the_author_posts();
        $author_post_count = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-post-count%", $author_post_count, $postinfo);
    }
    // Author AOL Instant Messenger screenname
    if (strpos($postinfo_string, '%author-aim%') !== FALSE) {
        ob_start();
        the_author_meta('aim');
        $author_aim = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-aim%", $author_aim, $postinfo);
    }
    // Author Yahoo IM ID
    if (strpos($postinfo_string, '%author-yim%') !== FALSE) {
        ob_start();
        the_author_meta('yim');
        $author_yim = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-yim%", $author_yim, $postinfo);
    }
    // Date & Time
    if (strpos($postinfo_string, '%date(') !== FALSE) {
        $postinfo = preg_replace_callback("/%date\\((.*?)'(.*?)'(.*?)\\)%/is", "bfa_parse_date_callback", $postinfo);
    }
    // Date & Time, last modified
    if (strpos($postinfo_string, '%date-modified(') !== FALSE) {
        $postinfo = preg_replace_callback("/%date-modified\\((.*?)'(.*?)'(.*?)\\)%/is", "bfa_parse_date_modified_callback", $postinfo);
    }
    // Tags, linked - since WP 2.3
    if (strpos($postinfo_string, '%tags-linked') !== FALSE) {
        while (strpos($postinfo, '%tags-linked') !== FALSE) {
            $tag_link_options = preg_match("/(.*)%tags-linked\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $tag_link_matches);
            $tags_linked = get_the_tag_list($tag_link_matches[2], $tag_link_matches[4], $tag_link_matches[6]);
            $postinfo = preg_replace("/(.*)%tags-linked\\((.*?)\\)%(.*)/i", "\${1}" . $tags_linked . "\${3}", $postinfo);
        }
    }
    // Tags, linked. If post has no tags, categories are displayed instead -  since WP 2.3
    if (strpos($postinfo_string, '%tags-cats-linked') !== FALSE) {
        while (strpos($postinfo, '%tags-cats-linked') !== FALSE) {
            $tag_link_options = preg_match("/(.*)%tags-cats-linked\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $tag_link_matches);
            ob_start();
            the_tags($tag_link_matches[2], $tag_link_matches[4], $tag_link_matches[6]);
            $tags_cats_linked = ob_get_contents();
            ob_end_clean();
            $postinfo = preg_replace("/(.*)%tags-cats-linked\\((.*?)\\)%(.*)/i", "\${1}" . $tags_cats_linked . "\${3}", $postinfo);
        }
    }
    // Tags, not linked - since WP 2.3
    if (strpos($postinfo_string, '%tags(') !== FALSE) {
        while (strpos($postinfo, '%tags(') !== FALSE) {
            $tag_options = preg_match("/(.*)%tags\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $tag_matches);
            $posttags = get_the_tags();
            if ($posttags) {
                foreach ($posttags as $tag) {
                    $tag_list .= $tag->name . $tag_matches[4];
                }
                // remove last separator
                $tag_list = preg_replace("/" . $tag_matches[4] . "\$/mi", "", $tag_list);
                $tags = $tag_matches[2] . $tag_list . $tag_matches[6];
            } else {
                $tags = "";
            }
            $postinfo = preg_replace("/(.*)%tags\\((.*?)\\)%(.*)/i", "\${1}" . $tags . "\${3}", $postinfo);
        }
    }
    // 1st category
    if (strpos($postinfo_string, '%category%') !== FALSE) {
        $all_categories = get_the_category();
        $category = $all_categories[0]->cat_name;
        $category_notlinked = $category;
        $postinfo = str_replace("%category%", $category_notlinked, $postinfo);
    }
    // 1st category, linked
    if (strpos($postinfo_string, '%category-linked%') !== FALSE) {
        $all_categories = get_the_category();
        $category = $all_categories[0]->cat_name;
        $category_linked = '<a class="' . $category . '" href="' . get_category_link($all_categories[0]->cat_ID) . '">' . $category . '</a>';
        $postinfo = str_replace("%category-linked%", $category_linked, $postinfo);
    }
    // Categories, linked with class name added
    $categories_linked = '';
    if (strpos($postinfo_string, '%categories-linked') !== FALSE) {
        while (strpos($postinfo, '%categories-linked') !== FALSE) {
            $category_linked_separator = preg_match("/(.*)%categories-linked\\('(.*?)'\\)(.*)/i", $postinfo_string, $category_linked_matches);
            ob_start();
            $categories = get_the_category();
            $items_in_categories = count($categories);
            $output = '';
            $categories_count = $items_in_categories;
            if ($categories) {
                foreach ($categories as $category) {
                    $categories_count -= 1;
                    if ($categories_count) {
                        $seperator = $category_linked_matches[2];
                    } else {
                        $seperator = '';
                    }
                    $categories_linked .= '<a class="' . $category->slug . '" href="' . get_category_link($category->term_id) . '" title="' . esc_attr(sprintf(__("View all posts in %s"), $category->name)) . '">' . $category->cat_name . $seperator . '</a>';
                }
            }
            ob_end_clean();
            $postinfo = preg_replace("/(.*)%categories-linked\\((.*?)\\)%(.*)/i", "\${1}" . $categories_linked . "\${3}", $postinfo);
        }
    }
    // Categories, not linked
    if (strpos($postinfo_string, '%categories(') !== FALSE) {
        while (strpos($postinfo, '%categories(') !== FALSE) {
            $category_separator = preg_match("/(.*)%categories\\('(.*?)'\\)(.*)/i", $postinfo_string, $category_matches);
            $categories = "";
            foreach (get_the_category() as $category) {
                $categories .= $category->cat_name . $category_matches[2];
            }
            // remove last separator
            $categories = preg_replace("/" . $category_matches[2] . "\$/mi", "", $categories);
            $postinfo = preg_replace("/(.*)%categories\\((.*?)\\)%(.*)/i", "\${1}" . $categories . "\${3}", $postinfo);
        }
    }
    // Comment link
    if (strpos($postinfo_string, '%comments(') !== FALSE) {
        while (strpos($postinfo, '%comments(') !== FALSE) {
            $comment_options = preg_match("/(.*)%comments\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $comment_matches);
            if (!comments_open() and $comment_matches[8] == "dontshow") {
                $comment_link = '';
            } else {
                ob_start();
                comments_popup_link($comment_matches[2], $comment_matches[4], $comment_matches[6], 'comments-link', $comment_matches[8]);
                $comment_link = ob_get_contents();
                ob_end_clean();
            }
            if (!comments_open()) {
                if ($post->comment_count == 0) {
                    $comment_link = '<strong>' . $comment_matches[8] . '</strong>';
                } else {
                    $comment_link = $comment_link . ' - <strong>(' . $comment_matches[8] . ')</strong>';
                }
            }
            if (!comments_open() and $comment_matches[8] == "dontshow") {
                $comment_link = '';
            }
            $postinfo = preg_replace("/(.*)%comments\\((.*?)\\)%(.*)/i", "\${1}" . $comment_link . "\${3}", $postinfo);
        }
    }
    // Comments Feed link
    if (strpos($postinfo_string, '%comments-rss') !== FALSE) {
        while (strpos($postinfo, '%comments-rss') !== FALSE) {
            $comments_rss_link_text = preg_match("/(.*)%comments-rss\\('(.*?)'(.*)/i", $postinfo_string, $comments_rss_matches);
            ob_start();
            post_comments_feed_link($comments_rss_matches[2]);
            $comments_rss_link = ob_get_contents();
            ob_end_clean();
            // make link nofollow if set in theme options
            if ($bfa_ata['nofollow'] == "Yes") {
                $comments_rss_link = str_replace('href=', 'rel="nofollow" href=', $comments_rss_link);
            }
            $postinfo = preg_replace("/(.*)%comments-rss\\((.*?)\\)%(.*)/i", "\${1}" . $comments_rss_link . "\${3}", $postinfo);
        }
    }
    // Trackback URL
    if (strpos($postinfo_string, '%trackback%') !== FALSE) {
        $trackback_url = trackback_url(FALSE);
        $postinfo = str_replace("%trackback%", $trackback_url, $postinfo);
    }
    // Trackback Link
    if (strpos($postinfo_string, '%trackback-linked(') !== FALSE) {
        while (strpos($postinfo, '%trackback-linked(') !== FALSE) {
            $trackback_url = trackback_url(FALSE);
            $trackback_link_text = preg_match("/(.*)%trackback-linked\\('(.*?)'(.*)/i", $postinfo_string, $trackback_matches);
            $trackback_link = '<a href="' . $trackback_url . '">' . $trackback_matches[2] . '</a>';
            // make link nofollow if set in theme options
            if ($bfa_ata['nofollow'] == "Yes") {
                $trackback_link = str_replace('href=', 'rel="nofollow" href=', $trackback_link);
            }
            $postinfo = preg_replace("/(.*)%trackback-linked\\((.*?)\\)%(.*)/i", "\${1}" . $trackback_link . "\${3}", $postinfo);
        }
    }
    // Trackback RDF
    if (strpos($postinfo_string, '%trackback-rdf%') !== FALSE) {
        ob_start();
        trackback_rdf();
        $trackback_rdf = "<!-- " . ob_get_contents() . " -->";
        ob_end_clean();
        $postinfo = str_replace("%trackback-rdf%", $trackback_rdf, $postinfo);
    }
    // Permalink
    if (strpos($postinfo_string, '%permalink%') !== FALSE) {
        ob_start();
        the_permalink();
        $permalink = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%permalink%", $permalink, $postinfo);
    }
    // Post ID
    if (strpos($postinfo_string, '%post-id%') !== FALSE) {
        ob_start();
        the_ID();
        $post_id = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%post-id%", $post_id, $postinfo);
    }
    // Post Title
    if (strpos($postinfo_string, '%post-title%') !== FALSE) {
        ob_start();
        the_title();
        $post_title = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%post-title%", $post_title, $postinfo);
    }
    // Edit post
    if (strpos($postinfo_string, '%edit(') !== FALSE) {
        while (strpos($postinfo, '%edit(') !== FALSE) {
            $edit_options = preg_match("/(.*)%edit\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $edit_matches);
            ob_start();
            edit_post_link($edit_matches[4], $edit_matches[2], $edit_matches[6]);
            $edit_link = ob_get_contents();
            ob_end_clean();
            $postinfo = preg_replace("/(.*)%edit\\((.*?)\\)%(.*)/i", "\${1}" . $edit_link . "\${3}", $postinfo);
        }
    }
    // Print
    if (strpos($postinfo_string, '%print(') !== FALSE) {
        while (strpos($postinfo, '%print(') !== FALSE) {
            $print_text = preg_match("/(.*)%print\\('(.*?)'(.*)/i", $postinfo_string, $print_text_matches);
            $print_link = '<a href="javascript:window.print()">' . $print_text_matches[2] . '</a>';
            $postinfo = preg_replace("/(.*)%print\\((.*?)\\)%(.*)/i", "\${1}" . $print_link . "\${3}", $postinfo);
        }
    }
    // For the "WP-Email" plugin
    if (strpos($postinfo_string, '%wp-email%') !== FALSE) {
        $wp_email = function_exists('wp_email') ? email_link($email_post_text = '', $email_page_text = '', $echo = FALSE) : "";
        $postinfo = str_replace("%wp-email%", $wp_email, $postinfo);
    }
    // For the "WP-Print" plugin
    if (strpos($postinfo_string, '%wp-print%') !== FALSE) {
        $wp_print = function_exists('wp_print') ? print_link($print_post_text = '', $print_page_text = '', $echo = FALSE) : "";
        $postinfo = str_replace("%wp-print%", $wp_print, $postinfo);
    }
    // For the "WP-PostViews" plugin
    if (strpos($postinfo_string, '%wp-postviews%') !== FALSE) {
        $wp_postviews = function_exists('the_views') ? the_views($display = FALSE) : "";
        $postinfo = str_replace("%wp-postviews%", $wp_postviews, $postinfo);
    }
    // For the "WP-PostRatings" plugin
    if (strpos($postinfo_string, '%wp-postratings%') !== FALSE) {
        $wp_postratings = function_exists('the_ratings') ? the_ratings($start_tag = 'span', $custom_id = 0, $display = FALSE) : "";
        $postinfo = str_replace("%wp-postratings%", $wp_postratings, $postinfo);
    }
    // For the "Sociable" plugin
    if (strpos($postinfo_string, '%sociable%') !== FALSE) {
        ob_start();
        $sociable = (function_exists('sociable_html2') and function_exists(do_sociable())) ? do_sociable() : "";
        $sociable = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%sociable%", $sociable, $postinfo);
    }
    // For the "Share This" plugin
    if (strpos($postinfo_string, '%share-this%') !== FALSE) {
        ob_start();
        if (function_exists('sharethis_button')) {
            sharethis_button();
            $share_this = ob_get_contents();
        } else {
            $share_this = "";
        }
        ob_end_clean();
        $postinfo = str_replace("%share-this%", $share_this, $postinfo);
    }
    // Images
    if (strpos($postinfo_string, '<image(') !== FALSE) {
        $postinfo = preg_replace_callback("|<image\\((.*?)\\)>|", "bfa_image_files", $postinfo);
    }
    /* The meta = ALL custom fields:values, formatted by Wordpress as
    	unordered list <ul><li>..</li><li>..</li></ul> */
    if (strpos($postinfo_string, '%meta%') !== FALSE) {
        ob_start();
        the_meta();
        $the_meta = ob_get_contents();
        ob_end_clean();
        // 3.4.3.: remove bfa_ata metas */
        $the_meta = preg_replace("/<li>(.*)bfa_ata(.*)<\\/li>/i", "", $the_meta);
        $postinfo = str_replace("%meta%", $the_meta, $postinfo);
    }
    // Single post meta values, not formatted
    if (strpos($postinfo_string, '%meta(') !== FALSE) {
        $postinfo = preg_replace_callback("|%meta\\('(.*?)'\\)%|", "bfa_meta_value", $postinfo);
    }
    // Since 3.6.7, parse widget areas
    $postinfo = bfa_parse_widget_areas($postinfo);
    return $postinfo;
}
Ejemplo n.º 29
0
/**
 * Print RSS comment feed link.
 *
 * @since 1.0.1
 * @deprecated 2.5
 * @deprecated Use post_comments_feed_link()
 * @see post_comments_feed_link()
 *
 * @param string $link_text
 */
function comments_rss_link($link_text = 'Comments RSS')
{
    _deprecated_function(__FUNCTION__, '2.5', 'post_comments_feed_link()');
    post_comments_feed_link($link_text);
}
Ejemplo n.º 30
0
				<div class="caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt(); // this is the "caption" ?></div>

				<?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>

				<div class="navigation">
					<div class="alignleft"><?php previous_image_link() ?></div>
					<div class="alignright"><?php next_image_link() ?></div>
				</div>
				<br class="clear" />

				<p class="postmetadata alt">
					<small>
						This entry was posted on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
						and is filed under <?php the_category(', ') ?>.
						<?php the_taxonomies(); ?>
						You can follow any responses to this entry through the <?php post_comments_feed_link('RSS 2.0'); ?> feed.

						<?php if ( comments_open() && pings_open() ) {
							// Both Comments and Pings are open ?>
							You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(); ?>" rel="trackback">trackback</a> from your own site.

						<?php } elseif ( !comments_open() && pings_open() ) {
							// Only Pings are Open ?>
							Responses are currently closed, but you can <a href="<?php trackback_url(); ?> " rel="trackback">trackback</a> from your own site.

						<?php } elseif ( comments_open() && !pings_open() ) {
							// Comments are open, Pings are not ?>
							You can skip to the end and leave a response. Pinging is currently not allowed.

						<?php } elseif ( !comments_open() && !pings_open() ) {
							// Neither Comments, nor Pings are open ?>