raw
mp-wp_genesis           1 <?php
mp-wp_genesis 2 /**
mp-wp_genesis 3 * Quick way to create a WordPress Post.
mp-wp_genesis 4 *
mp-wp_genesis 5 * @package WordPress
mp-wp_genesis 6 * @subpackage Administration
mp-wp_genesis 7 */
mp-wp_genesis 8
mp-wp_genesis 9 /**
mp-wp_genesis 10 * @var string
mp-wp_genesis 11 * @name $mode
mp-wp_genesis 12 */
mp-wp_genesis 13 $mode = 'sidebar';
mp-wp_genesis 14
mp-wp_genesis 15 /** WordPress Administration Bootstrap */
mp-wp_genesis 16 require_once('admin.php');
mp-wp_genesis 17
mp-wp_genesis 18 if ( ! current_user_can('edit_posts') )
mp-wp_genesis 19 wp_die(__('Cheatin&#8217; uh?'));
mp-wp_genesis 20
mp-wp_genesis 21 $post = get_default_post_to_edit();
mp-wp_genesis 22
mp-wp_genesis 23 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
mp-wp_genesis 24 <html xmlns="http://www.w3.org/1999/xhtml">
mp-wp_genesis 25 <head>
mp-wp_genesis 26 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('blog_charset'); ?>" />
mp-wp_genesis 27 <title><?php bloginfo('name') ?> &rsaquo; <?php _e('Sidebar'); ?></title>
mp-wp_genesis 28 <style type="text/css" media="screen">
mp-wp_genesis 29 body {
mp-wp_genesis 30 font-size: 0.9em;
mp-wp_genesis 31 margin: 0;
mp-wp_genesis 32 padding: 0;
mp-wp_genesis 33 }
mp-wp_genesis 34 form {
mp-wp_genesis 35 padding: 1%;
mp-wp_genesis 36 }
mp-wp_genesis 37 .tags-wrap p {
mp-wp_genesis 38 font-size: 0.75em;
mp-wp_genesis 39 margin-top: 0.4em;
mp-wp_genesis 40 }
mp-wp_genesis 41 .button-highlighted, #wphead, label {
mp-wp_genesis 42 font-weight: bold;
mp-wp_genesis 43 }
mp-wp_genesis 44 #post-title, #tags-input, #content {
mp-wp_genesis 45 width: 99%;
mp-wp_genesis 46 padding: 2px;
mp-wp_genesis 47 }
mp-wp_genesis 48 #wphead {
mp-wp_genesis 49 font-size: 1.4em;
mp-wp_genesis 50 background-color: #E4F2FD;
mp-wp_genesis 51 color: #555555;
mp-wp_genesis 52 padding: 0.2em 1%;
mp-wp_genesis 53 }
mp-wp_genesis 54 #wphead p {
mp-wp_genesis 55 margin: 3px;
mp-wp_genesis 56 }
mp-wp_genesis 57 .button {
mp-wp_genesis 58 font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
mp-wp_genesis 59 padding: 3px 5px;
mp-wp_genesis 60 margin-right: 5px;
mp-wp_genesis 61 font-size: 0.75em;
mp-wp_genesis 62 line-height: 1.5em;
mp-wp_genesis 63 border: 1px solid #80b5d0;
mp-wp_genesis 64 -moz-border-radius: 3px;
mp-wp_genesis 65 -khtml-border-radius: 3px;
mp-wp_genesis 66 -webkit-border-radius: 3px;
mp-wp_genesis 67 border-radius: 3px;
mp-wp_genesis 68 cursor: pointer;
mp-wp_genesis 69 background-color: #e5e5e5;
mp-wp_genesis 70 color: #246;
mp-wp_genesis 71 }
mp-wp_genesis 72 .button:hover {
mp-wp_genesis 73 border-color: #535353;
mp-wp_genesis 74 }
mp-wp_genesis 75 .updated {
mp-wp_genesis 76 background-color: #FFFBCC;
mp-wp_genesis 77 border: 1px solid #E6DB55;
mp-wp_genesis 78 margin-bottom: 1em;
mp-wp_genesis 79 padding: 0 0.6em;
mp-wp_genesis 80 }
mp-wp_genesis 81 .updated p {
mp-wp_genesis 82 margin: 0.6em;
mp-wp_genesis 83 }
mp-wp_genesis 84 </style>
mp-wp_genesis 85 </head>
mp-wp_genesis 86 <body id="sidebar">
mp-wp_genesis 87 <div id="wphead"><p><?php bloginfo('name') ?> &rsaquo; <?php _e('Sidebar'); ?></p></div>
mp-wp_genesis 88 <form name="post" action="post.php" method="post">
mp-wp_genesis 89 <div>
mp-wp_genesis 90 <input type="hidden" name="action" value="post" />
mp-wp_genesis 91 <input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
mp-wp_genesis 92 <input type="hidden" name="mode" value="sidebar" />
mp-wp_genesis 93 <input type="hidden" name="ping_status" value="<?php echo $post->ping_status; ?>" />
mp-wp_genesis 94 <input type="hidden" name="comment_status" value="<?php echo $post->comment_status; ?>" />
mp-wp_genesis 95 <?php wp_nonce_field('add-post');
mp-wp_genesis 96
mp-wp_genesis 97 if ( 'b' == $_GET['a'] )
mp-wp_genesis 98 echo '<div class="updated"><p>' . __('Post published.') . '</p></div>';
mp-wp_genesis 99 elseif ( 'c' == $_GET['a'] )
mp-wp_genesis 100 echo '<div class="updated"><p>' . __('Post saved.') . '</p></div>';
mp-wp_genesis 101 ?>
mp-wp_genesis 102 <p>
mp-wp_genesis 103 <label for="post-title"><?php _e('Title:'); ?></label>
mp-wp_genesis 104 <input type="text" name="post_title" id="post-title" size="20" tabindex="1" autocomplete="off" value="" />
mp-wp_genesis 105 </p>
mp-wp_genesis 106
mp-wp_genesis 107 <p>
mp-wp_genesis 108 <label for="content"><?php _e('Post:'); ?></label>
mp-wp_genesis 109 <textarea rows="8" cols="12" name="content" id="content" style="height:10em;line-height:1.4em;" tabindex="2"></textarea>
mp-wp_genesis 110 </p>
mp-wp_genesis 111
mp-wp_genesis 112 <div class="tags-wrap">
mp-wp_genesis 113 <label for="tags-input"><?php _e('Tags:') ?></label>
mp-wp_genesis 114 <input type="text" name="tags_input" id="tags-input" tabindex="3" value="" />
mp-wp_genesis 115 <p><?php _e('Separate tags with commas'); ?></p>
mp-wp_genesis 116 </div>
mp-wp_genesis 117
mp-wp_genesis 118 <p>
mp-wp_genesis 119 <input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" accesskey="s" class="button" value="<?php _e('Save as Draft'); ?>" />
mp-wp_genesis 120 <?php if ( current_user_can('publish_posts') ) : ?>
mp-wp_genesis 121 <input name="publish" type="submit" id="publish" tabindex="6" accesskey="p" value="<?php _e('Publish') ?>" class="button button-highlighted" />
mp-wp_genesis 122 <?php endif; ?>
mp-wp_genesis 123 </p>
mp-wp_genesis 124 </div>
mp-wp_genesis 125 </form>
mp-wp_genesis 126
mp-wp_genesis 127 </body>
mp-wp_genesis 128 </html>