bricks_delete_class_category
Overview
Deletes a global class category from the Bricks design system. Classes that were assigned to this category become uncategorized (they are not deleted, only their category association is removed).
This is useful when consolidating or reorganizing the category structure. The classes themselves remain fully functional and retain all their CSS settings.
Key Features
When to Use
When merging two categories (move classes to another category first, then delete the empty one)
When cleaning up categories created by mistake
When NOT to Use
When you want to rename a category — there is no rename tool; create a new category and reassign classes
Parameters
category_idstringREQUIREDCode Examples
Delete an obsolete category
Removes a category that is no longer needed. Classes previously in this category become uncategorized but retain all their CSS settings.
// Delete an obsolete category
bricks_delete_class_category({
category_id: "cat05"
}){
"message": "Category 'Old Utilities' deleted. 3 classes are now uncategorized."
}Common Mistakes
// Expecting this to delete all "Old" classes
bricks_delete_class_category({ category_id: "cat05" })
// Classes still exist, just uncategorized!// To remove classes AND category:
// 1. Find classes in category
bricks_get_global_classes({ category: "Old Utilities" })
// 2. Delete each class
bricks_delete_global_class({ class_id: "..." })
// 3. Then delete the empty category
bricks_delete_class_category({ category_id: "cat05" })Tips & Warnings
Important: This only removes the category grouping — all classes in the category are preserved and become uncategorized. They retain all CSS settings and continue to work normally.
Best practice: Before deleting a category, use bricks_update_global_class to move important classes to another category. Then delete the now-empty category.