本文整理汇总了PHP中previous_comments_link函数的典型用法代码示例。如果您正苦于以下问题:PHP previous_comments_link函数的具体用法?PHP previous_comments_link怎么用?PHP previous_comments_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了previous_comments_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_comment_nav
function get_comment_nav()
{
?>
<?php
if (get_comment_pages_count() > 1) {
?>
<div class="comments-nav">
<div class="prev">
<?php
previous_comments_link(__('Prev Comments', 'rb'));
?>
</div>
<div class="next">
<?php
next_comments_link(__('Next Comments', 'rb'));
?>
</div>
</div>
<?php
}
?>
<?php
}
示例2: tamatebako_comments_nav
/**
* Comments Nav
* @since 0.1.0
*/
function tamatebako_comments_nav()
{
if (get_option('page_comments') && 1 < get_comment_pages_count()) {
// Check for paged comments.
?>
<div class="comments-nav">
<?php
previous_comments_link('<span class="prev-comments"><span class="screen-reader-text">' . tamatebako_string('previous_comment') . '</span></span>');
?>
<span class="page-numbers"><?php
printf('%1$s / %2$s', get_query_var('cpage') ? absint(get_query_var('cpage')) : 1, get_comment_pages_count());
?>
</span>
<?php
next_comments_link('<span class="next-comments"><span class="screen-reader-text">' . tamatebako_string('next_comment') . '</span></span>');
?>
</div><!-- .comments-nav -->
<?php
}
// End check for paged comments.
}
示例3: thb_comments_navigation
function thb_comments_navigation()
{
global $post;
if (get_comment_pages_count() > 1 && get_option('page_comments')) {
previous_comments_link(__('Older comments', 'thb_text_domain'));
next_comments_link(__('Newer comments', 'thb_text_domain'));
}
}
示例4: genesis_do_comments
/**
* Echo Genesis default comment structure.
*
* @since 1.1.2
*
* @uses genesis_get_option()
*
* @global stdClass $post Post object
* @global WP_Query $wp_query
* @return null Returns early if on a page with Genesis pages comments off, or a post and Genesis posts comments off.
*/
function genesis_do_comments()
{
global $post, $wp_query;
/** Bail if comments are off for this post type */
if (is_page() && !genesis_get_option('comments_pages') || is_single() && !genesis_get_option('comments_posts')) {
return;
}
if (have_comments() && !empty($wp_query->comments_by_type['comment'])) {
?>
<div id="comments">
<?php
echo apply_filters('genesis_title_comments', __('<h3>Comments</h3>', 'genesis'));
?>
<ol class="comment-list">
<?php
do_action('genesis_list_comments');
?>
</ol>
<div class="navigation">
<div class="alignleft"><?php
previous_comments_link();
?>
</div>
<div class="alignright"><?php
next_comments_link();
?>
</div>
</div>
</div><!--end #comments-->
<?php
} else {
?>
<div id="comments">
<?php
/** Comments are open, but there are no comments */
if ('open' == $post->comment_status) {
echo apply_filters('genesis_no_comments_text', '');
} else {
/** Comments are closed */
echo apply_filters('genesis_comments_closed_text', '');
}
?>
</div><!--end #comments-->
<?php
}
}
示例5: calibrefx_do_comments
/**
* Output comment structure.
*
* @uses calibrefx_get_option()
*
*/
function calibrefx_do_comments()
{
global $post, $wp_query;
/** Bail if comments are off for this post type */
if (is_page() && !calibrefx_get_option('comments_pages') || is_single() && !calibrefx_get_option('comments_posts')) {
return;
}
if (have_comments() && !empty($wp_query->comments_by_type['comment'])) {
?>
<div id="comments">
<?php
echo apply_filters('calibrefx_title_comments', __('<h3>Comments</h3>', 'calibrefx'));
?>
<ol class="comment-list">
<?php
do_action('calibrefx_list_comments');
?>
</ol>
<div class="comment-navigation">
<ul class="pager">
<li class="previous"><?php
previous_comments_link();
?>
</li>
<li class="next"><?php
next_comments_link();
?>
</li>
</ul>
</div>
</div><!--end #comments-->
<?php
} else {
echo '<div id="comments" class="no-comments">';
if ('open' == $post->comment_status) {
echo apply_filters('calibrefx_no_comments_text', '');
} else {
echo apply_filters('calibrefx_comments_closed_text', '');
}
echo '</div><!--end #comments-->';
}
}
示例6: scaffolder_comment_nav
/**
* Comments nav
*/
function scaffolder_comment_nav()
{
if (get_comment_pages_count() > 1 && get_option('page_comments')) {
?>
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php
_e('Comment navigation', 'scaffold');
?>
</h1>
<div class="nav-previous"><?php
previous_comments_link(__('← Older Comments', 'scaffold'));
?>
</div>
<div class="nav-next"><?php
next_comments_link(__('Newer Comments →', 'scaffold'));
?>
</div>
</nav>
<?php
}
}
示例7: the_bootstrap_comment_nav
/**
* Display navigation to next/previous comments pages when applicable
*
* @author Konstantin Obenland
* @since 1.5.0 - 19.05.2012
*
* @return void
*/
function the_bootstrap_comment_nav()
{
if (get_comment_pages_count() > 1 and get_option('page_comments')) {
// are there comments to navigate through
?>
<nav class="comment-nav well">
<h1 class="assistive-text"><?php
_e('Comment navigation', 'the-bootstrap');
?>
</h1>
<div class="nav-previous alignleft"><?php
next_comments_link(__('← Newer Comments', 'the-bootstrap'));
?>
</div>
<div class="nav-next alignright"><?php
previous_comments_link(__('Older Comments →', 'the-bootstrap'));
?>
</div>
</nav>
<?php
}
// check for comment navigation
}
示例8: _e
<?php
// DISPLAY COMMENTS IF COMMENTS ARE OPENED
if (comments_open()) {
echo '<div class="comments">', '<h2>';
_e('Comentários', 'wikiwp');
// alterado
echo '</h2>';
if (have_comments()) {
// this is displayed if there are comments
echo '<h3>';
_e('Este post tem', 'wikiwp');
echo ' ';
comments_number(__('0 comentários', 'wikiwp'), __('um comentário', 'wikiwp'), __('% comentários', 'wikiwp'));
echo '</h3>', '<ul class="commentlist">';
wp_list_comments();
echo '</ul>', '<div class="comment-nav">', '<div class="alignleft">';
previous_comments_link();
echo '</div>', '<div class="alignright">';
next_comments_link();
echo '</div>', '</div>';
} else {
// this is displayed if there are no comments so far
_e('Nenhum comentário!', 'wikiwp');
}
// load comment form
comment_form();
echo '</div>';
// end of .content
}
示例9: wp_list_comments
<?php
wp_list_comments(array('avatar_size' => '60', 'type' => 'comment'));
?>
</ol><!-- .comment-list -->
<?php
if (get_comment_pages_count() > 1 && get_option('page_comments')) {
// are there comments to navigate through
?>
<nav id="comment-nav-below" class="comment-navigation navigation" role="navigation">
<h1 class="screen-reader-text"><?php
_e('Comment navigation', 'responsive-mobile');
?>
</h1>
<div class="nav-previous previous"><?php
previous_comments_link(__('← Older Comments', 'responsive-mobile'));
?>
</div>
<div class="nav-next next"><?php
next_comments_link(__('Newer Comments →', 'responsive-mobile'));
?>
</div>
</nav><!-- #comment-nav-below -->
<?php
}
// check for comment navigation
?>
<?php
}
// have_comments()
示例10: wp_list_comments
*/
wp_list_comments(array('callback' => '_abelard_comment'));
?>
</ol>
<?php
if (get_comment_pages_count() > 1 && get_option('page_comments')) {
// are there comments to navigate through
?>
<nav role="navigation" id="comment-nav-below" class="site-navigation comment-navigation">
<h1 class="assistive-text"><?php
_e('Comment navigation', 'abelard');
?>
</h1>
<div class="nav-previous"><?php
previous_comments_link(__('← Older Comments', 'abelard'));
?>
</div>
<div class="nav-next"><?php
next_comments_link(__('Newer Comments →', 'abelard'));
?>
</div>
</nav>
<?php
}
// check for comment navigation
?>
<?php
}
// have_comments()
示例11: esc_html_e
?>
</ol><!-- .comment-list -->
<?php
if (get_comment_pages_count() > 1 && get_option('page_comments')) {
// Are there comments to navigate through?
?>
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php
esc_html_e('Comment navigation', 'bizwebsky');
?>
</h2>
<div class="nav-links">
<div class="nav-previous"><?php
previous_comments_link(esc_html__('Older Comments', 'bizwebsky'));
?>
</div>
<div class="nav-next"><?php
next_comments_link(esc_html__('Newer Comments', 'bizwebsky'));
?>
</div>
</div><!-- .nav-links -->
</nav><!-- #comment-nav-below -->
<?php
}
// Check for comment navigation.
?>
<?php
示例12: wp_list_comments
<ul class="comment-list">
<?php
wp_list_comments(array('callback' => 'tt_list_comments'));
?>
</ul>
<?php
if (get_comment_pages_count() > 1 && get_option('page_comments')) {
?>
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
<h1 class="sr-only"><?php
_e('Comment navigation', 'tt');
?>
</h1>
<div class="nav-previous"><?php
previous_comments_link(__('« Older Comments', 'tt'));
?>
</div>
<div class="nav-next"><?php
next_comments_link(__('Newer Comments »', 'tt'));
?>
</div>
<div class="clearfix"></div>
</nav>
<?php
}
// Check for comment navigation.
?>
<?php
if (!comments_open()) {
示例13: wp_list_comments
<?php
wp_list_comments(array('style' => 'ol', 'short_ping' => true));
?>
</ol><!-- .comment-list -->
<?php
if (get_comment_pages_count() > 1 && get_option('page_comments')) {
// are there comments to navigate through
?>
<nav id="comment-nav-below" class="comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php
_e('Comment navigation', 'avenue');
?>
</h1>
<div class="nav-previous"><?php
previous_comments_link(__('← Older Comments', 'avenue'));
?>
</div>
<div class="nav-next"><?php
next_comments_link(__('Newer Comments →', 'avenue'));
?>
</div>
</nav><!-- #comment-nav-below -->
<?php
}
// check for comment navigation
?>
<?php
}
// have_comments()
示例14: wp_list_comments
<?php
if (have_comments()) {
?>
<?php
wp_list_comments(array('style' => 'ul'));
?>
<?php
if (get_comment_pages_count() > 1 && get_option('page_comments')) {
// Are there comments to navigate through?
?>
<?php
previous_comments_link(__('Older Comments', 'skeleton'));
?>
<?php
next_comments_link(__('Newer Comments', 'skeleton'));
?>
<?php
}
// Check for comment navigation
?>
<?php
}
// Check for have_comments()
?>
示例15: wp_list_comments
<?php
wp_list_comments(array('callback' => 'buddyboss_comment', 'style' => 'ol'));
?>
</ol><!-- .commentlist -->
<?php
if (get_comment_pages_count() > 1 && get_option('page_comments')) {
// are there comments to navigate through
?>
<nav id="comment-nav-below" class="navigation" role="navigation">
<h1 class="assistive-text section-heading"><?php
_e('Comment navigation', 'boss');
?>
</h1>
<div class="nav-previous"><?php
previous_comments_link(__('← Older Comments', 'boss'));
?>
</div>
<div class="nav-next"><?php
next_comments_link(__('Newer Comments →', 'boss'));
?>
</div>
</nav>
<?php
}
// check for comment navigation
?>
<?php
/* If there are no comments and comments are closed, let's leave a note.
* But we only want the note on posts and pages that had comments in the first place.