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


PHP comment_link函数代码示例

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


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

示例1: ewf_comments

function ewf_comments($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    switch ($comment->comment_type) {
        case '':
            ?>
		<li <?php 
            comment_class();
            ?>
 id="li-comment-<?php 
            comment_ID();
            ?>
">
			<div class="comment-body <?php 
            if (!get_option('show_avatars')) {
                echo 'no-avatar';
            }
            ?>
">
				
				<div class="comment-author vcard" >
					<?php 
            if (get_option('show_avatars')) {
                echo get_avatar($comment, 80);
            }
            ?>
					
					<cite class="fn">
						<?php 
            $comment_url = get_comment_link();
            echo '<a class="url" rel="external nofollow" href="' . $comment_url . '">' . get_comment_author() . '</a>';
            ?>
					</cite>
					
					<span class="says"><?php 
            echo __('says', 'bitpub');
            ?>
:</span>
				</div>
					
				<div class="comment-meta commentmetadata">
					<a href="<?php 
            comment_link();
            ?>
">
					<?php 
            comment_date();
            echo ' ' . __('at', 'bitpub') . ' ';
            comment_time();
            ?>
					</a>
				</div>
				
				<?php 
            if ($comment->comment_approved == '0') {
                ?>
					<em><?php 
                _e('Your comment is awaiting moderation.', 'bitpub');
                ?>
</em>
				<?php 
            }
            ?>
				
				<?php 
            comment_text();
            ?>
				
				<!-- get_edit_comment_link();  -->
				
				
				<div class="reply">
					<?php 
            comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
            echo ' ';
            edit_comment_link();
            ?>
				</div>
			</div> 
		<?php 
            break;
        case 'pingback':
        case 'trackback':
            ?>
		
		<li class="post pingback">
			<p><?php 
            _e('Pingback:', 'bitpub');
            ?>
 <?php 
            comment_author_link();
            edit_comment_link(__('Edit', 'bitpub'), ' ');
            ?>
</p>
		<?php 
            break;
    }
}
开发者ID:kadr,项目名称:semashko,代码行数:98,代码来源:functions-blog.php

示例2: evolve_pings_callback

/**
 * evolve_pings_callback() recreate the comment list
 *
 * @since 0.3
 * @needsdoc
 */
function evolve_pings_callback($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    $tag = apply_filters('evolve_pings_callback_tag', (string) 'li');
    // Available filter: evolve_pings_callback_tag
    $time = apply_filters('evolve_pings_callback_time', (string) ' on ');
    // Available filter: evolve_pings_callback_time
    $when = apply_filters('evolve_pings_callback_when', (string) ' at ');
    // Available filter: evolve_pings_callback_time
    ?>
    <?php 
    if ($comment->comment_approved == '0') {
        echo '<p class="ping-unapproved moderation alert">Your trackback is awaiting moderation.</p>\\n';
    }
    ?>
    <!--BEING .pings-->
	<<?php 
    echo $tag;
    ?>
 class="<?php 
    echo semantic_comments();
    ?>
" id="ping-<?php 
    echo $comment->comment_ID;
    ?>
">
		<?php 
    comment_author_link();
    echo $time;
    ?>
<a class="trackback-time" href="<?php 
    comment_link();
    ?>
"><?php 
    comment_date();
    echo $when;
    comment_time();
    ?>
</a>
	<?php 
}
开发者ID:thejasonhsu,项目名称:Illumin,代码行数:47,代码来源:comments.php

示例3: custom_comment

