If you want to see how WordPress handles the cleanup, check out wp_delete_term
.
Essentially, when a term is deleted WordPress will find all immediate child terms and set their parent to the parent of the deleted term.
If you want to see how WordPress handles the cleanup, check out wp_delete_term
.
Essentially, when a term is deleted WordPress will find all immediate child terms and set their parent to the parent of the deleted term.