2003-05-23 04:29:51 -04:00
|
|
|
<?php
|
2008-08-19 17:02:06 -04:00
|
|
|
/**
|
|
|
|
* Quick way to create a WordPress Post.
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Administration
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
* @name $mode
|
|
|
|
*/
|
2004-01-02 20:55:55 -05:00
|
|
|
$mode = 'sidebar';
|
2003-05-23 04:29:51 -04:00
|
|
|
|
2008-08-19 17:02:06 -04:00
|
|
|
/** WordPress Administration Bootstrap */
|
2005-02-24 13:47:21 -05:00
|
|
|
require_once('admin.php');
|
2003-05-23 04:29:51 -04:00
|
|
|
|
2005-07-17 15:29:55 -04:00
|
|
|
if ( ! current_user_can('edit_posts') )
|
2006-07-10 01:29:10 -04:00
|
|
|
wp_die(__('Cheatin’ uh?'));
|
2003-05-23 04:29:51 -04:00
|
|
|
|
2008-09-06 02:10:38 -04:00
|
|
|
$post = get_default_post_to_edit();
|
2003-05-23 04:29:51 -04:00
|
|
|
|
2004-06-11 15:28:30 -04:00
|
|
|
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
2003-05-23 04:29:51 -04:00
|
|
|
<head>
|
2005-02-13 23:36:57 -05:00
|
|
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('blog_charset'); ?>" />
|
2008-09-06 02:10:38 -04:00
|
|
|
<title><?php bloginfo('name') ?> › <?php _e('Sidebar'); ?></title>
|
2004-01-02 20:55:55 -05:00
|
|
|
<style type="text/css" media="screen">
|
2008-09-06 02:10:38 -04:00
|
|
|
body {
|
|
|
|
font-size: 0.9em;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
2004-01-02 20:55:55 -05:00
|
|
|
form {
|
2008-09-06 02:10:38 -04:00
|
|
|
padding: 1%;
|
|
|
|
}
|
|
|
|
.tags-wrap p {
|
|
|
|
font-size: 0.75em;
|
|
|
|
margin-top: 0.4em;
|
|
|
|
}
|
|
|
|
.button-highlighted, #wphead, label {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
#post-title, #tags-input, #content {
|
|
|
|
width: 99%;
|
|
|
|
padding: 2px;
|
2003-05-23 04:29:51 -04:00
|
|
|
}
|
2008-09-06 02:10:38 -04:00
|
|
|
#wphead {
|
|
|
|
font-size: 1.4em;
|
|
|
|
background-color: #E4F2FD;
|
|
|
|
color: #555555;
|
|
|
|
padding: 0.2em 1%;
|
2004-01-03 00:12:32 -05:00
|
|
|
}
|
2008-09-06 02:10:38 -04:00
|
|
|
#wphead p {
|
|
|
|
margin: 3px;
|
|
|
|
}
|
|
|
|
.button {
|
|
|
|
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
|
|
|
|
padding: 3px 5px;
|
|
|
|
margin-right: 5px;
|
|
|
|
font-size: 0.75em;
|
|
|
|
line-height: 1.5em;
|
|
|
|
border: 1px solid #80b5d0;
|
|
|
|
-moz-border-radius: 3px;
|
|
|
|
-khtml-border-radius: 3px;
|
|
|
|
-webkit-border-radius: 3px;
|
|
|
|
border-radius: 3px;
|
|
|
|
cursor: pointer;
|
|
|
|
background-color: #e5e5e5;
|
|
|
|
color: #246;
|
|
|
|
}
|
|
|
|
.button:hover {
|
|
|
|
border-color: #535353;
|
|
|
|
}
|
|
|
|
.updated {
|
|
|
|
background-color: #FFFBCC;
|
|
|
|
border: 1px solid #E6DB55;
|
|
|
|
margin-bottom: 1em;
|
|
|
|
padding: 0 0.6em;
|
|
|
|
}
|
|
|
|
.updated p {
|
|
|
|
margin: 0.6em;
|
2003-05-23 04:29:51 -04:00
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
2004-01-02 20:55:55 -05:00
|
|
|
<body id="sidebar">
|
2008-09-06 02:10:38 -04:00
|
|
|
<div id="wphead"><p><?php bloginfo('name') ?> › <?php _e('Sidebar'); ?></p></div>
|
2006-07-05 16:18:56 -04:00
|
|
|
<form name="post" action="post.php" method="post">
|
2008-03-26 19:41:41 -04:00
|
|
|
<div>
|
|
|
|
<input type="hidden" name="action" value="post" />
|
2003-05-23 04:29:51 -04:00
|
|
|
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
|
|
|
|
<input type="hidden" name="mode" value="sidebar" />
|
2008-09-06 02:10:38 -04:00
|
|
|
<input type="hidden" name="ping_status" value="<?php echo $post->ping_status; ?>" />
|
|
|
|
<input type="hidden" name="comment_status" value="<?php echo $post->comment_status; ?>" />
|
|
|
|
<?php wp_nonce_field('add-post');
|
|
|
|
|
|
|
|
if ( 'b' == $_GET['a'] )
|
|
|
|
echo '<div class="updated"><p>' . __('Post published.') . '</p></div>';
|
|
|
|
elseif ( 'c' == $_GET['a'] )
|
|
|
|
echo '<div class="updated"><p>' . __('Post saved.') . '</p></div>';
|
|
|
|
?>
|
|
|
|
<p>
|
|
|
|
<label for="post-title"><?php _e('Title:'); ?></label>
|
|
|
|
<input type="text" name="post_title" id="post-title" size="20" tabindex="1" autocomplete="off" value="" />
|
2004-01-02 20:55:55 -05:00
|
|
|
</p>
|
2008-09-06 02:10:38 -04:00
|
|
|
|
2004-01-02 20:55:55 -05:00
|
|
|
<p>
|
2008-09-06 02:10:38 -04:00
|
|
|
<label for="content"><?php _e('Post:'); ?></label>
|
|
|
|
<textarea rows="8" cols="12" name="content" id="content" style="height:10em;line-height:1.4em;" tabindex="2"></textarea>
|
2004-01-02 20:55:55 -05:00
|
|
|
</p>
|
2008-09-06 02:10:38 -04:00
|
|
|
|
|
|
|
<div class="tags-wrap">
|
|
|
|
<label for="tags-input"><?php _e('Tags:') ?></label>
|
|
|
|
<input type="text" name="tags_input" id="tags-input" tabindex="3" value="" />
|
|
|
|
<p><?php _e('Separate tags with commas'); ?></p>
|
|
|
|
</div>
|
|
|
|
|
2004-01-02 20:55:55 -05:00
|
|
|
<p>
|
2008-09-06 02:10:38 -04:00
|
|
|
<input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" accesskey="s" class="button" value="<?php _e('Save as Draft'); ?>" />
|
2005-12-04 22:38:35 -05:00
|
|
|
<?php if ( current_user_can('publish_posts') ) : ?>
|
2008-09-06 02:10:38 -04:00
|
|
|
<input name="publish" type="submit" id="publish" tabindex="6" accesskey="p" value="<?php _e('Publish') ?>" class="button button-highlighted" />
|
2005-12-04 22:38:35 -05:00
|
|
|
<?php endif; ?>
|
2004-01-02 20:55:55 -05:00
|
|
|
</p>
|
2003-05-23 04:29:51 -04:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</body>
|
2004-01-02 20:55:55 -05:00
|
|
|
</html>
|