Site icon Hip-Hop Website Design and Development

Get post type on edit page

I am writing the backend for my theme and have 4 custom post types. I have registered them all and now I am writing the metaboxes and handlers.

My question is: in WordPress admin, is there a way of determining which custom post type you’re editing? i.e. lets say I have a custom post type of Testimonials, I click Add New and am presented with various fields. Is there a function in WordPress that will tell me what this post type is?

I’ve tried get_post_type(), but it returns nothing.