- $post_id = 0;
-$post_ID = $post_id;
-$post = null;
-$post_type_object = null;
-$post_type = null;
-if ( $post_id ) {
- $post = get_post($post_id);
- if ( $post ) {
- $post_type_object = get_post_type_object($post->post_type);
- if ( $post_type_object ) {
- $post_type = $post->post_type;
- $current_screen->post_type = $post->post_type;
- $current_screen->id = $current_screen->post_type;
- }
- }
-} elseif ( isset($_POST['post_type']) ) {
- $post_type_object = get_post_type_object($_POST['post_type']);
- if ( $post_type_object ) {
- $post_type = $post_type_object->name;
- $current_screen->post_type = $post_type;
- $current_screen->id = $current_screen->post_type;
- }
+ $post_id = $post_ID = 0;
+
+$post = $post_type = $post_type_object = null;
+
+if ( $post_id )
+ $post = get_post( $post_id );
+
+if ( $post ) {
+ $post_type = $post->post_type;
+ $post_type_object = get_post_type_object( $post_type );