Ticket #43429: 43429.diff
| File 43429.diff, 1.5 KB (added by , 7 years ago) |
|---|
-
src/wp-includes/comment-template.php
943 943 * 944 944 * @since 1.5.0 945 945 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 946 * @since 5.3.0 Added 'In reply to %s.' prefix to child comments in comments feed. 946 947 * 947 948 * @see Walker_Comment::comment() 948 949 * … … 954 955 function get_comment_text( $comment_ID = 0, $args = array() ) { 955 956 $comment = get_comment( $comment_ID ); 956 957 958 $comment_content = $comment->comment_content; 959 960 if ( is_comment_feed() && $comment->comment_parent ) { 961 $parent = get_comment( $comment->comment_parent ); 962 if ( $parent ) { 963 $parent_link = esc_url( get_comment_link( $parent ) ); 964 $name = get_comment_author( $parent ); 965 966 $comment_content = sprintf( 967 /* translators: %s: comment link */ 968 ent2ncr( __( 'In reply to %s.' ) ), 969 '<a href="' . $parent_link . '">' . $name . '</a>' 970 ) . "\n\n" . $comment_content; 971 } 972 } 973 957 974 /** 958 975 * Filters the text of a comment. 959 976 * … … 965 982 * @param WP_Comment $comment The comment object. 966 983 * @param array $args An array of arguments. 967 984 */ 968 return apply_filters( 'get_comment_text', $comment ->comment_content, $comment, $args );985 return apply_filters( 'get_comment_text', $comment_content, $comment, $args ); 969 986 } 970 987 971 988 /**