• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP paginate_comments_links函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中paginate_comments_links函数的典型用法代码示例。如果您正苦于以下问题:PHP paginate_comments_links函数的具体用法?PHP paginate_comments_links怎么用?PHP paginate_comments_links使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了paginate_comments_links函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: narga_comment_pagination

 function narga_comment_pagination()
 {
     //read the page links but do not echo
     $comment_page = paginate_comments_links(array('prev_text' => __('« Previous', 'narga'), 'next_text' => __('Next »', 'narga'), 'echo' => false, 'type' => 'list'));
     $search = array('ul class=\'page-numbers', '<li><a class="next page-numbers"');
     $replace = array('ul class=\'pagination', '<li class="arrow"><a');
     echo '<nav id="comments-nav">' . str_replace($search, $replace, $comment_page) . '</nav>';
 }
开发者ID:jun200,项目名称:wordpress,代码行数:8,代码来源:content-navigation.php


示例2: hw_paginate_comments_links

/**
 * Wrapper for comments pagination.
 *
 * @see paginate_comments_links()
 *
 * @param array $args
 *
 * @return string
 */
function hw_paginate_comments_links($args = array())
{
    $defaults = array('echo' => true, 'type' => 'list');
    $args = wp_parse_args($args, $defaults);
    $args = apply_filters('hw_paginate_comments_links_args', $args);
    $output = paginate_comments_links(array_merge($args, array('echo' => false)));
    $output = '<div class="pagination pagination-centered">' . $output . '</div>';
    $output = apply_filters('hw_paginate_comments_links', $output);
    if (!empty($args['echo'])) {
        echo $output;
    }
    return $output;
}
开发者ID:rarst,项目名称:hybrid-wing,代码行数:22,代码来源:template-tags.php


示例3: miss_comment_list

    /**
     *
     */
    function miss_comment_list()
    {
        //echo apply_filters( 'miss_comments_title', '<h3 id="comments-title">' . sprintf( _n( '1 Comment', '%1$s Comments', get_comments_number(), MISS_TEXTDOMAIN ), number_format_i18n( get_comments_number() ), get_the_title() ) . '</h3>', array( 'comments_number' => get_comments_number(), 'title' =>  get_the_title() ) );
        ?>
<div class="comments">
		<?php 
        wp_list_comments(array('type' => 'all', 'walker' => new zipGun_walker_comment()));
        ?>
	</div>

	<?php 
        if (get_option('page_comments')) {
            ?>
		<div class="comment-navigation paged-navigation">
			<?php 
            paginate_comments_links(miss_portfolio_comment_url($nav = true));
            ?>
		</div><!-- .comment-navigation -->
	<?php 
        }
        ?>

<?php 
    }
开发者ID:schiz,项目名称:scrollax,代码行数:27,代码来源:function.php


示例4: sprintf

        ?>
		<h5 class="pb-header" id="comments-number">
			<span class="pb-header-content"><?php 
        echo sprintf(__('All comments (%s)', THEME_DOMAIN), $count);
        ?>
</span>
		</h5>

		<div id="comments_list" class="theme-clear-fix">

			<ul class="theme-reset-list theme-clear-fix">
<?php 
        $Comment = new ThemeComment();
        $Validation = new ThemeValidation();
        wp_list_comments(array('avatar_size' => 70, 'page' => $Comment->page, 'per_page' => $Comment->comments_per_page, 'callback' => array($Comment, 'createComment')));
        $pagination = paginate_comments_links(array('base' => '#cpage-%#%', 'format' => '', 'add_fragment' => '', 'current' => $Comment->page, 'next_text' => __('Next', THEME_DOMAIN), 'prev_text' => __('Previous', THEME_DOMAIN), 'echo' => false));
        ?>
			</ul>
<?php 
        if ($Validation->isNotEmpty($pagination)) {
            ?>
			<div class="theme-comment-pagination-box"> 
				<div class="theme-comment-pagination theme-clear-fix"><?php 
            echo $pagination;
            ?>
</div>
			</div>
<?php 
        }
        ?>
		</div>
开发者ID:phanhoanglong2610,项目名称:anc_gvn,代码行数:31,代码来源:comments.php


示例5: evolve_comment_navigation

/**
 * evolve_comment_navigation() paged comments
 *
 * @since 0.3
 * @needsdoc
 * @todo add html comments?
 */
