Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/post-new.php

    r16135 r14713  
    3131$editing = true;
    3232
    33 if ( ! current_user_can( $post_type_object->cap->edit_posts ) )
    34     wp_die( __( 'Cheatin’ uh?' ) );
     33if ( 'post' == $post_type && !current_user_can('edit_posts') ) {
     34    include('./admin-header.php'); ?>
     35<div class="wrap">
     36<p><?php printf(__('Since you&#8217;re a newcomer, you&#8217;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 />
     37You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br />
     38When you&#8217;re promoted, just reload this page and you&#8217;ll be able to blog. :)'), get_option('admin_email')); ?>
     39</p>
     40</div>
     41<?php
     42    include('./admin-footer.php');
     43    exit();
     44}
    3545
    3646wp_enqueue_script('autosave');
    3747
    3848// Show post form.
    39 $post = get_default_post_to_edit( $post_type, true );
    40 $post_ID = $post->ID;
    41 include('edit-form-advanced.php');
     49if ( current_user_can($post_type_object->cap->edit_posts) ) {
     50    $post = get_default_post_to_edit( $post_type, true );
     51    $post_ID = $post->ID;
     52    include('edit-form-advanced.php');
     53}
     54
    4255include('./admin-footer.php');
    4356?>
Note: See TracChangeset for help on using the changeset viewer.