diff --git a/CHANGELOG.md b/CHANGELOG.md index 665f34c..a08b125 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## Version [3.12.1] (2024-06-20) + +### Feat + +- Get all connected items in API response instead of the default 10. + ## Version [3.12] (2024-03-14) ### Feat diff --git a/pdc-base.php b/pdc-base.php index 2b0a114..350a3f0 100644 --- a/pdc-base.php +++ b/pdc-base.php @@ -4,7 +4,7 @@ * Plugin Name: Yard | PDC Base * Plugin URI: https://www.openwebconcept.nl/ * Description: Acts as foundation for other PDC 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.12 + * Version: 3.12.1 * 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 6b5ad8d..9c78d54 100644 --- a/src/Base/Foundation/Plugin.php +++ b/src/Base/Foundation/Plugin.php @@ -19,7 +19,7 @@ class Plugin * * @var string */ - public const VERSION = '3.12'; + public const VERSION = '3.12.1'; /** * Path to the root of the plugin. diff --git a/src/Base/RestAPI/SharedFields/ItemsField.php b/src/Base/RestAPI/SharedFields/ItemsField.php index a2cc499..dfdc258 100644 --- a/src/Base/RestAPI/SharedFields/ItemsField.php +++ b/src/Base/RestAPI/SharedFields/ItemsField.php @@ -6,10 +6,10 @@ namespace OWC\PDC\Base\RestAPI\SharedFields; -use WP_Post; -use OWC\PDC\Base\Support\Traits\QueryHelpers; -use OWC\PDC\Base\Support\Traits\CheckPluginActive; use OWC\PDC\Base\RestAPI\ItemFields\ConnectedField; +use OWC\PDC\Base\Support\Traits\CheckPluginActive; +use OWC\PDC\Base\Support\Traits\QueryHelpers; +use WP_Post; /** * Adds connected fields to item in API. @@ -36,7 +36,9 @@ public function create(WP_Post $post): array protected function extraQueryArgs(string $type): array { - $query = []; + $query = [ + 'p2p:per_page' => -1 + ]; $query = array_merge_recursive($query, $this->excludeInactiveItemsQuery());