function evolve_comment_navigation()
{
    $num = get_comments_number() + 1;
    $tag = apply_filters('evolve_comment_navigation_tag', (string) 'div');
    // Available filter: evolve_comment_navigation_tag
    $open = "<!--BEGIN .navigation-links-->\n";
    $open .= "<" . $tag . " class=\"navigation-links comment-navigation\">\n";
    $close = "<!--END .navigation-links-->\n";
    $close .= "</" . $tag . ">\n";
    if ($num > get_option('comments_per_page')) {
        $paged_links = paginate_comments_links(array('type' => 'array', 'echo' => false, 'prev_text' => '&laquo; Previous Page', 'next_text' => 'Next Page &raquo;'));
        if ($paged_links) {
            $comment_navigation = $open . join(' ', $paged_links) . $close;
        }
    } else {
        $comment_navigation = NULL;
    }
    echo apply_filters('evolve_comment_navigation', (string) $comment_navigation);
    // Available filter: evolve_comment_navigation
}
开发者ID:thejasonhsu,项目名称:Illumin,代码行数:27,代码来源:comments.php


示例6: get_comments

 */
if (post_password_required()) {
    return;
}
?>
<ul class="reviws-list">

    <?php 
/*    //temporary
    $fx_comments = get_comments(array(
        'post__not_in' => 33,
        'orderby' => 'comment_date_gmt',
        'order' => 'ASC',
        //'author__not_in' => '1',
        'status' => 'approve' //Change this to the type of comments to be displayed
    ));
    wp_list_comments(array(
        //'per_page' => 2,
        'callback' => 'fx_display_review',
    ) , $fx_comments);
*/
//original
wp_list_comments(array('callback' => 'fx_display_review'));
?>
</ul>
<div class="pagination">
    <?php 
paginate_comments_links(array('prev_text' => '<i class="i-toback"></i>', 'next_text' => '<i class="i-tonext"></i>'));
?>
</div>
开发者ID:lait1,项目名称:kz-old,代码行数:30,代码来源:comment-reviews-common.php


示例7: paginate_comments_links

<?php 
    /* Stop the rest of comments.php from being processed,
     * but don't kill the script entirely -- we still have
     * to fully load the template.
     */
    return;
}
?>

<?php 
// You can start editing here -- including this comment!
?>

