summaryrefslogtreecommitdiffstats
path: root/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:26 +0000
commit30883c26bdceb9eaf32c8d4a1b0c1bce223b5226 (patch)
tree39a02e2aeb21ab5b7923c6f5757d66d55b708912 /wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
parentAdding upstream version 6.4.3+dfsg1. (diff)
downloadwordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.tar.xz
wordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.zip
Adding upstream version 6.5+dfsg1.upstream/6.5+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php')
-rw-r--r--wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
index 1169b6b..c129ef6 100644
--- a/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
+++ b/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
@@ -300,7 +300,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
$prepared_args['orderby'] = 'none';
$total_comments = $query->query( $prepared_args );
- $max_pages = ceil( $total_comments / $request['per_page'] );
+ $max_pages = (int) ceil( $total_comments / $request['per_page'] );
}
$response = rest_ensure_response( $comments );
@@ -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,
);
}