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.
Built from https://develop.svn.wordpress.org/trunk@57176


git-svn-id: http://core.svn.wordpress.org/trunk@56687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-12-09 22:13:34 +00:00
parent 1c7d7a09aa
commit a192ed1ae1
2 changed files with 2 additions and 2 deletions

View File

@ -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,
);
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.5-alpha-57175';
$wp_version = '6.5-alpha-57176';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.