Example #1
0
 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>';
 }
Example #2
0
/**
 * 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;
}
Example #3
0
    /**
     *
     */
    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 
    }
Example #4
0
        ?>
		<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>
Example #5
0
/**
 * 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
}
Example #6
0
 */
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>
<?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">';
Example #8
0
    ?>
</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>';
    } 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 
    }
}
Example #10
0
    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);
Example #11
0
function aviators_templates_helpers_previous_comments_link($attrs = NULL)
{
    paginate_comments_links();
}
	</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 
}
?>
Example #13
0
function shiword_navigate_comments()
{
    if (get_comment_pages_count() > 1 && get_option('page_comments')) {
        ?>
	<div class="navigate_comments">
		<?php 
        paginate_comments_links();
        ?>
	</div>
<?php 
    }
}
Example #14
0
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;
}
Example #15
0
				<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>				
Example #16
0
						</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 
    }
    ?>
		</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 
}
Example #18
0
    /**
     * 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 
            }
        }
    }
Example #19
0
		<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; ?>
Example #20
0
  <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 {
Example #21
0
    <ol class="commentlist">
        <?php 
    wp_list_comments(array('callback' => 'narga_comments', 'style' => 'ol'));
    ?>
    </ol>

    <footer>
        <?php 
    if (function_exists('narga_comment_pagination')) {
        narga_comment_pagination();
    } else {
        ?>
        <nav id="comments-nav">
            <?php 
        paginate_comments_links(array('prev_text' => '&laquo;', 'next_text' => '&raquo;'));
        ?>
 
        </nav>
        <?php 
    }
    ?>
    </footer>
</section>
<?php 
} else {
    // this is displayed if there are no comments so far
    if (comments_open()) {
    } else {
        // comments are closed
        ?>
Example #22
0
/**
 * Returns a paginated navigation to next/previous set of comments,
 * when applicable.
 *
 * @since 4.4.0
 *
 * @see paginate_comments_links()
 *
 * @param array $args {
 *     Optional. Default pagination arguments.
 *
 *     @type string $screen_reader_text Screen reader text for nav element. Default 'Comments navigation'.
 * }
 * @return string Markup for pagination links.
 */
function get_the_comments_pagination($args = array())
{
    $navigation = '';
    $args = wp_parse_args($args, array('screen_reader_text' => __('Comments navigation')));
    $args['echo'] = false;
    // Make sure we get plain links, so we get a string we can work with.
    $args['type'] = 'plain';
    $links = paginate_comments_links($args);
    if ($links) {
        $navigation = _navigation_markup($links, 'comments-pagination', $args['screen_reader_text']);
    }
    return $navigation;
}
Example #23
0
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 . '&status=approve');
    $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 '<ol class="comments-list">';
    wp_list_comments('type=comment&style=ol&callback=comment&page=' . $pageid . '&per_page=' . get_option('comments_per_page'), $comments);
    echo '</ol>';
    echo '<nav class="commentnav" data-postid="' . $postid . '">';
    paginate_comments_links('current=' . $pageid . '&prev_text=«&next_text=»');
    echo '</nav>';
    die;
}
</h3>
	</div><!-- end title -->
		<?php 
if (have_comments()) {
    ?>

			<ol class="commentlist">
				<?php 
    wp_list_comments(apply_filters('woocommerce_product_review_list_args', array('callback' => 'woocommerce_comments')));
    ?>
			</ol>

			<?php 
    if (get_comment_pages_count() > 1 && get_option('page_comments')) {
        echo '<nav class="woocommerce-pagination">';
        paginate_comments_links(apply_filters('woocommerce_comment_pagination_args', array('prev_text' => '&larr;', 'next_text' => '&rarr;', 'type' => 'list')));
        echo '</nav>';
    }
    ?>

		<?php 
} else {
    ?>

			<p class="woocommerce-noreviews"><?php 
    _e('There are no reviews yet.', 'woocommerce');
    ?>
</p>

		<?php 
}
Example #25
0
if (have_comments()) {
    ?>

		<ol class="commentlist">
			<?php 
    wp_list_comments('type=comment&callback=mytheme_comment');
    ?>

		</ol>
		<?php 
    if (get_comment_pages_count() > 1 && get_option('page_comments')) {
        ?>

			<div class="navigation">	
    	    	<?php 
        paginate_comments_links('prev_text=上一页&next_text=下一页');
        ?>

    		</div>
		<?php 
    }
    ?>

	<?php 
} elseif (!comments_open() && !is_page() && post_type_supports(get_post_type(), 'comments')) {
    ?>

		<p><?php 
    _e('Comments are closed.');
    ?>
</p>
Example #26
0
					<?php 
        }
        ?>
                   
					<ol>
						<?php 
        wp_list_comments('type=comment&callback=sf_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 comments-links-after clearfix"><?php 
            paginate_comments_links(array('type' => 'list', 'prev_text' => __('<i class="ss-navigateleft"></i> Previous', 'swiftframework'), 'next_text' => __('Next <i class="ss-navigateright"></i>', 'swiftframework')));
            ?>
</div>
						</div><!-- #comments-nav-below -->
					<?php 
        }
        ?>
                   
			<?php 
    }
    if (!empty($comments_by_type['pingback'])) {
        ?>
			
				<h3 class="spb-heading"><span><?php 
        _e("Pingbacks", "swiftframework");
        ?>
Example #27
0
        }
        ?>
						
					<?php 
        // action hook for inserting content below #comments-list
        seamless_belowcommentslist();
        ?>
					
					<?php 
    }
    ?>
					
					<div id="comments-nav-below" class="comment-navigation" role="navigation">
	        		
	        			<div class="paginated-comments-links"><?php 
    paginate_comments_links('total=' . $seamless_max_response_pages);
    ?>
