Definition:
function comment_form_title( $noreplytext = false, $replytext = false, $linktoparent = TRUE ) {}
Display text based on comment reply status. Only affects users with Javascript disabled.
Parameters
- string $noreplytext: Optional. Text to display when not replying to a comment.
- string $replytext: Optional. Text to display when replying to a comment. Accepts “%s” for the author of the comment being replied to.
- string $linktoparent: Optional. Boolean to control making the author’s name a link to their comment.
Source code
function comment_form_title( $noreplytext = false, $replytext = false, $linktoparent = TRUE ) {
global $comment;
if ( false === $noreplytext ) $noreplytext = __( 'Leave a Reply' );
if ( false === $replytext ) $replytext = __( 'Leave a Reply to %s' );
$replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0;
if ( 0 == $replytoid )
echo $noreplytext;
else {
$comment = get_comment($replytoid);
$author = ( $linktoparent ) ? '<a href="#comment-' . get_comment_ID() . '">' . get_comment_author() . '</a>' : get_comment_author();
printf( $replytext, $author );
}
}
689

February 11, 2011 


No comments yet... Be the first to leave a reply!