From 6df8d84067744ed64d6029d83e5131560901a02b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Feb 2026 23:10:56 +0000 Subject: [PATCH 1/3] Initial plan From 24be0e54da4d5dc9264e6ae9442a0ecd7a1df29a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Feb 2026 23:14:45 +0000 Subject: [PATCH 2/3] Add term_group to default fields in Term_Command Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --- features/term.feature | 18 ++++++++++++++++++ src/Term_Command.php | 12 +++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/features/term.feature b/features/term.feature index c7378de7c..a8aad1f9f 100644 --- a/features/term.feature +++ b/features/term.feature @@ -280,3 +280,21 @@ Feature: Manage WordPress terms """ Success: Term updated. """ + + Scenario: Term list includes term_group field + When I run `wp term create category 'Group Test' --slug=group-test --description='Test term_group field'` + Then STDOUT should not be empty + + When I run `wp term list category --format=csv --fields=name,term_group` + Then STDOUT should contain: + """ + term_group + """ + + When I run `wp term list category --format=json` + Then STDOUT should be JSON containing: + """ + [{ + "term_group":0 + }] + """ diff --git a/src/Term_Command.php b/src/Term_Command.php index ec47ae83c..d3b20a198 100644 --- a/src/Term_Command.php +++ b/src/Term_Command.php @@ -47,6 +47,7 @@ class Term_Command extends WP_CLI_Command { 'description', 'parent', 'count', + 'term_group', ]; /** @@ -90,6 +91,7 @@ class Term_Command extends WP_CLI_Command { * * description * * parent * * count + * * term_group * * These fields are optionally available: * @@ -99,11 +101,11 @@ class Term_Command extends WP_CLI_Command { * * # List post categories * $ wp term list category --format=csv - * term_id,term_taxonomy_id,name,slug,description,parent,count - * 2,2,aciform,aciform,,0,1 - * 3,3,antiquarianism,antiquarianism,,0,1 - * 4,4,arrangement,arrangement,,0,1 - * 5,5,asmodeus,asmodeus,,0,1 + * term_id,term_taxonomy_id,name,slug,description,parent,count,term_group + * 2,2,aciform,aciform,,0,1,0 + * 3,3,antiquarianism,antiquarianism,,0,1,0 + * 4,4,arrangement,arrangement,,0,1,0 + * 5,5,asmodeus,asmodeus,,0,1,0 * * # List post tags * $ wp term list post_tag --fields=name,slug From b691de1877c2c34723ba4f6e2f0066a0f2a6b53e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 02:13:05 +0000 Subject: [PATCH 3/3] Make term_group an optionally available field instead of default Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --- features/term.feature | 4 ++-- src/Term_Command.php | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/features/term.feature b/features/term.feature index a8aad1f9f..574d11219 100644 --- a/features/term.feature +++ b/features/term.feature @@ -281,7 +281,7 @@ Feature: Manage WordPress terms Success: Term updated. """ - Scenario: Term list includes term_group field + Scenario: Term list includes term_group as optional field When I run `wp term create category 'Group Test' --slug=group-test --description='Test term_group field'` Then STDOUT should not be empty @@ -291,7 +291,7 @@ Feature: Manage WordPress terms term_group """ - When I run `wp term list category --format=json` + When I run `wp term list category --format=json --fields=term_id,name,term_group` Then STDOUT should be JSON containing: """ [{ diff --git a/src/Term_Command.php b/src/Term_Command.php index d3b20a198..4927512d7 100644 --- a/src/Term_Command.php +++ b/src/Term_Command.php @@ -47,7 +47,6 @@ class Term_Command extends WP_CLI_Command { 'description', 'parent', 'count', - 'term_group', ]; /** @@ -91,21 +90,21 @@ class Term_Command extends WP_CLI_Command { * * description * * parent * * count - * * term_group * * These fields are optionally available: * + * * term_group * * url * * ## EXAMPLES * * # List post categories * $ wp term list category --format=csv - * term_id,term_taxonomy_id,name,slug,description,parent,count,term_group - * 2,2,aciform,aciform,,0,1,0 - * 3,3,antiquarianism,antiquarianism,,0,1,0 - * 4,4,arrangement,arrangement,,0,1,0 - * 5,5,asmodeus,asmodeus,,0,1,0 + * term_id,term_taxonomy_id,name,slug,description,parent,count + * 2,2,aciform,aciform,,0,1 + * 3,3,antiquarianism,antiquarianism,,0,1 + * 4,4,arrangement,arrangement,,0,1 + * 5,5,asmodeus,asmodeus,,0,1 * * # List post tags * $ wp term list post_tag --fields=name,slug