<?php 
if (have_comments()) {
    $pgn = paginate_comments_links(array('prev_text' => '&laquo; ' . __('Previous', 'cosmotheme'), 'next_text' => __('Next ', 'cosmotheme') . ' &raquo;', 'format' => 'array', 'echo' => false));
    ?>

			<h3 class="h3title" id="comments-title"><span><?php 
    echo get_comments_number();
    ?>
 COMMENT<?php 
    if (get_comments_number() != 1) {
        echo 'S';
    }
    ?>
</span></h3>

<?php 
    if (strlen($pgn) > 0) {
        echo '<ul class="b_pag center p_b">';
开发者ID:JerryXie96,项目名称:PBSMUNC2013WebSite,代码行数:31,代码来源:comments.php


示例8: paginate_comments_links

    ?>
</h3>
		<div class="pagination">
			<?php 
    paginate_comments_links('prev_text=Prev&next_text=Next');
    ?>
 
		</div>
		<ol class="comment-list clearfix">
			<?php 
    wp_list_comments('type=all&callback=mytheme_comment');
    ?>
		</ol>
		<div class="pagination">
			<?php 
    paginate_comments_links('prev_text=Prev&next_text=Next');
    ?>
 
		</div>
	</div>
	<?php 
} else {
    // this is displayed if there are no comments so far
    ?>

	<?php 
    if (comments_open()) {
        ?>
			<!-- If comments are open, but there are no comments. -->
		<?php 
        echo '<p class="nocomments">' . theme_locals("no_comments_yet") . '</p>';
开发者ID:hcone5006,项目名称:kfm,代码行数:31,代码来源:comments.php


示例9: printf

    } else {
        $current_page = $cpage;
    }
    if ($max_page > 1) {
        ?>
	<div class="navigation fix">
		<div class="suf-page-nav fix">
<?php 
        if ($suf_cpagination_index == "show") {
            ?>
			<span class="page-index"><?php 
            printf(__('Page %1$s of %2$s', 'suffusion'), $current_page, $max_page);
            ?>
</span>
<?php 
        }
        $comment_order = get_option('comment_order');
        if ($comment_order == 'asc') {
            $next_text = $newer . " &raquo;";
            $prev_text = "&laquo; " . $older;
        } else {
            $prev_text = "&laquo; " . $newer;
            $next_text = $older . " &raquo;";
        }
        echo paginate_comments_links(array("base" => add_query_arg("cpage", "%#%"), "format" => '', "type" => "plain", "total" => $max_page, "current" => $current_page, "show_all" => $show_all, "end_size" => 2, "mid_size" => 2, "prev_next" => $prev_next, "next_text" => $next_text, "prev_text" => $prev_text));
        ?>
		</div><!-- suf page nav -->
	</div><!-- page nav -->
<?php 
    }
}
开发者ID:kevinaxu,项目名称:99boulders,代码行数:31,代码来源:pagination-comments.php


示例10: comments_number

    return;
}
if (have_comments()) {
    ?>
  <h3 id="comments"><?php 
    comments_number(__('<span>No</span> Responses', 'counterpoint'), __('<span>One</span> Response', 'counterpoint'), _n('<span>%</span> Response', '<span>%</span> Responses', get_comments_number(), 'counterpoint'));
    ?>
 to &#8220;<?php 
    the_title();
    ?>
&#8221;</h3>
  <nav class="pagination cf"><?php 
    paginate_comments_links(array('prev_text' => '&larr; Previous', 'next_text' => 'Next &rarr;'));
    ?>
</nav>
  <ol class="commentlist">
    <?php 
    wp_list_comments(array('type' => 'all', 'callback' => 'counterpoint_comments'));
    ?>
  </ol>
  <nav class="pagination cf"><?php 
    paginate_comments_links(array('prev_text' => '&larr; Previous', 'next_text' => 'Next &rarr;'));
    ?>
</nav>
<?php 
}
$commenter = wp_get_current_commenter();
$req = get_option('require_name_email');
$aria_req = $req ? " aria-required='true'" : '';
$fields = array('author' => '<p class="comment-form-author"><label for="author">' . __('Name <span class="required">*</span>', 'counterpoint') . '</label>' . '<input type="text" id="author" name="author" type="text" placeholder="Your Name*" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' /></p>', 'email' => '<p class="comment-form-email"><label for="email">' . __('Email <span class="required">*</span>', 'counterpoint') . '</label>' . '<input type="email" id="email" name="email" type="text" placeholder="Your Email*" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' /></p>', 'url' => '<p class="comment-form-url"><label for="url">' . __('Website', 'counterpoint') . '</label>' . '<input type="url" id="url" name="url" type="text" placeholder="Your Website (optional)" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" /></p>');
comment_form(array('fields' => $fields, 'logged_in_as' => '<div class="logged-in-as">' . sprintf(__('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>'), admin_url('profile.php'), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink()))) . '</div>', 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x('Comment <span class="required">*</span>', 'noun', 'counterpoint') . '</label><textarea id="comment" placeholder="Enter Your Comment Here*" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>', 'label_submit' => __('Post Comment &rarr;', 'counterpoint')), $post->ID);
开发者ID:astarts,项目名称:htdocs,代码行数:31,代码来源:comments.php


示例11: aviators_templates_helpers_previous_comments_link

function aviators_templates_helpers_previous_comments_link($attrs = NULL)
{
    paginate_comments_links();
}
开发者ID:dongchpp,项目名称:BIPHP,代码行数:4,代码来源:helpers.php


示例12: wp_list_comments

	</div>
	<div id="comments" class="comments-wrap">
		<?php 
if (have_comments()) {
    ?>
			<ul>
				<?php 
    wp_list_comments(apply_filters('woocommerce_product_review_list_args', array('callback' => 'woocommerce_comments')));
    ?>
			</ul>
			<?php 
    if (get_comment_pages_count() > 1 && get_option('page_comments')) {
        ?>
			<nav class="pagination">
				<?php 
        paginate_comments_links(apply_filters('woocommerce_comment_pagination_args', array('prev_text' => '', 'next_text' => '', 'type' => 'plain')));
        ?>
			</nav>
			<?php 
    }
    ?>
		<?php 
} else {
    ?>
		<p class="woocommerce-noreviews secondary"><?php 
    _e('There are no reviews yet.', 'woocommerce');
    ?>
</p>
		<?php 
}
?>
开发者ID:qhuit,项目名称:UrbanPekor,代码行数:31,代码来源:single-product-reviews.php


