• I’m using this function in function.php

    function custom_comment($comment, $args, $depth) {
           $GLOBALS['comment'] = $comment;
    		?>
    		<li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>">
    	        <?php echo get_avatar( get_comment_author_email(), '32' ); ?>
    			<strong><?php comment_author_link() ?></strong> | <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('e','',''); ?>
    			<?php if ($comment->comment_approved == '0') : ?>
    			<em>Your comment is awaiting moderation.</em>
    			<?php endif; ?>
    
    			<?php comment_text() ?>
                <small class="replycomment"><?php comment_reply_link(array('reply_text' => 'Reply to this comment', 'depth' => $depth, 'max_depth'=> $args['max_depth'])) ?></small>
           <?php
    }
    ?>

    and it return this code

    <li class="comment byuser comment-author-admin bypostauthor even thread-even depth-1" id="comment-11">
    
    			<div class="commentcount">
    			<a href="#comment-11" title="Comment Permalink">#</a>
    			</div>
    
    						<div class="gravatar"><img alt='' src='http://www.gravatar.com/avatar/46b2a119c720f7d95b795246cc2828c9?s=25&amp;d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D25&amp;r=G' class='avatar avatar-25 photo' height='25' width='25' /></div>
    
    			<strong><a href='http://ericulous.com' rel='external nofollow' class='url'>Genkisan</a></strong>  August 23rd, 2007 at 4:20 pm 						
    
    			<div class="commenttext">
    			First comment to get a feel of how it looks like. Looking great?
    
                <small><a rel='nofollow' href='/demo/2007/08/23/a-post-with-multiple-test-elements/?replytocom=11#respond' onclick='return addComment.moveForm("comment-11", "11", "respond", "17")'>Reply to this comment</a></small>
    			</div>

    i’m using the same code but i don’t have this in my returned code:

    <div class="commentcount">
    			<a href="#comment-11" title="Comment Permalink">#</a>
    			</div>

    <div class="gravatar">
    <div class="commenttext">

    why ???

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘callback function different with the same code’ is closed to new replies.