From de4237de76cb2f2cfbf5c5338d923e09240a4f40 Mon Sep 17 00:00:00 2001 From: Maarten Bruna <14947039+ictbeheer@users.noreply.github.com> Date: Fri, 30 Oct 2026 09:31:47 +0100 Subject: [PATCH 1/2] fix: don't propagate all query params --- src/Base/RestAPI/Controllers/BaseController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Base/RestAPI/Controllers/BaseController.php b/src/Base/RestAPI/Controllers/BaseController.php index 33d3c07..c11bb1e 100644 --- a/src/Base/RestAPI/Controllers/BaseController.php +++ b/src/Base/RestAPI/Controllers/BaseController.php @@ -47,9 +47,9 @@ protected function addPaginator(array $data, WP_Query $query): array */ protected function getPaginatorParams(WP_REST_Request $request, int $limit = 10): array { - return array_merge($request->get_params(), [ + return[ 'posts_per_page' => $request->get_param('limit') ?: $limit, 'paged' => $request->get_param('page') ?: 0 - ]); + ]; } } From 4ddc7d08adb0b6a03cc1739c48f7ba611849bf9e Mon Sep 17 00:00:00 2001 From: Maarten Bruna <14947039+ictbeheer@users.noreply.github.com> Date: Fri, 30 Oct 2026 10:34:04 +0100 Subject: [PATCH 2/2] chore: version bump --- CHANGELOG.md | 4 ++++ openpub-base.php | 2 +- src/Base/Foundation/Plugin.php | 2 +- src/Base/RestAPI/Controllers/BaseController.php | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8221a1..5a3cbc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [v3.9.5] - 2026-10-30 + +- Fix: don't propagate all query params to paginator params + ## [v3.9.4] - 2026-10-06 - Fix: clear cached featured image when its attachment changes diff --git a/openpub-base.php b/openpub-base.php index 6f1ac83..ddea235 100644 --- a/openpub-base.php +++ b/openpub-base.php @@ -4,7 +4,7 @@ * Plugin Name: Yard | OpenPub Base * Plugin URI: https://www.openwebconcept.nl/ * Description: Acts as foundation for other OpenPub related content plugins. This plugin implements actions to allow for other plugins to add and/or change Custom Posttypes, Metaboxes, Taxonomies, en Posts 2 posts relations. - * Version: 3.9.4 + * Version: 3.9.5 * Author: Yard | Digital Agency * Author URI: https://www.yard.nl/ * License: GPL-3.0 diff --git a/src/Base/Foundation/Plugin.php b/src/Base/Foundation/Plugin.php index 19f2bbc..9285464 100644 --- a/src/Base/Foundation/Plugin.php +++ b/src/Base/Foundation/Plugin.php @@ -8,7 +8,7 @@ class Plugin { public const NAME = 'openpub-base'; - public const VERSION = '3.9.4'; + public const VERSION = '3.9.5'; protected string $rootPath; public Config $config; diff --git a/src/Base/RestAPI/Controllers/BaseController.php b/src/Base/RestAPI/Controllers/BaseController.php index c11bb1e..c3a7362 100644 --- a/src/Base/RestAPI/Controllers/BaseController.php +++ b/src/Base/RestAPI/Controllers/BaseController.php @@ -47,7 +47,7 @@ protected function addPaginator(array $data, WP_Query $query): array */ protected function getPaginatorParams(WP_REST_Request $request, int $limit = 10): array { - return[ + return [ 'posts_per_page' => $request->get_param('limit') ?: $limit, 'paged' => $request->get_param('page') ?: 0 ];