Changeset 47111
- Timestamp:
- 01/26/2020 10:27:08 PM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r47060 r47111 950 950 * @since 1.5.0 951 951 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 952 * @since 5.4.0 Added 'In reply to %s.' prefix to child comments in comments feed. 952 953 * 953 954 * @see Walker_Comment::comment() … … 961 962 $comment = get_comment( $comment_ID ); 962 963 964 $comment_content = $comment->comment_content; 965 966 if ( is_comment_feed() && $comment->comment_parent ) { 967 $parent = get_comment( $comment->comment_parent ); 968 if ( $parent ) { 969 $parent_link = esc_url( get_comment_link( $parent ) ); 970 $name = get_comment_author( $parent ); 971 972 $comment_content = sprintf( 973 /* translators: %s: Comment link. */ 974 ent2ncr( __( 'In reply to %s.' ) ), 975 '<a href="' . $parent_link . '">' . $name . '</a>' 976 ) . "\n\n" . $comment_content; 977 } 978 } 979 963 980 /** 964 981 * Filters the text of a comment. … … 972 989 * @param array $args An array of arguments. 973 990 */ 974 return apply_filters( 'get_comment_text', $comment ->comment_content, $comment, $args );991 return apply_filters( 'get_comment_text', $comment_content, $comment, $args ); 975 992 } 976 993
Note: See TracChangeset
for help on using the changeset viewer.