</div>
	                
	                </div>	
	                	                  
					<?php 
    if (!empty($comments_by_type['pings'])) {
        ?>
	
					<?php 
        // action hook for inserting content above #trackbacks-list-wrapper
        seamless_abovetrackbackslist();
        ?>
						
						<?php 
 static function comments_paging()
 {
     ob_start();
     paginate_comments_links(array('type' => 'list', 'prev_text' => __('Previous Page', ST_TEXTDOMAIN), 'next_text' => __('Next Page', ST_TEXTDOMAIN)));
     $links = @ob_get_clean();
     if ($links) {
         $links = str_replace('page-numbers', 'pagination pull-right', balanceTags($links));
         $links = str_replace('<span', '<a', $links);
         $links = str_replace('</span>', '</a>', $links);
         ?>
         <?php 
         echo str_replace('page-numbers', 'pagination', balanceTags($links));
         //do not use esc_html() with  paginate_links() result
         ?>
     <?php 
     }
 }
// get total comments num
?>
</span><?php 
if (have_comments()) {
    // if comments exists
    ?>
  <ul class="comment-list"><?php 
    $args = array('walker' => new clean_comments_constructor());
    wp_list_comments($args);
    // display comments
    ?>
  </ul><?php 
    if (get_comment_pages_count() > 1 && get_option('page_comments')) {
        // if comments pages > 1 and comments pagination enabled
        $args = array('prev_text' => '«', 'next_text' => '»');
        paginate_comments_links($args);
        // show comments pagination
    }
    // if comments pages > 1 and comments pagination enabled - end
}
// if comments exists - end
if (comments_open()) {
    // if comments open
    /* COMMENT FORM STAFF */
    $fields = array('author' => '<label for="author">
Your name  <input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30" required></label>', 'email' => '<label for="email">	
Your email	<input id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30" required></label>', 'url' => '<label for="url">
Your site <input id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30"></label>');
    $args = array('fields' => apply_filters('comment_form_default_fields', $fields), 'comment_field' => '<label for="comment">Say something <textarea id="comment" name="comment" cols="45" rows="8"></textarea></label>', 'must_log_in' => '<p class="must-log-in">You must be login! ' . wp_login_url(apply_filters('the_permalink', get_permalink())) . '</p>', 'logged_in_as' => '<p class="logged-in-as">' . sprintf(__('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s">Выйти?</a>'), admin_url('profile.php'), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink()))) . '</p>', 'comment_notes_before' => '<p class="comment-notes">Your email address will not be published.</p>', 'comment_notes_after' => '<p class="form-allowed-tags">' . sprintf(__('You may use these <abbr>HTML</abbr> tags and attributes: %s'), '<code>' . allowed_tags() . '</code>') . '</p>', 'id_form' => 'commentform', 'id_submit' => 'submit', 'title_reply' => 'Leave a Reply', 'title_reply_to' => 'Leave a Reply to %s', 'cancel_reply_link' => 'Cancel reply', 'label_submit' => 'Post Comment');
    /* NEXT CODE WILL BE REPLACE NATIVE COMMENT FORM MARKUP, THAT WE CANNOT CHANGE WITH STANDART FUNCTIONS */
    /* FOR EXAMPLE IT MAY BE HELPFUL IF WE NEED TO CHANGE MARKUP FOR TWITTER BOOTSTRAP */
Example #30
-31
function get_all_comments_list()
{
    global $post;
    ob_start();
    //exit(has_shortcode($post->post_content, 'list_comments'));
    # The comment functions use the query var 'cpage', so we'll ensure that's set
    $page = intval(get_query_var('cpage'));
    if (0 == $page) {
        $page = 1;
        set_query_var('cpage', $page);
    }
    # We'll do 10 comments per page...
    # Note that the 'page_comments' option in /wp-admin/options-discussion.php must be checked
    $comments_per_page = 10;
    $comments = get_comments(array('status' => 'approve', 'meta_key' => 'notify_user', 'meta_value' => get_current_user_id()));
    ?>
    <ol start="<?php 
    echo $comments_per_page * $page - $comments_per_page + 1;
    ?>
">
        <?php 
    wp_list_comments(array('style' => 'ol', 'per_page' => $comments_per_page, 'page' => $page, 'reverse_top_level' => false), $comments);
    ?>
    </ol>

    <?php 
    // Now you can either use paginate_comments_links ...
    paginate_comments_links();
    $html = ob_get_contents();
    ob_end_clean();
    return $html;
}