Today I accidently happend to delete my category right after I've noticed there is no trash in categories. I wonder is there any way to include trash bin for it? I've made a little research over a wordpress documentation but didn't find anything like that. Does anyone know anything about that ? Is this possible?
This would be quite challenging to implement.
Posts can be trashed because:
- They have a concept of
statusand corresponding field in database table
- WordPress code "knows" to only deal with posts of appropriate status for most purposes
This solves issues of visibility (posts won't appear on front end) and interaction (trashed posts won't show up as belonging to a category and so on).
Taxonomies in general, including native categories, have no concept of status. They are always "on" until they are deleted.
Introducing concept of status to them would be extremely challenging to do cleanly. Just enumerating all the places where it would matter in core code would be a challenge. Overriding native behavior in all of those places might be straight impossible.
I could think of only one approach that could be reasonably practical: create a "virtual" taxonomy and whenever term is deleted "migrate" it to it, preserving all object assignments. Then undelete is possible by "migrating" it back to original taxonomy. Even these would probably be a lot of work to implement robustly.