mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
REST API: Pass correct number of arguments to the comment_text filter.
This ensures that `WP_REST_Comments_Controller::prepare_item_for_response()` passes three arguments to the `comment_text` filter, for consistency with all the other instances in core. Follow-up to [15957], [16357], [25555], [38832], [40664]. Props sjregan, SergeyBiryukov. Fixes #58238. git-svn-id: https://develop.svn.wordpress.org/trunk@57176 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1091,7 +1091,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
if ( in_array( 'content', $fields, true ) ) {
|
||||
$data['content'] = array(
|
||||
/** This filter is documented in wp-includes/comment-template.php */
|
||||
'rendered' => apply_filters( 'comment_text', $comment->comment_content, $comment ),
|
||||
'rendered' => apply_filters( 'comment_text', $comment->comment_content, $comment, array() ),
|
||||
'raw' => $comment->comment_content,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user