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


PHP previous_comments_link函数代码示例

本文整理汇总了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 
}
开发者ID:anaved,项目名称:wordpress-tinkering,代码行数:25,代码来源:comments.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.
}
开发者ID:WPDevHQ,项目名称:nevertheless,代码行数:31,代码来源:comment.php

示例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'));
     }
 }
开发者ID:alfredpp,项目名称:sarath-portfolio,代码行数:8,代码来源:helper.comments.php

示例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 
    }
}
开发者ID:adisonc,项目名称:MaineLearning,代码行数:57,代码来源: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-->';
    }
}
开发者ID:alispx,项目名称:calibrefx,代码行数:48,代码来源:comments-hook.php

示例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(__('&larr; Older Comments', 'scaffold'));
        ?>
</div>
            <div class="nav-next"><?php 
        next_comments_link(__('Newer Comments &rarr;', 'scaffold'));
        ?>
</div>
        </nav>
    <?php 
    }
}
开发者ID:360ecommerce,项目名称:scaffolder,代码行数:24,代码来源:helpers.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(__('&larr; Newer Comments', 'the-bootstrap'));
            ?>
</div>
		<div class="nav-next alignright"><?php 
            previous_comments_link(__('Older Comments &rarr;', 'the-bootstrap'));
            ?>
</div>
	</nav>
	<?php 
        }
        // check for comment navigation
    }
开发者ID:jimmyshen007,项目名称:webproject,代码行数:31,代码来源:template-tags.php

示例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 '&nbsp;';
        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
}
开发者ID:arildoosilva,项目名称:besm_restricted_area,代码行数:30,代码来源:comments.php

示例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(__('&larr; Older Comments', 'responsive-mobile'));
        ?>
</div>
			<div class="nav-next next"><?php 
        next_comments_link(__('Newer Comments &rarr;', 'responsive-mobile'));
        ?>
</div>
		</nav><!-- #comment-nav-below -->
		<?php 
    }
    // check for comment navigation
    ?>

	<?php 
}
// have_comments()
开发者ID:AhmeddSayed,项目名称:MM_Portal,代码行数:31,代码来源:comments.php

示例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(__('&larr; Older Comments', 'abelard'));
        ?>
</div>
			<div class="nav-next"><?php 
        next_comments_link(__('Newer Comments &rarr;', 'abelard'));
        ?>
</div>
		</nav>
		<?php 
    }
    // check for comment navigation
    ?>

	<?php 
}
// have_comments()
开发者ID:rlridenour,项目名称:abelard,代码行数:31,代码来源:comments.php

示例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 
开发者ID:haihoanglinh,项目名称:shop,代码行数:31,代码来源:comments.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(__('&laquo; Older Comments', 'tt'));
        ?>
</div>
		<div class="nav-next"><?php 
        next_comments_link(__('Newer Comments &raquo;', 'tt'));
        ?>
</div>
		<div class="clearfix"></div>
	</nav>
	<?php 
    }
    // Check for comment navigation.
    ?>

	<?php 
    if (!comments_open()) {
开发者ID:brodie124,项目名称:dhatch_worx,代码行数:31,代码来源:comments.php

示例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(__('&larr; Older Comments', 'avenue'));
        ?>
</div>
			<div class="nav-next"><?php 
        next_comments_link(__('Newer Comments &rarr;', 'avenue'));
        ?>
</div>
		</nav><!-- #comment-nav-below -->
		<?php 
    }
    // check for comment navigation
    ?>

	<?php 
}
// have_comments()
开发者ID:albertoquijano,项目名称:JesusGiles,代码行数:31,代码来源:comments.php

示例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()
?>
开发者ID:sayme,项目名称:skeleton,代码行数:29,代码来源:comments.php

示例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(__('&larr; Older Comments', 'boss'));
            ?>
</div>
				<div class="nav-next"><?php 
            next_comments_link(__('Newer Comments &rarr;', '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.
开发者ID:tvolmari,项目名称:hammydowns,代码行数:31,代码来源:comments.php


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