diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:57:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:57:26 +0000 |
commit | 30883c26bdceb9eaf32c8d4a1b0c1bce223b5226 (patch) | |
tree | 39a02e2aeb21ab5b7923c6f5757d66d55b708912 /wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php | |
parent | Adding upstream version 6.4.3+dfsg1. (diff) | |
download | wordpress-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 '')
-rw-r--r-- | wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php index cf9dc91..8ffc6ad 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php @@ -348,13 +348,13 @@ class WP_REST_Terms_Controller extends WP_REST_Controller { // Store pagination values for headers. $per_page = (int) $prepared_args['number']; - $page = ceil( ( ( (int) $prepared_args['offset'] ) / $per_page ) + 1 ); + $page = (int) ceil( ( ( (int) $prepared_args['offset'] ) / $per_page ) + 1 ); $response->header( 'X-WP-Total', (int) $total_terms ); - $max_pages = ceil( $total_terms / $per_page ); + $max_pages = (int) ceil( $total_terms / $per_page ); - $response->header( 'X-WP-TotalPages', (int) $max_pages ); + $response->header( 'X-WP-TotalPages', $max_pages ); $request_params = $request->get_query_params(); $collection_url = rest_url( rest_get_route_for_taxonomy_items( $this->taxonomy ) ); |