mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Comments: Don't output "cancel comment reply link" if comments aren't threaded.
Though hidden via `style="display:none;"`, if the comments aren't threaded, this commit doesn't output the cancel comment reply link (skips over that logic). Change in `comment_form()`. Adds tests. Follow-up to [12810], [38959]. Props henrywright, jigneshnakrani, rachelbaker, desrosj, audrasjb, hellofromTonya. Fixes #37267. git-svn-id: https://develop.svn.wordpress.org/trunk@52175 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2538,11 +2538,13 @@ function comment_form( $args = array(), $post_id = null ) {
|
||||
|
||||
comment_form_title( $args['title_reply'], $args['title_reply_to'] );
|
||||
|
||||
echo $args['cancel_reply_before'];
|
||||
if ( get_option( 'thread_comments' ) ) {
|
||||
echo $args['cancel_reply_before'];
|
||||
|
||||
cancel_comment_reply_link( $args['cancel_reply_link'] );
|
||||
cancel_comment_reply_link( $args['cancel_reply_link'] );
|
||||
|
||||
echo $args['cancel_reply_after'];
|
||||
echo $args['cancel_reply_after'];
|
||||
}
|
||||
|
||||
echo $args['title_reply_after'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user