#29782 closed defect (bug) (invalid)
'Before' and 'After' in get_comment_reply_link not working
| Reported by: | stereoactivo | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Comments | Version: | 4.0 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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