当前位置: 首页>>代码示例>>PHP>>正文


PHP paginate_comments_links函数代码示例

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


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


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