]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/post-new.php
Wordpress 2.6.2
[autoinstalls/wordpress.git] / wp-admin / post-new.php
1 <?php
2 require_once('admin.php');
3 $title = __('Create New Post');
4 $parent_file = 'post-new.php';
5 $editing = true;
6 wp_enqueue_script('autosave');
7 wp_enqueue_script('post');
8 if ( user_can_richedit() )
9         wp_enqueue_script('editor');
10 add_thickbox();
11 wp_enqueue_script('media-upload');
12 wp_enqueue_script('word-count');
13
14 require_once ('./admin-header.php');
15
16 if ( ! current_user_can('edit_posts') ) { ?>
17 <div class="wrap">
18 <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 />
19 You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br />
20 When you&#8217;re promoted, just reload this page and you&#8217;ll be able to blog. :)'), get_option('admin_email')); ?>
21 </p>
22 </div>
23 <?php
24         include('admin-footer.php');
25         exit();
26 }
27
28 if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>
29 <div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post'); ?></a> | <a href="post.php?action=edit&amp;post=<?php echo $_GET['posted']; ?>"><?php _e('Edit post'); ?></a></p></div>
30 <?php
31 endif;
32 ?>
33
34
35 <?php
36
37 // Show post form.
38 $post = get_default_post_to_edit();
39 include('edit-form-advanced.php');
40
41 include('admin-footer.php');
42 ?>