diff --git src/wp-includes/comment-template.php src/wp-includes/comment-template.php
index a031c9a88c..207a53a64e 100644
|
|
|
function get_comments_number_text( $zero = false, $one = false, $more = false ) |
| 949 | 949 | * |
| 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() |
| 954 | 955 | * |
| … |
… |
function get_comments_number_text( $zero = false, $one = false, $more = false ) |
| 960 | 961 | function get_comment_text( $comment_ID = 0, $args = array() ) { |
| 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. |
| 965 | 982 | * |
| … |
… |
function get_comment_text( $comment_ID = 0, $args = array() ) { |
| 971 | 988 | * @param WP_Comment $comment The comment object. |
| 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 | |
| 977 | 994 | /** |