function custom_comment($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    ?>
<li <?php 
    comment_class();
    ?>
 id="comment-<?php 
    comment_ID();
    ?>
">
<div class="the_comment">
<?php 
    if (function_exists('get_avatar')) {
        echo get_avatar($comment, '50');
    }
    ?>
<div class="the_comment_author"><strong><?php 
    comment_author_link();
    ?>
</strong> <?php 
    _e('says', 'designcrumbs');
    ?>
</div>
<?php 
    if ($comment->comment_approved == '0') {
        //message if comment is held for moderation
        ?>
<br><em><?php 
        _e('Your comment is awaiting moderation', 'designcrumbs');
        ?>
.</em><br>
<?php 
    }
    ?>
<div class="the_comment_text"><?php 
    comment_text();
    ?>
</div>
<small class="commentmetadata">
<?php 
    comment_date(get_option('date_format'));
    ?>
 - <?php 
    comment_date('g:i a');
    ?>
 - <a href="<?php 
    comment_link();
    ?>
" class="comment_permalink"><?php 
    _e('Permalink', 'designcrumbs');
    ?>
</a>
</small>
<div class="reply">
<?php 
    edit_comment_link(__('Edit', 'designcrumbs'), '', ' &nbsp;|&nbsp; ');
    echo comment_reply_link(array('reply_text' => __('Reply', 'designcrumbs'), 'depth' => $depth, 'max_depth' => $args['max_depth']));
    ?>
</div>
<div class="clear"></div>
</div>
<?php 
}
开发者ID:JPBetley,项目名称:cirofordelaware,代码行数:64,代码来源:functions.php

示例4: my_comments

function my_comments($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    switch ($comment->comment_type) {
        case 'pingback':
        case 'trackback':
            ?>
	
	<li class="pingback">
		<p><b>Pingback</b>: <?php 
            comment_author_link();
            ?>
</p>
		
	<?php 
            break;
        default:
            ?>
	
	<li<?php 
            // comment_class();
            ?>
>
		<article class="comment" id="comment-<?php 
            comment_ID();
            ?>
">
			<header class="comment-head vcard">
				<h3 class="fn">
					<?php 
            comment_author_link();
            ?>
				</h3>
				<span class="meta comment-meta">
					<time datetime="<?php 
            comment_date('c');
            ?>
" pubdate><?php 
            comment_date('jS F Y');
            ?>
 @ <?php 
            comment_time('g:iA');
            ?>
</time> <a href="<?php 
            comment_link();
            ?>
" title="Comment Permalink">#</a>
				</span>
				<?php 
            if ($comment->comment_approved == '0') {
                ?>
				<em class="moderation">
					Awaiting moderation
				</em>
				<?php 
            }
            ?>
			</header>

			<div class="comment-body">
				<?php 
            comment_text();
            ?>
			</div>

			<?php 
            comment_reply_link(array_merge($args, array('reply_text' => __('Reply', 'twentyeleven'), 'depth' => $depth, 'max_depth' => $args['max_depth'])));
            ?>
			
		</article>

	<?php 
            break;
    }
}
开发者ID:xeyefex,项目名称:Mixd-WordPress-Framework,代码行数:75,代码来源:setup-theme.php

示例5: hb_format_comment

function hb_format_comment($comment, $args, $depth)
{
    $isByAuthor = false;
    if ($comment->comment_author_email == get_the_author_meta('email')) {
        $isByAuthor = true;
    }
    //$GLOBALS['comment'] = $comment;
    ?>
  <li <?php 
    comment_class();
    ?>
 id="comment-<?php 
    comment_ID();
    ?>
">
     
      <div id="div-comment-<?php 
    comment_ID();
    ?>
" class="comment-body">
      
      
      <div class="comment-author vcard">

        <span class="rounded-element float-left">
          <?php 
    echo get_avatar($comment, $size = '76');
    ?>
        </span>

        <cite class="fn"><?php 
    comment_author_link();
    ?>
</cite>

        <div class="reply">
          <?php 
    comment_reply_link(array_merge($args, array('add_below' => 'div-comment', 'depth' => $depth, 'before' => '<span class="sep">&middot;</span> ', 'max_depth' => $args['max_depth'])), get_comment_ID());
    ?>
        </div>
        <br/>
        <?php 
    if ($isByAuthor) {
        ?>
<span class="author-tag"><?php 
        _e('Author', 'hbthemes');
        ?>
</span><?php 
    }
    ?>
      </div>

      <div class="comment-meta commentmetadata">
        <a href="<?php 
    comment_link();
    ?>
">
          <time itemprop="commentTime" itemscope="itemscope" datetime="<?php 
    comment_time('c');
    ?>
"><?php 
    comment_date('F j, Y', get_comment_ID());
    _e(' at ', 'hbthemes');
    comment_time('g:i A');
    ?>
</time>
        </a>
      </div>

      <div class="comment-inner">      
      <?php 
    if ($comment->comment_approved == '0') {
        ?>
      <em class="moderation"><?php 
        _e('Your comment is awaiting moderation.', 'hbthemes');
        ?>
</em>
      <br />
      <?php 
    }
    ?>
  
      <?php 
    comment_text();
    ?>
        
    </div>  
    </div>    

<?php 
}
开发者ID:phupx,项目名称:genco,代码行数:91,代码来源:comments.php

