Filter post’s category options with hook

  php, wordpress, wordpress-plugin-creation

On the post edit page I have a category selection box. I would like to filter the displayed categories. How can I do this in PHP? I’ve tried finding the source of this box in the wordpress-src directory, but haven’t had any luck. Can I hook into this and filter what’s displayed?

enter image description here

Source: Ask PHP