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 33d3c07..c3a7362 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 - ]); + ]; } }