From 137366fca74dec8b1494f83d80746fec8737e294 Mon Sep 17 00:00:00 2001 From: TomJaeger Date: Thu, 5 Mar 2026 20:34:51 -0500 Subject: [PATCH 1/2] added new docs about a new category hook --- docs/control-panel/categories.md | 6 ++++++ .../extension-hooks/cp/admin-content.md | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/docs/control-panel/categories.md b/docs/control-panel/categories.md index 9f7977445..2b42072b6 100644 --- a/docs/control-panel/categories.md +++ b/docs/control-panel/categories.md @@ -19,6 +19,12 @@ Category groups are _collections_ of categories that can be assigned to channels ![Category Manager Control Panel Page](_images/cp-category-manager.png) +## Reorder Categories + +On the category listing screen, you can drag and drop categories to change order or nesting within the selected category group. + +When you save a reordered tree, ExpressionEngine validates the full reorder payload before writing changes. If the payload is incomplete, no partial reorder is saved. + ## Create/Edit Category **Control Panel Location: `Content > Categories > New/Edit Category`** diff --git a/docs/development/extension-hooks/cp/admin-content.md b/docs/development/extension-hooks/cp/admin-content.md index 0c89bce1b..e61a60d02 100755 --- a/docs/development/extension-hooks/cp/admin-content.md +++ b/docs/development/extension-hooks/cp/admin-content.md @@ -42,6 +42,20 @@ How it's called: ee()->extensions->call('category_save', $cat_id, $category_data); +## `category_reorder_end($changed_rows, $group_id)` + +| Parameter | Type | Description | +| --------------- | ------- | --------------------------------------------------------------------------- | +| \$changed_rows | `Array` | Changed category rows saved during reorder. Each row includes `cat_id`, `parent_id`, and `cat_order`. | +| \$group_id | `Int` | Category group ID being reordered | +| Returns | `Void` | | + +This hook is executed after category reordering is successfully saved in the Control Panel. It only runs after the reorder transaction completes and receives only the rows that changed. + +How it's called: + + ee()->extensions->call('category_reorder_end', $changed_rows, (int) $group_id); + ## `foreign_character_conversion_array` See Content_publish's `foreign_character_conversion_array`. From 52c94f13ff1ef880f0ba7a6c26054ddc45229d43 Mon Sep 17 00:00:00 2001 From: Tom Jaeger Date: Thu, 5 Mar 2026 20:37:35 -0500 Subject: [PATCH 2/2] Update reorder categories explanation Clarified the saving process for reordered categories. --- docs/control-panel/categories.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/control-panel/categories.md b/docs/control-panel/categories.md index 2b42072b6..afd202e9a 100644 --- a/docs/control-panel/categories.md +++ b/docs/control-panel/categories.md @@ -23,7 +23,7 @@ Category groups are _collections_ of categories that can be assigned to channels On the category listing screen, you can drag and drop categories to change order or nesting within the selected category group. -When you save a reordered tree, ExpressionEngine validates the full reorder payload before writing changes. If the payload is incomplete, no partial reorder is saved. +The category listing is saved as soon as you are done reordering, ExpressionEngine validates the full reorder payload before writing changes. If the payload is incomplete, no partial reorder is saved. ## Create/Edit Category