[wp-trac] [WordPress Trac] #8204: get_comment_reply_link not working in callback

WordPress Trac wp-trac at lists.automattic.com
Thu Nov 13 20:19:49 GMT 2008


#8204: get_comment_reply_link not working in callback
---------------------------+------------------------------------------------
 Reporter:  jeremyclark13  |       Owner:                                            
     Type:  defect         |      Status:  new                                       
 Priority:  normal         |   Milestone:  2.7                                       
Component:  Comments       |     Version:  2.7                                       
 Severity:  normal         |    Keywords:  callback, comments, get_comment_reply_link
---------------------------+------------------------------------------------
 The {{{get_comment_reply_link}}} function doesn't work when using a
 callback to customize the output of {{{wp_list_comments}}}  This is a
 sample of the code I'm using.
 {{{
 function custom_comment($comment, $args, $depth) {
        $GLOBALS['comment'] = $comment;
 ?>
 <li <?php comment_class(); ?> id="comment-<?php comment_ID( ); ?>">
        <div class="avatar_cont"><?php echo get_avatar(
 get_comment_author_email(), '50' ); ?></div>
 Comment by <em><?php comment_author_link() ?></em>:
 <?php if ($comment->comment_approved == '0') : ?>
 <em>Your comment is awaiting moderation.</em>
 <?php endif; ?>
 <br />
 <small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>"
 title=""><?php comment_date('l, F jS Y') ?>
 at <?php comment_time() ?></a>&nbsp;|&nbsp;<?php
 edit_comment_link('Edit','',''); ?></small>

         <?php comment_text() ?>

 <div class="reply">
 <?php echo get_comment_reply_link(); ?>
 </div>
 <?php
 }
 }}}

 Most of this was taken from this example by Ryan
 [http://comox.textdrive.com/pipermail/wp-hackers/2008-October/021973.html
 here].

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8204>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list