X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/76aea3697c6043c1613370f172395b4f65ee71f0..a5227bf01edbe6660486c9f5c0f0ed7b7fea3130:/wp-admin/post-new.php diff --git a/wp-admin/post-new.php b/wp-admin/post-new.php index f1f2da5b..93c4ffbc 100644 --- a/wp-admin/post-new.php +++ b/wp-admin/post-new.php @@ -1,19 +1,37 @@ true ) ) ) ) + $post_type = $_GET['post_type']; +else + wp_die( __('Invalid post type') ); -require_once ('./admin-header.php'); +if ( 'post' != $post_type ) { + $parent_file = "edit.php?post_type=$post_type"; + $submenu_file = "post-new.php?post_type=$post_type"; +} else { + $parent_file = 'edit.php'; + $submenu_file = 'post-new.php'; +} + +$post_type_object = get_post_type_object($post_type); -if ( ! current_user_can('edit_posts') ) { ?> +$title = $post_type_object->labels->add_new_item; + +$editing = true; + +if ( 'post' == $post_type && !current_user_can('edit_posts') ) { + include('./admin-header.php'); ?>

edit_posts capability to your user, in order to be authorized to post.
You can also e-mail the admin to ask for a promotion.
@@ -21,22 +39,18 @@ When you’re promoted, just reload this page and you’ll be able to bl

-

|

- - - -cap->edit_posts) ) { + $post = get_default_post_to_edit( $post_type, true ); + $post_ID = $post->ID; + include('edit-form-advanced.php'); +} -include('admin-footer.php'); -?> +include('./admin-footer.php'); +?> \ No newline at end of file