3 * New Post Administration Panel.
6 * @subpackage Administration
9 /** Load WordPress Administration Bootstrap */
10 require_once('./admin.php');
12 if ( !isset($_GET['post_type']) )
14 elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) )
15 $post_type = $_GET['post_type'];
17 wp_die( __('Invalid post type') );
19 if ( 'post' != $post_type ) {
20 $parent_file = "edit.php?post_type=$post_type";
21 $submenu_file = "post-new.php?post_type=$post_type";
23 $parent_file = 'edit.php';
24 $submenu_file = 'post-new.php';
27 $post_type_object = get_post_type_object($post_type);
29 $title = $post_type_object->labels->add_new_item;
33 if ( ! current_user_can( $post_type_object->cap->edit_posts ) )
34 wp_die( __( 'Cheatin’ uh?' ) );
36 wp_enqueue_script('autosave');
39 $post = get_default_post_to_edit( $post_type, true );
41 include('edit-form-advanced.php');
42 include('./admin-footer.php');