示例13: shiword_navigate_comments

function shiword_navigate_comments()
{
    if (get_comment_pages_count() > 1 && get_option('page_comments')) {
        ?>
	<div class="navigate_comments">
		<?php 
        paginate_comments_links();
        ?>
	</div>
<?php 
    }
}
开发者ID:TwoBeers,项目名称:shiword,代码行数:12,代码来源:functions.php


示例14: ajax_comment_page_nav

function ajax_comment_page_nav()
{
    global $post, $wp_query, $wp_rewrite;
    $postid = $_POST["um_post"];
    $pageid = $_POST["um_page"];
    $comments = get_comments('post_id=' . $postid);
    $post = get_post($postid);
    if ('desc' != get_option('comment_order')) {
        $comments = array_reverse($comments);
    }
    $wp_query->is_singular = true;
    $baseLink = '';
    if ($wp_rewrite->using_permalinks()) {
        $baseLink = '&base=' . user_trailingslashit(get_permalink($postid) . 'comment-page-%#%', 'commentpaged');
    }
    echo '<ul class="commentlist">';
    wp_list_comments('callback=specs_comment&max_depth=10000&type=comment&avatar_size=50&page=' . $pageid . '&per_page=' . get_option('comments_per_page'), $comments);
    //注意修改mycomment这个callback
    echo '</ul>';
    echo '<p class="commentnav text-center" data-post-id="' . $postid . '">';
    paginate_comments_links('current=' . $pageid . '&prev_text=«&next_text=»');
    echo '</p>';
    die;
}
开发者ID:qq361168780,项目名称:9IPHP,代码行数:24,代码来源:functions.php


示例15: printf

				<div id="comments-list" class="comments">
					<h3><?php printf($comment_count > 1 ? __('<span>%d</span> Comments', 'uthili') : __('<span>One</span> Comment', 'uthili'), $comment_count) ?></h3>
					
<?php $total_pages = get_comment_pages_count(); if ( $total_pages > 1 ) : ?>					
					<div id="comments-nav-above" class="comments-navigation">
								<div class="paginated-comments-links"><?php paginate_comments_links(); ?></div>
					</div><!-- #comments-nav-above -->					
<?php endif; ?>					
				
					<ol>
<?php wp_list_comments('type=comment&callback=custom_comments'); ?>
					</ol>

<?php $total_pages = get_comment_pages_count(); if ( $total_pages > 1 ) : ?>					
	  			<div id="comments-nav-below" class="comments-navigation">
						<div class="paginated-comments-links"><?php paginate_comments_links(); ?></div>
	        </div><!-- #comments-nav-below -->
<?php endif; ?>					
					
				</div><!-- #comments-list .comments -->

<?php endif; /* if ( $comment_count ) */ ?>

<?php if ( ! empty($comments_by_type['pings']) ) : ?>

				<div id="trackbacks-list" class="comments">
					<h3><?php printf($ping_count > 1 ? __('<span>%d</span> Trackbacks', 'uthili') : __('<span>One</span> Trackback', 'uthili'), $ping_count) ?></h3>
					
					<ol>
<?php wp_list_comments('type=pings&callback=custom_pings'); ?>
					</ol>				
开发者ID:noorul,项目名称:uthili,代码行数:31,代码来源:comments.php


示例16: wp_list_comments

						</div>
					</div>

				<?php 
    }
    wp_list_comments(array('style' => 'ol', 'short_ping' => true, 'avatar_size' => 54, 'max_depth' => '5', 'callback' => 'maskitto_light_comment'));
    ?>
			</ol><!-- .comment-list -->


			<?php 
    if (get_comment_pages_count() > 1 && get_option('page_comments')) {
        // are there comments to navigate through
        ?>
				<div class="comment-navigation grey-light"><?php 
        paginate_comments_links();
        ?>
</div>
			<?php 
    }
    // check for comment navigation
    ?>

		<?php 
    if (!isset($maskitto_light['blog-layout']) || $maskitto_light['blog-layout'] == 1) {
        ?>
			</div>
		<?php 
    }
    ?>
开发者ID:rinodung,项目名称:wordpress-demo,代码行数:30,代码来源:comments.php


