在wordpress中获取帖子的类别

I need to use the content of a specific post in WordPress to update another system.

So if the WordPress Admin uses a specific category then I'll use the post info and send it to the other system.

I need to get the categories of the post inserted using wp_insert_post and check if the one I need where used.

All of these right at the moment the WP Admin user is creating a post.

get_categories() will retrive the array of category id and name