Line | |
---|
1 | <?php
|
---|
2 | /**
|
---|
3 | * New Post Administration Panel.
|
---|
4 | *
|
---|
5 | * @package WordPress
|
---|
6 | * @subpackage Administration
|
---|
7 | */
|
---|
8 |
|
---|
9 | /** Load WordPress Administration Bootstrap */
|
---|
10 | require_once('admin.php');
|
---|
11 | $title = __('Add New Post');
|
---|
12 | $parent_file = 'edit.php';
|
---|
13 | $editing = true;
|
---|
14 | wp_enqueue_script('autosave');
|
---|
15 | wp_enqueue_script('post');
|
---|
16 | if ( user_can_richedit() )
|
---|
17 | wp_enqueue_script('editor');
|
---|
18 | add_thickbox();
|
---|
19 | wp_enqueue_script('media-upload');
|
---|
20 | wp_enqueue_script('word-count');
|
---|
21 |
|
---|
22 | if ( ! current_user_can('edit_posts') ) {
|
---|
23 | require_once ('./admin-header.php'); ?>
|
---|
24 | <div class="wrap">
|
---|
25 | <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 />
|
---|
26 | You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br />
|
---|
27 | When you’re promoted, just reload this page and you’ll be able to blog. :)'), get_option('admin_email')); ?>
|
---|
28 | </p>
|
---|
29 | </div>
|
---|
30 | <?php
|
---|
31 | include('admin-footer.php');
|
---|
32 | exit();
|
---|
33 | }
|
---|
34 |
|
---|
35 | // Show post form.
|
---|
36 | $post = get_default_post_to_edit();
|
---|
37 | include('edit-form-advanced.php');
|
---|
38 |
|
---|
39 | include('admin-footer.php');
|
---|
40 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.