Opened 11 years ago
Closed 11 years ago
#31298 closed enhancement (fixed)
"comment-reply-login" class missing from get_post_reply_link()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.2 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Comments | Keywords: | has-patch 2nd-opinion |
| Focuses: | template | Cc: |
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
For context, the obvious use-case for a link like this is custom styling in a theme.
The less obvious one is the ability to filter
post_comments_linkand target that class specifically to modify it separately fromcomment-reply-link.One example for Bootstrap to add
btnclasses would be:function bs_comment_reply_link( $link = '' ) { $link = str_replace( 'comment-reply-login', 'comment-reply-login btn btn-sm btn-default', $link ); $link = str_replace( 'comment-reply-link', 'comment-reply-link btn btn-sm btn-default', $link ); return $link; } add_filter( 'comment_reply_link', 'bs_comment_reply_link' );Right now, the same code cannot be applied to
post_comments_linkas thecomment-reply-loginclass does not exist. My above patch brings both functions inline with each other.