Recreate/Override/Modify the Categories dropdown
I currently have these categories in the "Categories" dropdown when you create a new discussion:
Parent 1 Child A Child B Child C Parent 2 Child D Child E
(Note that "Parent 1" and "Parent 2" are not selectable because I chose the appropriate setting in Dashboard. Only the children are selectable.)
Now, I'm writing a plugin and would like to be able to programmatically show only:
Parent 1 Child A Child B Child C
Parent 2 Child D Child E
...depending on some logic.
So, should I attempt to recreate the Categories box from scratch? But then I'll get the look but not the actual action of it. Or, can I somehow override the Categories dropdown? Or just programmatically delete the entries I don't want?