示例6: camp_comment_callback

function camp_comment_callback()
{
    ?>
	<li <?php 
    comment_class();
    ?>
 id="comment-<?php 
    comment_ID();
    ?>
">
		<div class="comment-body" id="div-comment-<?php 
    comment_ID();
    ?>
">
			<div class="comment-author vcard">
				<?php 
    echo get_avatar(get_the_author_meta('ID'), 50);
    ?>
				<cite class="fn"><?php 
    comment_author_link();
    ?>
</cite>
				<span class="says"><?php 
    _e('says:', 'camp');
    ?>
</span>
			</div>
			<!-- .comment-author -->
			<div class="comment-meta">
				<a href="<?php 
    comment_link();
    ?>
">
					<?php 
    echo get_comment_date() . __(' at ', 'camp') . get_comment_time();
    ?>
				</a>
			</div>
			<!-- .comment-meta -->
			<?php 
    comment_text();
    ?>
			<div class="reply">
				<?php 
    comment_reply_link(array('add_below' => 'div-comment', 'depth' => 1, 'max_depth' => 10, 'reply_text' => __('Reply', 'camp')));
    edit_comment_link(__('Edit', 'camp'), ' | ', '');
    ?>
			</div>
		</div>
	</li>
<?php 
}
开发者ID:otkinsey,项目名称:wp-nsds,代码行数:52,代码来源:functions.php

示例7: bunyad_smartmag_comment

    /**
     * Callback for displaying a comment
     * 
     * @todo eventually move to bunyad templates with auto-generated functions as template containers
     * 
     * @param mixed   $comment
     * @param array   $args
     * @param integer $depth
     */
    function bunyad_smartmag_comment($comment, $args, $depth)
    {
        $GLOBALS['comment'] = $comment;
        switch ($comment->comment_type) {
            case 'pingback':
            case 'trackback':
                ?>
			
			<li class="post pingback">
				<p><?php 
                _e('Pingback:', 'bunyad');
                ?>
 <?php 
                comment_author_link();
                edit_comment_link(__('Edit', 'bunyad'), '<span class="edit-link">', '</span>');
                ?>
</p>
			<?php 
                break;
            default:
                ?>
		
			<li <?php 
                comment_class();
                ?>
 id="li-comment-<?php 
                comment_ID();
                ?>
">
				<article id="comment-<?php 
                comment_ID();
                ?>
" class="comment">
				
					<div class="comment-avatar">
					<?php 
                echo get_avatar($comment, 40);
                ?>
					</div>
					
					<div class="comment-meta">					
						<span class="comment-author"><?php 
                comment_author_link();
                ?>
</span> <?php 
                _e('on', 'bunyad');
                ?>
 
						<a href="<?php 
                comment_link();
                ?>
" class="comment-time" title="<?php 
                comment_date();
                _e(' at ', 'bunyad');
                comment_time();
                ?>
">
							<time pubdate datetime="<?php 
                comment_time('c');
                ?>
"><?php 
                comment_date();
                ?>
 <?php 
                comment_time();
                ?>
</time>
						</a>
		
						<?php 
                edit_comment_link(__('Edit', 'bunyad'), '<span class="edit-link"> &middot; ', '</span>');
                ?>
					</div> <!-- .comment-meta -->
		
					<div class="comment-content">
						<?php 
                comment_text();
                ?>
						
						<?php 
                if ($comment->comment_approved == '0') {
                    ?>
							<em class="comment-awaiting-moderation"><?php 
                    _e('Your comment is awaiting moderation.', 'bunyad');
                    ?>
</em>
						<?php 
                }
                ?>
						
			
//.........这里部分代码省略.........
开发者ID:silverbux,项目名称:smartmag-magazine-wordpress,代码行数:101,代码来源:partial-comment.php

示例8: get_post

<?php
if ( have_comments() ) : while ( have_comments() ) : the_comment();
	$comment_post = get_post($comment->comment_post_ID);
	get_post_custom($comment_post->ID);
?>
	<item>
		<title><?php
			if ( !is_singular() ) {
				$title = get_the_title($comment_post->ID);
				$title = apply_filters('the_title_rss', $title);
				printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
			} else {
				printf(ent2ncr(__('By: %s')), get_comment_author_rss());
			}
		?></title>
		<link><?php comment_link() ?></link>
		<dc:creator><?php echo get_comment_author_rss() ?></dc:creator>
		<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true, false), false); ?></pubDate>
		<guid isPermaLink="false"><?php comment_guid() ?></guid>
