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 ( 'post' == $post_type && !current_user_can('edit_posts') ) {
34 include('./admin-header.php'); ?>
36 <p><?php printf(__('Since you’re a newcomer, you’ll have to wait for an admin to add the <code>edit_posts</code> capability to your user, in order to be authorized to post.<br />
37 You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br />
38 When you’re promoted, just reload this page and you’ll be able to blog. :)'), get_option('admin_email')); ?>
42 include('./admin-footer.php');
46 wp_enqueue_script('autosave');
49 if ( current_user_can($post_type_object->cap->edit_posts) ) {
50 $post = get_default_post_to_edit( $post_type, true );
52 include('edit-form-advanced.php');
55 include('./admin-footer.php');