示例17: wp_list_comments

		</div>

		
	</form>
	<?php 
}
?>
</div>
<?php 
if (have_comments()) {
    ?>
<div id="postcomments">
	<div id="comments">
		<i class="fa fa-comments-o"></i> <b><?php 
    echo ' (' . $count_t . ')';
    ?>
</b>个小伙伴在吐槽
	</div>
	<ol class="commentlist">
		<?php 
    wp_list_comments('type=comment&callback=deel_comment_list');
    ?>
	</ol>
	<div class="commentnav"	>
		<?php 
    paginate_comments_links('prev_text=«&next_text=»');
    ?>
	</div>
</div>
<?php 
}
开发者ID:dfc643,项目名称:ARCHIVE-2014-wordpress-theme-backup,代码行数:31,代码来源:comments.php


示例18: graphene_comments_nav

    /**
     * Display comments pagination
     *
     * @package Graphene
     * @since 1.9
     */
    function graphene_comments_nav()
    {
        global $graphene_settings, $is_paginated;
        if (get_comment_pages_count() > 1 && $is_paginated) {
            ?>
        <div class="comment-nav clearfix">
            <?php 
            if (function_exists('wp_commentnavi') && !$graphene_settings['inf_scroll_comments']) {
                wp_commentnavi();
                ?>
                <p class="commentnavi-view-all"><?php 
                wp_commentnavi_all_comments_link();
                ?>
</p>
            <?php 
            } else {
                ?>
 
                <p><?php 
                paginate_comments_links();
                ?>
</p>
            <?php 
            }
            do_action('graphene_comments_pagination');
            ?>
        </div>
        
        <?php 
            if ($graphene_settings['inf_scroll_comments']) {
                ?>
			<p class="fetch-more-wrapper"><a href="#" class="fetch-more"><?php 
                _e('Fetch more comments', 'graphene');
                ?>
</a></p>
		<?php 
            }
        }
    }
开发者ID:nanookYs,项目名称:orientreizen,代码行数:45,代码来源:theme-comments.php


示例19: comments_number

		<div id="comments">
			
			<h3 id="comments-number" class="comments-header"><?php comments_number( sprintf( __( 'No responses to %1$s', hybrid_get_parent_textdomain() ), the_title( '&#8220;', '&#8221;', false ) ), sprintf( __( 'One response to %1$s', hybrid_get_parent_textdomain() ), the_title( '&#8220;', '&#8221;', false ) ), sprintf( __( '%1$s responses to %2$s', hybrid_get_parent_textdomain() ), '%', the_title( '&#8220;', '&#8221;', false ) ) ); ?></h3>

			<?php do_atomic( 'before_comment_list' ); // Before comment list hook ?>
			
			<ul class="comment-list">
				<?php wp_list_comments( hybrid_list_comments_args() ); ?>
			</ul><!-- .comment-list -->

			<?php do_atomic( 'after_comment_list' ); // After comment list hook ?>

			<?php if ( get_option( 'page_comments' ) ) : ?>
				<div class="comment-navigation comment-pagination paged-navigation">
					<?php paginate_comments_links(); ?>
				</div><!-- .comment-navigation -->
			<?php endif; ?>

		</div><!-- #comments -->

	<?php else : ?>

		<?php if ( pings_open() && !comments_open() ) : ?>

			<p class="comments-closed pings-open">
				<?php printf( __( 'Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', hybrid_get_parent_textdomain() ), trackback_url( '0' ) ); ?>
			</p><!-- .comments-closed .pings-open -->

		<?php endif; ?>
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:29,代码来源:comments.php


示例20: wp_list_comments

  <div class="section clear-block" id="section-comments">

    <?php 
    if ($numComments > 0) {
        ?>
     <div id="comments-wrap">
      <div class="clear-block">
       <ul id="comments" class="comments">
        <?php 
        wp_list_comments('type=comment&callback=mystique_list_comments', $comments);
        ?>
       </ul>
      </div>
     <?php 
        if (get_option('page_comments')) {
            $comment_pages = paginate_comments_links('echo=0');
            if ($comment_pages) {
                ?>
       <div class="comment-navigation clear-block">
    	 <?php 
                echo $comment_pages;
                ?>
       </div>
       <?php 
            }
        }
        ?>
     </div>

     <?php 
    } else {
开发者ID:howardlei82,项目名称:IGSM-Website,代码行数:31,代码来源:comments.php



注:本文中的paginate_comments_links函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP paginate_links函数代码示例发布时间:2022-05-15
下一篇:
PHP paginate函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap