3 * Quick way to create a WordPress Post.
6 * @subpackage Administration
15 /** WordPress Administration Bootstrap */
16 require_once('admin.php');
18 if ( ! current_user_can('edit_posts') )
19 wp_die(__('Cheatin’ uh?'));
21 $post = get_default_post_to_edit();
23 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
24 <html xmlns="http://www.w3.org/1999/xhtml">
26 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('blog_charset'); ?>" />
27 <title><?php bloginfo('name') ?> › <?php _e('Sidebar'); ?></title>
28 <style type="text/css" media="screen">
41 .button-highlighted, #wphead, label {
44 #post-title, #tags-input, #content {
50 background-color: #E4F2FD;
58 font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
63 border: 1px solid #80b5d0;
64 -moz-border-radius: 3px;
65 -khtml-border-radius: 3px;
66 -webkit-border-radius: 3px;
69 background-color: #e5e5e5;
73 border-color: #535353;
76 background-color: #FFFBCC;
77 border: 1px solid #E6DB55;
87 <div id="wphead"><p><?php bloginfo('name') ?> › <?php _e('Sidebar'); ?></p></div>
88 <form name="post" action="post.php" method="post">
90 <input type="hidden" name="action" value="post" />
91 <input type="hidden" name="user_ID" value="<?php echo esc_attr($user_ID) ?>" />
92 <input type="hidden" name="mode" value="sidebar" />
93 <input type="hidden" name="ping_status" value="<?php echo esc_attr($post->ping_status); ?>" />
94 <input type="hidden" name="comment_status" value="<?php echo esc_attr($post->comment_status); ?>" />
95 <?php wp_nonce_field('add-post');
97 if ( 'b' == $_GET['a'] )
98 echo '<div class="updated"><p>' . __('Post published.') . '</p></div>';
99 elseif ( 'c' == $_GET['a'] )
100 echo '<div class="updated"><p>' . __('Post saved.') . '</p></div>';
103 <label for="post-title"><?php _e('Title:'); ?></label>
104 <input type="text" name="post_title" id="post-title" size="20" tabindex="1" autocomplete="off" value="" />
108 <label for="content"><?php _e('Post:'); ?></label>
109 <textarea rows="8" cols="12" name="content" id="content" style="height:10em;line-height:1.4em;" tabindex="2"></textarea>
112 <div class="tags-wrap">
113 <label for="tags-input"><?php _e('Tags:') ?></label>
114 <input type="text" name="tags_input" id="tags-input" tabindex="3" value="" />
115 <p><?php _e('Separate tags with commas'); ?></p>
119 <input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" accesskey="s" class="button" value="<?php esc_attr_e('Save as Draft'); ?>" />
120 <?php if ( current_user_can('publish_posts') ) : ?>
121 <input name="publish" type="submit" id="publish" tabindex="6" accesskey="p" value="<?php esc_attr_e('Publish') ?>" class="button button-highlighted" />