From f26beb3b2a15ec021ab447843b28cb4f192110fb Mon Sep 17 00:00:00 2001
From: "aurelie.foucher" <aurelie.foucher@avecnous.eu>
Date: Mon, 17 Mar 2025 16:32:36 +0100
Subject: [PATCH 1/2] fix if many post_type

---
 mindcat/inc/class-mindcat.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mindcat/inc/class-mindcat.php b/mindcat/inc/class-mindcat.php
index 36ffad2..08675cf 100644
--- a/mindcat/inc/class-mindcat.php
+++ b/mindcat/inc/class-mindcat.php
@@ -297,7 +297,7 @@ class MindCat{
                 if (isset($this->current_cat) && is_object($this->current_cat)) {
                     // get all post types associated to taxonomy $this->current_cat->taxonomy
                     $post_types = get_taxonomy($this->current_cat->taxonomy)->object_type;
-                    $parsed_block['attrs']['query']['postType'] = implode(',', $post_types);
+                    $parsed_block['attrs']['query']['postType'] = $post_types[0];
                     $parsed_block['attrs']['query']['taxQuery'] = [
                         $this->current_cat->taxonomy => [$this->current_cat->term_id]
                     ];
-- 
GitLab


From deebd55f92c26399ddb1b7f89b6528ccea890941 Mon Sep 17 00:00:00 2001
From: "aurelie.foucher" <aurelie.foucher@avecnous.eu>
Date: Mon, 17 Mar 2025 16:39:36 +0100
Subject: [PATCH 2/2] bump to 2.2.1

---
 CHANGELOG.md                  | 4 ++++
 README.md                     | 2 +-
 mindcat/inc/views/mindmap.php | 2 +-
 mindcat/mindcat.php           | 2 +-
 src/list/block.json           | 2 +-
 src/mindmap/block.json        | 2 +-
 6 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4f625a5..5ec1b59 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 ## Changelog
 
+### 2.2.1
+
+- Use first post_type in show publication context
+
 ### 2.2.0
 
 - Add option "show posts" in `mindcat/list` block
diff --git a/README.md b/README.md
index 213422d..74b698a 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ Author URI:  https://apps.avecnous.eu/produit/cat-heuristique/?mtm_campaign=wp-p
 Tags: categories, category, mindmap, widget  
 Requires at least: 5.9  
 Tested up to: 6.7 
-Stable tag: 2.2.0  
+Stable tag: 2.2.1  
 License: GPLv2  
 License URI: https://www.gnu.org/licenses/gpl-2.0.html
 
diff --git a/mindcat/inc/views/mindmap.php b/mindcat/inc/views/mindmap.php
index ca3d0f4..6ec9369 100644
--- a/mindcat/inc/views/mindmap.php
+++ b/mindcat/inc/views/mindmap.php
@@ -4,7 +4,7 @@
 *
 * @package     MindCat
 * @subpackage  MindCat/Views
-* @version     2.2.0
+* @version     2.2.1
 * @since       1.0.0
 */
 
diff --git a/mindcat/mindcat.php b/mindcat/mindcat.php
index f9d3b8f..f449c8e 100644
--- a/mindcat/mindcat.php
+++ b/mindcat/mindcat.php
@@ -2,7 +2,7 @@
 /*
  * Plugin Name: MindCat
  * Plugin URI: https://apps.avecnous.eu/produit/cat-heuristique/?mtm_campaign=wp-plugin&mtm_kwd=mindcat&mtm_medium=wp-repo&mtm_source=dashboard
- * Version: 2.2.0
+ * Version: 2.2.1
  * Description: Displays categories and subcategories as a mindmap
  * Author: N.O.U.S. Open Useful and Simple
  * Author URI: https://apps.avecnous.eu/produit/cat-heuristique/?mtm_campaign=wp-plugin&mtm_kwd=mindcat&mtm_medium=wp-repo&mtm_source=author
diff --git a/src/list/block.json b/src/list/block.json
index 37c1ef1..f127e53 100644
--- a/src/list/block.json
+++ b/src/list/block.json
@@ -2,7 +2,7 @@
     "$schema": "https://schemas.wp.org/trunk/block.json",
     "apiVersion": 2,
     "name": "mindcat/list",
-    "version": "2.2.0",
+    "version": "2.2.1",
     "title": "List of taxonomy terms",
     "category": "text",
     "attributes": {
diff --git a/src/mindmap/block.json b/src/mindmap/block.json
index 27c84a4..e715be3 100644
--- a/src/mindmap/block.json
+++ b/src/mindmap/block.json
@@ -2,7 +2,7 @@
     "$schema": "https://schemas.wp.org/trunk/block.json",
     "apiVersion": 2,
     "name": "mindcat/mindmap",
-    "version": "2.2.0",
+    "version": "2.2.1",
     "title": "Mindmap of taxonomies",
     "category": "widgets",
     "icon": "screenoptions",
-- 
GitLab