web/wp-admin/post-new.php
author ymh <ymh.work@gmail.com>
Mon, 22 Mar 2010 16:36:28 +0100
changeset 5 ac511f1ccc8e
parent 1 0d28b7c10758
permissions -rw-r--r--
add hgignore
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
0d28b7c10758 First commit
ymh
parents:
diff changeset
     1
<?php
0d28b7c10758 First commit
ymh
parents:
diff changeset
     2
/**
0d28b7c10758 First commit
ymh
parents:
diff changeset
     3
 * New Post Administration Panel.
0d28b7c10758 First commit
ymh
parents:
diff changeset
     4
 *
0d28b7c10758 First commit
ymh
parents:
diff changeset
     5
 * @package WordPress
0d28b7c10758 First commit
ymh
parents:
diff changeset
     6
 * @subpackage Administration
0d28b7c10758 First commit
ymh
parents:
diff changeset
     7
 */
0d28b7c10758 First commit
ymh
parents:
diff changeset
     8
0d28b7c10758 First commit
ymh
parents:
diff changeset
     9
/** Load WordPress Administration Bootstrap */
0d28b7c10758 First commit
ymh
parents:
diff changeset
    10
require_once('admin.php');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    11
$title = __('Add New Post');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    12
$parent_file = 'edit.php';
0d28b7c10758 First commit
ymh
parents:
diff changeset
    13
$editing = true;
0d28b7c10758 First commit
ymh
parents:
diff changeset
    14
wp_enqueue_script('autosave');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    15
wp_enqueue_script('post');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    16
if ( user_can_richedit() )
0d28b7c10758 First commit
ymh
parents:
diff changeset
    17
	wp_enqueue_script('editor');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    18
add_thickbox();
0d28b7c10758 First commit
ymh
parents:
diff changeset
    19
wp_enqueue_script('media-upload');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    20
wp_enqueue_script('word-count');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    21
0d28b7c10758 First commit
ymh
parents:
diff changeset
    22
if ( ! current_user_can('edit_posts') ) {
0d28b7c10758 First commit
ymh
parents:
diff changeset
    23
	require_once ('./admin-header.php'); ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    24
<div class="wrap">
0d28b7c10758 First commit
ymh
parents:
diff changeset
    25
<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 />
0d28b7c10758 First commit
ymh
parents:
diff changeset
    26
You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br />
0d28b7c10758 First commit
ymh
parents:
diff changeset
    27
When you&#8217;re promoted, just reload this page and you&#8217;ll be able to blog. :)'), get_option('admin_email')); ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    28
</p>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    29
</div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    30
<?php
0d28b7c10758 First commit
ymh
parents:
diff changeset
    31
	include('admin-footer.php');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    32
	exit();
0d28b7c10758 First commit
ymh
parents:
diff changeset
    33
}
0d28b7c10758 First commit
ymh
parents:
diff changeset
    34
0d28b7c10758 First commit
ymh
parents:
diff changeset
    35
// Show post form.
0d28b7c10758 First commit
ymh
parents:
diff changeset
    36
$post = get_default_post_to_edit();
0d28b7c10758 First commit
ymh
parents:
diff changeset
    37
include('edit-form-advanced.php');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    38
0d28b7c10758 First commit
ymh
parents:
diff changeset
    39
include('admin-footer.php');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    40
?>