Languages: English • Italiano • 日本語 (Add your language)
Displays the text of a comment. Use get_comment_text() to return a value instead of displaying it.
<?php comment_text( $comment_ID ); ?>
None.
Displays the comment text with the comment author in a list (<li>) tag.
<li>Comment by <?php comment_author(); ?>:<br /> <?php comment_text(); ?></li>
apply_filters() Passes the comment content through the 'comment_text' hook before display
Use the rel attribute to remove nofollow from comment content links using the comment_text filter
add_filter( 'comment_text', 'remove_rel_nofollow_attribute' ); function remove_rel_nofollow_attribute( $comment_text ) { $comment_text = str_ireplace(' rel="nofollow"', '', $comment_text ); return $comment_text; }
comment_text() is located in wp-includes/comment-template.php
.