#29782 closed defect (bug) (invalid)
'Before' and 'After' in get_comment_reply_link not working
Reported by: | stereoactivo | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0 |
Component: | Comments | Keywords: | |
Focuses: | Cc: |
Description
Hi, I was using get_comment_reply_link, but 'before' and 'after' parameters aren't working.
I'm using this:
comment_reply_link (array_merge ($args, array ( 'before ' => '<button class="responder">', 'after' => '</button>', 'reply_text' => __ ('reply', mytheme), )));
The output generated by wordpress doesn't include the strings that I used. I think that is caused by this line:
/*comment-template.php, line 1341 */ return apply_filters( 'comment_reply_link', $before . $link . $after, $args, $comment, $post );.
$before and $after aren't defined, and the values received in $args are never used.
Change History (3)
Note: See
TracTickets for help on using
tickets.
Hello,
are you sure your copy of WordPress is not modified? This is how that filter looks for me (and it works properly):
return apply_filters( 'comment_reply_link', $args['before'] . $link . $args['after'], $args, $comment, $post );
This is in WordPress 4.0 which you referenced in 'Version'. Can you please confirm that is the version of WordPress you are using.
Thanks