<?php if ( post_password_required($comment_post) ) : ?>
		<description><?php echo ent2ncr(__('Protected Comments: Please enter your password to view comments.')); ?></description>
		<content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded>
<?php else : // post pass ?>
		<description><?php comment_text_rss() ?></description>
		<content:encoded><![CDATA[<?php comment_text() ?>]]></content:encoded>
<?php endif; // post pass
	do_action('commentrss2_item', $comment->comment_ID, $comment_post->ID);
?>
	</item>
<?php endwhile; endif; ?>
</channel>
开发者ID:realfluid,项目名称:umbaugh,代码行数:31,代码来源:feed-rss2-comments.php

示例9: widget

        function widget($args, $instance)
        {
            extract($args);
            $title = apply_filters('widget_title', $instance['title']);
            $limit = $instance['limit'] != 0 ? absint($instance['limit']) : 4;
            $post_type = $instance['post_type'];
            $show_date = empty($instance['show_date']) ? 0 : $instance['show_date'];
            $show_avatar = empty($instance['show_avatar']) ? 0 : $instance['show_avatar'];
            $show_author = empty($instance['show_author']) ? 0 : $instance['show_author'];
            $show_comment = empty($instance['show_comment']) ? 0 : $instance['show_comment'];
            $is_slider = empty($instance['is_slider']) ? 0 : $instance['is_slider'];
            $row = $instance['row'] != 0 ? absint($instance['row']) : 2;
            $show_nav = empty($instance['show_nav']) ? 0 : $instance['show_nav'];
            $auto_play = empty($instance['auto_play']) ? 0 : $instance['auto_play'];
            echo $before_widget;
            if ($title) {
                echo $before_title . $title . $after_title;
            }
            $args = array('number' => $limit, 'status' => 'approve', 'post_status' => 'publish', 'comment_type' => '');
            if ($post_type != 'all') {
                $args['post_type'] = $post_type;
            }
            $comments = get_comments($args);
            if ($comments) {
                $count = 0;
                $num_posts = count($comments);
                if ($num_posts <= $row) {
                    $is_slider = false;
                }
                if (!$is_slider) {
                    $row = $num_posts;
                }
                $extra_class = '';
                $extra_class .= $is_slider ? 'ts-slider loading' : '';
                $extra_class .= $is_slider && $show_nav ? ' has-navi' : '';
                ?>
				<div class="ts-recent-comments-widget-wrapper <?php 
                echo esc_attr($extra_class);
                ?>
" data-show_nav="<?php 
                echo esc_attr($show_nav);
                ?>
" data-auto_play="<?php 
                echo esc_attr($auto_play);
                ?>
">
					<?php 
                foreach ((array) $comments as $comment) {
                    $GLOBALS['comment'] = $comment;
                    ?>
						<?php 
                    if ($count % $row == 0) {
                        ?>
						<div class="per-slide">
							<ul class="comment_list_widget">
						<?php 
                    }
                    ?>
							<li>
								<div class="comment-meta">
									<?php 
                    if ($show_avatar) {
                        ?>
									<div class="avatar">
										<a href="<?php 
                        comment_link();
                        ?>
"><?php 
                        echo get_avatar($comment->comment_author_email);
                        ?>
</a>
									</div>
									<?php 
                    }
                    ?>
									
									<div class="meta">
										<?php 
                    if ($show_author) {
                        ?>
										<span class="author">
											<a href="<?php 
                        echo get_comment_author_url() == '' ? 'javascript: void(0)' : get_comment_author_url();
                        ?>
" rel="external nofollow"><?php 
                        echo esc_html($comment->comment_author);
                        ?>
</a>
										</span>
										<?php 
                    }
                    ?>
										
										<?php 
                    if ($show_date) {
                        ?>
										<span class="date">
											<?php 
                        comment_date('M d, Y');
                        ?>
//.........这里部分代码省略.........
开发者ID:ericsoncardosoweb,项目名称:dallia,代码行数:101,代码来源:recent_comments.php

示例10: custom_comment

function custom_comment($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    ?>
<li <?php 
    comment_class();
    ?>
 id="comment-<?php 
    comment_ID();
    ?>
">
<div class="the_comment clearfix">
<?php 
    if (function_exists('get_avatar')) {
        echo get_avatar($comment, '120');
    }
    ?>
<div class="the_comment_author"><?php 
    echo sprintf(__('<span>%1$s</span> says', 'designcrumbs'), get_comment_author_link());
    ?>
</div>
<?php 
    if ($comment->comment_approved == '0') {
        //message if comment is held for moderation
        ?>
<span class="moderation"><?php 
        _e('Your comment is awaiting moderation', 'designcrumbs');
        ?>
.</span>
<?php 
    }
    ?>
<div class="the_comment_text"><?php 
    comment_text();
    ?>
</div>
<small class="commentmetadata">
<a href="<?php 
    comment_link();
    ?>
" class="comment_permalink"><i class="fa fa-clock-o"></i><?php 
    comment_date(get_option('date_format'));
    ?>
 - <?php 
    comment_date('g:i a');
    ?>
</a>
</small>
<div class="reply">
<?php 
    edit_comment_link('<i class="fa fa-pencil"></i>' . __('Edit', 'designcrumbs'));
    echo comment_reply_link(array('reply_text' => '<i class="fa fa-reply"></i>' . __('Reply', 'designcrumbs'), 'depth' => $depth, 'max_depth' => $args['max_depth']));
    ?>
</div>
</div>
<?php 
}
开发者ID:peterlaxalt,项目名称:_lm-stock-web,代码行数:57,代码来源:functions.php

示例11: comment_link

		?></title>
		<link rel="alternate" href="<?php comment_link(); ?>" type="<?php bloginfo_rss('html_type'); ?>" />

		<author>
			<name><?php comment_author_rss(); ?></name>
			<?php if (get_comment_author_url()) echo '<uri>' . get_comment_author_url() . '</uri>'; ?>

		</author>

		<id><?php comment_link(); ?></id>
		<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></updated>
		<published><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></published>
<?php if ( post_password_required($comment_post) ) : ?>
		<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php echo get_the_password_form(); ?>]]></content>
<?php else : // post pass ?>
		<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content>
<?php endif; // post pass
	// Return comment threading information (http://www.ietf.org/rfc/rfc4685.txt)
	if ( $comment->comment_parent == 0 ) : // This comment is top level ?>
		<thr:in-reply-to ref="<?php the_guid() ?>" href="<?php the_permalink_rss() ?>" type="<?php bloginfo_rss('html_type'); ?>" />
<?php else : // This comment is in reply to another comment
	$parent_comment = get_comment($comment->comment_parent);
	// The rel attribute below and the id tag above should be GUIDs, but WP doesn't create them for comments (unlike posts). Either way, its more important that they both use the same system
?>
		<thr:in-reply-to ref="<?php echo get_comment_link($parent_comment) ?>" href="<?php echo get_comment_link($parent_comment) ?>" type="<?php bloginfo_rss('html_type'); ?>" />
<?php endif;
	do_action('comment_atom_entry', $comment->comment_ID, $comment_post->ID);
?>
	</entry>
<?php endwhile; endif; ?>
</feed>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:feed-atom-comments.php

示例12: get_settings

			$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email, 
			comment_author_url, comment_date, comment_content, comment_post_ID, 
			$wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments 
			LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE $wpdb->posts.post_status = 'publish' 
			AND $wpdb->comments.comment_approved = '1' AND post_date < '".date("Y-m-d H:i:s")."'  
			ORDER BY comment_date DESC LIMIT " . get_settings('posts_per_rss') );
		}
	// this line is WordPress' motor, do not delete it.
		if ($comments) {
			foreach ($comments as $comment) {
?>
	<item>
		<title>by: <?php comment_author_rss() ?></title>
		<link><?php comment_link() ?></link>
		<pubDate><?php comment_time('r'); ?></pubDate>
		<guid><?php comment_link() ?></guid>
			<?php 
			if (!empty($comment->post_password) && $_COOKIE['wp-postpass'] != $comment->post_password) {
			?>
		<description>Protected Comments: Please enter your password to view comments.</description>
		<content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded>
			<?php
			} else {
			?>
		<description><?php comment_text_rss() ?></description>
		<content:encoded><![CDATA[<?php comment_text() ?>]]></content:encoded>
			<?php 
			} // close check for password 
			?>
	</item>
<?php 
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:wp-commentsrss2.php

示例13: daiquiri_comment

function daiquiri_comment($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    extract($args, EXTR_SKIP);
    ?>
    <div <?php 
    comment_class(empty($args['has_children']) ? '' : 'parent');
    ?>
 id="comment-<?php 
    comment_ID();
    ?>
">
        <div class="comment-header">
            <p>
                <a href="<?php 
    comment_link();
    ?>
"></a>
                <?php 
    if ($comment->comment_approved == '0') {
        ?>
                    <em class="comment-awaiting-moderation"><?php 
        _e('Your comment is awaiting moderation.');
        ?>
</em>
                <?php 
    }
    ?>
            </p>
        </div>
        <div class="comment-body">
            <?php 
    comment_text();
    ?>
        </div>
        <div class="comment-footer">
            by <?php 
    comment_author_link(get_comment_ID());
    ?>
,
            <?php 
    comment_date();
    ?>
, <?php 
    comment_time('H:i');
    ?>
            <a href="<?php 
    comment_link();
    ?>
">Permalink</a>
            <?php 
    comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
    ?>
        </div>
    </li>
    <?php 
}
开发者ID:vrtulka23,项目名称:daiquiri,代码行数:57,代码来源:functions.php

示例14: widget


//.........这里部分代码省略.........

					<!-- Comment Tab -->
					<?php 
            $recent_comments = get_comments(array('number' => $num_comment, 'status' => 'approve'));
            ?>
					<div id="comment-tab" class="tab-post-content tab-pane">
					<div class='top-left'><div class='top-right'></div></div>
					<?php 
            if (count($recent_comments)) {
                $i = 0;
                ?>
	<div class="contentcenter">
						<ul class="tabs-comments-list">
						<?php 
                foreach ($recent_comments as $comment) {
                    $GLOBALS['comment'] = $comment;
                    switch ($comment->comment_type) {
                        case '':
                            $class = "";
                            if ($i == 0) {
                                $class .= "first ";
                            }
                            if (++$i == count($recent_comments)) {
                                $class .= "last";
                            }
                            ?>
									<li <?php 
                            if ($class) {
                                echo "class='{$class}'";
                            }
                            ?>
>
										<div class="avarta"><a href="<?php 
                            comment_link();
                            ?>
"><?php 
                            echo get_avatar($comment, 58, get_bloginfo('template_url') . '/images/mycustomgravatar.png');
                            ?>
</a></div>
										<div class="detail">
											<div class="comment-author vcard">
												<?php 
                            printf(__('%s', 'wpdance'), sprintf('<cite class="fn"><a href="%1$s" rel="external nofollow" class="url">%2$s</a></cite>', get_comment_author_url(), get_comment_author()));
                            ?>
:
											</div><!-- .comment-author .vcard -->
											<blockquote class="comment-body"><?php 
                            echo string_limit_words(get_comment_text(), 10);
                            ?>
</blockquote>
											<div class="comment-meta"><span><?php 
                            _e("in", "wpdance");
                            ?>
 <a href="<?php 
                            echo esc_url(get_permalink($comment->comment_post_ID));
                            ?>
"><?php 
                            echo esc_attr(get_the_title($comment->comment_post_ID));
                            ?>
</a></span></div>
										</div>
									</li>
								<?php 
                            break;
                        case 'pingback':
                        case 'trackback':
开发者ID:proj-2014,项目名称:vlan247-test-wp2,代码行数:67,代码来源:ew_multitab.php

示例15: ap_core_comment

            function ap_core_comment($comment, $args, $depth)
            {
                $GLOBALS['comment'] = $comment;
                ?>
                <li <?php 
                comment_class('media');
                ?>
 id="li-comment-<?php 
                comment_ID();
                ?>
">
                    <div id="comment-<?php 
                comment_ID();
                ?>
" class="the_comment">
                        <div class="comment-author vcard">
                            <?php 
                if (get_avatar($comment)) {
                    ?>
                                <div class="thumbnail media-object"><?php 
                    echo get_avatar($comment, $size = '64', $default = '');
                    ?>
</div>
                            <?php 
                }
                ?>
                        </div>
                        <div class="media-body">
                            <label><?php 
                echo sprintf(_x('On %1$s at %2$s, %3$s said:', '1: date, 2: time, 3:author', 'museum-core'), esc_html(get_comment_date()), esc_html(get_comment_time()), wp_kses_post(get_comment_author_link()));
                ?>
</label>
                            <?php 
                if ($comment->comment_approved == '0') {
                    ?>
                                <em><?php 
                    _e('Your comment is awaiting moderation.', 'museum-core');
                    ?>
</em>
                                <br />
                            <?php 
                }
                ?>
                            <?php 
                comment_text();
                ?>
                            <?php 
                if (comments_open()) {
                    if ($depth < $args['max_depth']) {
                        ?>
                                    <div class="reply"><button class="btn btn-default btn-sm">
                                    <?php 
                        comment_reply_link(array_merge($args, array('depth' => $depth, 'reply_text' => __('Respond to this', 'museum-core'), 'max_depth' => $args['max_depth'])));
                        ?>
                                    </button></div>
                            <?php 
                    }
                }
                ?>
                            <small>
                                <div class="comment-meta commentmetadata"><?php 
                edit_comment_link('<span class="text-danger">' . __('(Edit)', 'museum-core') . '</span>', '', '');
                ?>
</div>
                                <a href="<?php 
                comment_link();
                ?>
"><?php 
                _e('Permalink', 'museum-core');
                ?>
</a>
                            </small>
                        </div>
                    </div>
                </li>
                <?php 
            }
开发者ID:c-mauderer,项目名称:museum-core,代码行数:77,代码来源:functions.php


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