Make WordPress Core


Ignore:
Timestamp:
08/20/2008 09:42:31 PM (16 years ago)
Author:
ryan
Message:

Collapse crazyhorse to trunk. Incoming! see #7552

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r8656 r8691  
    2222$messages[3] = __('Custom field deleted.');
    2323$messages[4] = __('Post updated.');
     24$messages[6] = __('Post published.');
     25$messages[7] = __('Post saved.');
    2426
    2527if ( isset($_GET['revision']) )
     
    5355
    5456?>
    55 <?php if ( $notice ) : ?>
    56 <div id="notice" class="error"><p><?php echo $notice ?></p></div>
    57 <?php endif; ?>
    58 <?php if (isset($_GET['message'])) : ?>
    59 <div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
    60 <?php endif; ?>
    6157
    6258<form name="post" action="post.php" method="post" id="post">
    63 <?php if ( (isset($mode) && 'bookmarklet' == $mode) || isset($_GET['popupurl']) ): ?>
    64 <input type="hidden" name="mode" value="bookmarklet" />
    65 <?php endif; ?>
    66 
    67 <div class="wrap">
    68 <h2><?php _e('Write Post') ?></h2>
    69 <?php
    70 
    71 if ( 0 == $post_ID)
    72     wp_nonce_field('add-post');
    73 else
    74     wp_nonce_field('update-post_' .  $post_ID);
    75 
    76 $form_pingback = '<input type="hidden" name="post_pingback" value="' . (int) get_option('default_pingback_flag') . '" id="post_pingback" />';
    77 
    78 $form_prevstatus = '<input type="hidden" name="prev_status" value="' . attribute_escape( $post->post_status ) . '" />';
    79 
    80 $saveasdraft = '<input name="save" type="submit" id="save" class="button" tabindex="3" value="' . attribute_escape( __('Save and Continue Editing') ) . '" />';
    81 
    82 ?>
    83 
    84 <input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
    85 <input type="hidden" id="hiddenaction" name="action" value="<?php echo $form_action ?>" />
    86 <input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" />
    87 <input type="hidden" id="post_author" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" />
    88 <input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
    89 <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
    90 <input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
    91 <?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
    92 
    93 <?php echo $form_extra ?>
    94 
    95 <div id="poststuff">
    96 
     59<div id="wpbody-content">
     60
     61
     62<?php
     63
     64// All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action).
     65
     66function post_submit_meta_box($post) {
     67    global $action;
     68?>
    9769<div class="submitbox" id="submitpost">
    9870
    99 <div id="previewview">
    100 <?php if ( 'publish' == $post->post_status ) { ?>
    101 <a href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Post'); ?></a>
    102 <?php } elseif ( 'edit' == $action ) { ?>
    103 <a href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank"  tabindex="4"><?php _e('Preview this Post'); ?></a>
    104 <?php } ?>
    105 </div>
    106 
    107 <div class="inside">
     71
     72
     73<div class="inside-submitbox">
    10874
    10975<p><strong><label for='post_status'><?php _e('Publish Status') ?></label></strong></p>
     
    13197<?php endif; ?>
    13298<?php
    133 if ( 0 != $post_ID ) {
     99if ( 0 != $post->ID ) {
    134100    if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
    135101        $stamp = __('Scheduled for:<br />%1$s at %2$s');
     
    162128<input type="submit" name="save" id="save-post" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" />
    163129<?php
    164 if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) {
     130if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post->ID ) {
    165131?>
    166132<?php if ( current_user_can('publish_posts') ) : ?>
     
    172138}
    173139
    174 if ( ( 'edit' == $action) && current_user_can('delete_post', $post_ID) )
    175     echo "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post_ID", 'delete-post_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n  'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n  'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;post') . "</a>";
     140if ( ( 'edit' == $action) && current_user_can('delete_post', $post->ID) )
     141    echo "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n  'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n  'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;post') . "</a>";
    176142?>
    177143<br class="clear" />
    178 <?php if ( 0 != $post_ID ): ?>
    179 <?php if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) {
     144
     145<!-- moved under the editor
     146<?php if ( 0 != $post->ID ): ?>
     147<?php if ( $last_id = get_post_meta($post->ID, '_edit_last', true) ) {
    180148    $last_user = get_userdata($last_id);
    181149    printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
     
    186154<br class="clear" />
    187155<?php endif; ?>
    188 <span id="autosave"></span>
    189 <span id="wp-word-count"></span>
     156-->
     157
    190158</p>
    191 
    192 <div class="side-info">
    193 <h5><?php _e('Related') ?></h5>
    194 
    195 <ul>
    196 <?php if ( 0 != $post_ID ): ?>
    197 <li><a href="edit.php?p=<?php echo $post_ID ?>"><?php _e('See Comments on this Post') ?></a></li>
    198 <?php endif; ?>
    199 <li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li>
    200 <li><a href="edit.php"><?php _e('Manage All Posts') ?></a></li>
    201 <li><a href="categories.php"><?php _e('Manage All Categories') ?></a></li>
    202 <li><a href="edit-tags.php"><?php _e('Manage All Tags') ?></a></li>
    203 <li><a href="edit.php?post_status=draft"><?php _e('View Drafts'); ?></a></li>
    204 <?php do_action('post_relatedlinks_list'); ?>
    205 </ul>
    206 
    207 <h5><?php _e('Shortcuts') ?></h5>
    208 <p><?php _e('Drag-and-drop the following link to your bookmarks bar or right click it and add it to your favorites for a posting shortcut.') ?>  <a href="<?php echo get_shortcut_link(); ?>" title="<?php echo attribute_escape(__('Press This')) ?>"><?php _e('Press This') ?></a></p>
    209 </div>
    210 
    211 <?php do_action('submitpost_box'); ?>
    212 </div>
    213 
    214 <div id="post-body">
    215 <div id="titlediv">
    216 <h3><label for="title"><?php _e('Title') ?></label></h3>
    217 <div id="titlewrap">
    218     <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape($post->post_title); ?>" id="title" autocomplete="off" />
    219 </div>
    220 <div class="inside">
    221 <?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
    222     <div id="edit-slug-box">
    223 <?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
    224     echo $sample_permalink_html;
    225 endif; ?>
    226     </div>
    227 </div>
    228 </div>
    229 
    230 <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
    231 <h3><label for="content"><?php _e('Post') ?></label></h3>
    232 <?php the_editor($post->post_content); ?>
    233 <?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
    234 <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
    235 <?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?>
    236 <?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?>
    237 </div>
    238 
    239 <?php echo $form_pingback ?>
    240 <?php echo $form_prevstatus ?>
    241 
    242 <?php
     159</div>
     160<?php
     161}
     162add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', 'post', 'side', 'core');
     163
    243164function post_tags_meta_box($post) {
    244165?>
    245166<p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p>
    246167<div id="tagchecklist"></div>
    247 <?php
    248 }
    249 add_meta_box('tagsdiv', __('Tags'), 'post_tags_meta_box', 'post', 'normal', 'core');
     168<p><a href='#'><?php _e( 'Choose from tags' ); ?></a></p>
     169<?php
     170}
     171add_meta_box('tagsdiv', __('Tags'), 'post_tags_meta_box', 'post', 'side', 'core');
     172
     173function post_media_meta_box($post) {
     174    echo "<p><small><em>This feature isn't fully functional in this prototype.</em></small></p>";
     175
     176    if ( empty( $post->ID ) )
     177        return;
     178
     179    $atts = get_children( array(
     180        'post_parent' => $post->ID,
     181        'post_type' => 'attachment'
     182    ) );
     183
     184    if ( !$atts ) {
     185        _e( 'No media.' );
     186        return;
     187    }
     188
     189    foreach ( $atts as $att ) {
     190        if ( $thumb = wp_get_attachment_image( $att->ID, array(60, 45), true ) ) {
     191?>
     192            <a href="media.php?action=edit&amp;attachment_id=<?php echo $att->ID  ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att->post_title)); ?>">
     193                <?php echo $thumb; ?>
     194            </a>
     195
     196<?php
     197        }
     198        echo "<h4>$att->post_title</h4>";
     199
     200        echo "<a href='#' class='no-crazy'>Remove</a> | ";
     201        echo "<a href='media.php?action=edit&amp;attachment_id=$att->ID'>Edit</a>";
     202
     203        echo "<br class='clear' />";
     204    }
     205
     206}
     207add_meta_box( 'mediadiv', __('Media added to this Post' ), 'post_media_meta_box', 'post', 'side', 'core' );
    250208
    251209function post_categories_meta_box($post) {
    252210?>
     211<ul id="category-tabs">
     212    <li class="ui-tabs-selected"><a href="#categories-all" tabindex="3"><?php _e( 'All Categories' ); ?></a></li>
     213    <li class="wp-no-js-hidden"><a href="#categories-pop" tabindex="3"><?php _e( 'Most Used' ); ?></a></li>
     214</ul>
     215
     216<div id="categories-pop" class="ui-tabs-panel" style="display: none;">
     217    <ul id="categorychecklist-pop" class="categorychecklist form-no-clear" >
     218        <?php $popular_ids = wp_popular_terms_checklist('category'); ?>
     219    </ul>
     220</div>
     221
     222<div id="categories-all" class="ui-tabs-panel">
     223    <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
     224        <?php wp_category_checklist($post->ID, false, false, $popular_ids) ?>
     225    </ul>
     226</div>
     227
    253228<div id="category-adder" class="wp-hidden-children">
    254229    <h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a></h4>
     
    262237</div>
    263238
    264 <ul id="category-tabs">
    265     <li class="ui-tabs-selected"><a href="#categories-all" tabindex="3"><?php _e( 'All Categories' ); ?></a></li>
    266     <li class="wp-no-js-hidden"><a href="#categories-pop" tabindex="3"><?php _e( 'Most Used' ); ?></a></li>
    267 </ul>
    268 
    269 <div id="categories-pop" class="ui-tabs-panel" style="display: none;">
    270     <ul id="categorychecklist-pop" class="categorychecklist form-no-clear" >
    271         <?php $popular_ids = wp_popular_terms_checklist('category'); ?>
    272     </ul>
    273 </div>
    274 
    275 <div id="categories-all" class="ui-tabs-panel">
    276     <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
    277         <?php wp_category_checklist($post->ID, false, false, $popular_ids) ?>
    278     </ul>
    279 </div>
    280 <?php
    281 }
    282 add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'post', 'normal', 'core');
    283 ?>
    284 
    285 <?php do_meta_boxes('post', 'normal', $post); ?>
    286 
    287 <?php do_action('edit_form_advanced'); ?>
    288 
    289 <h2><?php _e('Advanced Options'); ?></h2>
    290 
    291 <?php
     239<?php
     240}
     241add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'post', 'side', 'core');
     242
    292243function post_excerpt_meta_box($post) {
    293244?>
     
    296247<?php
    297248}
    298 add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 'post', 'advanced', 'core');
     249add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 'post', 'normal', 'core');
    299250
    300251function post_trackback_meta_box($post) {
     
    310261
    311262?>
     263<p class="meta-options">
     264    <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a> on this post') ?></label>
     265</p>
    312266<p><label for="trackback"><?php _e('Send trackbacks to:'); ?></label> <?php echo $form_trackback; ?><br /> (<?php _e('Separate multiple URLs with spaces'); ?>)</p>
    313267<p><?php _e('Trackbacks are a way to notify legacy blog systems that you&#8217;ve linked to them. If you link other WordPress blogs they&#8217;ll be notified automatically using <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">pingbacks</a>, no other action necessary.'); ?></p>
     
    316270    echo $pings;
    317271}
    318 add_meta_box('trackbacksdiv', __('Trackbacks'), 'post_trackback_meta_box', 'post', 'advanced', 'core');
     272add_meta_box('trackbacksdiv', __('Trackbacks and Pings'), 'post_trackback_meta_box', 'post', 'normal', 'core');
    319273
    320274function post_custom_meta_box($post) {
     
    336290<?php
    337291}
    338 add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', 'post', 'advanced', 'core');
     292add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', 'post', 'normal', 'core');
    339293
    340294do_action('dbx_post_advanced');
    341295
    342296function post_comment_status_meta_box($post) {
     297    global $wpdb, $post_ID;
    343298?>
    344299<input name="advanced_view" type="hidden" value="1" />
    345 <p><label for="comment_status" class="selectit">
    346 <input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> />
    347 <?php _e('Allow Comments') ?></label></p>
    348 <p><label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label></p>
    349 <p><?php _e('These settings apply to this post only. &#8220;Pings&#8221; are <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a>.'); ?></p>
    350 <?php
    351 }
    352 add_meta_box('commentstatusdiv', __('Comments &amp; Pings'), 'post_comment_status_meta_box', 'post', 'advanced', 'core');
     300<p class="meta-options">
     301    <label for="comment_status" class="selectit"> <input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /><?php _e('Allow comments on this post') ?></label>
     302</p>
     303<?php
     304
     305
     306    if ( !$post_ID || $post_ID < 0 )
     307        return;
     308
     309    if ( !$comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved != 'spam' ORDER BY comment_date", $post_ID) ) )
     310        return;
     311
     312    // Make sure comments, post, and post_author are cached
     313//  update_comment_cache($comments);
     314?>
     315
     316<table class="widefat">
     317<thead>
     318    <tr>
     319        <th scope="col"><?php _e('Comments') ?></th>
     320        <th scope="col"><?php _e('Submitted') ?></th>
     321    </tr>
     322</thead>
     323<tbody id="the-comment-list" class="list:comment">
     324<?php
     325    foreach ($comments as $comment)
     326        _wp_comment_row( $comment, 'single', false, false );
     327?>
     328</tbody>
     329</table>
     330
     331
     332<?php
     333
     334
     335
     336}
     337add_meta_box('commentstatusdiv', __('Comments on this Post'), 'post_comment_status_meta_box', 'post', 'normal', 'core');
    353338
    354339function post_password_meta_box($post) {
    355340?>
    356 <p><label class="hidden" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php if ( isset( $post->post_password ) ) : echo attribute_escape( $post->post_password ); endif; ?>" /></p>
     341<p>
     342    <input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex="4" /> <?php _e('Keep this post private') ?></label>
     343</p>
     344<h4><?php _e( 'Post Password' ); ?></h4>
     345<p><label class="hidden" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></p>
    357346<p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this post and its comments.'); ?></p>
    358347<?php
    359348}
    360 add_meta_box('passworddiv', __('Password Protect This Post'), 'post_password_meta_box', 'post', 'advanced', 'core');
     349add_meta_box('passworddiv', __('Privacy Options'), 'post_password_meta_box', 'post', 'normal', 'core');
    361350
    362351function post_slug_meta_box($post) {
     
    365354<?php
    366355}
    367 add_meta_box('slugdiv', __('Post Slug'), 'post_slug_meta_box', 'post', 'advanced', 'core');
     356add_meta_box('slugdiv', __('Post Slug'), 'post_slug_meta_box', 'post', 'normal', 'core');
    368357
    369358$authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
     
    380369<?php
    381370}
    382 add_meta_box('authordiv', __('Post Author'), 'post_author_meta_box', 'post', 'advanced', 'core');
     371add_meta_box('authordiv', __('Post Author'), 'post_author_meta_box', 'post', 'normal', 'core');
    383372endif;
    384373
     
    387376    wp_list_post_revisions();
    388377}
    389 add_meta_box('revisionsdiv', __('Post Revisions'), 'post_revisions_meta_box', 'post', 'advanced', 'core');
     378add_meta_box('revisionsdiv', __('Post Revisions'), 'post_revisions_meta_box', 'post', 'normal', 'core');
    390379endif;
    391380
     381?>
     382
     383<?php if ( $notice ) : ?>
     384<div id="notice" class="error"><p><?php echo $notice ?></p></div>
     385<?php endif; ?>
     386<?php if (isset($_GET['message'])) : ?>
     387<div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
     388<?php endif; ?>
     389
     390<?php if ( (isset($mode) && 'bookmarklet' == $mode) || isset($_GET['popupurl']) ): ?>
     391<input type="hidden" name="mode" value="bookmarklet" />
     392<?php endif; ?>
     393
     394<div class="wrap">
     395<h2><?php
     396    if ( !isset($post_ID) || 0 == $post_ID)
     397        printf( __( '<a href="%s">Posts</a> / Write New Post' ), 'edit.php' );
     398    else
     399        printf( __( '<a href="%s">Posts</a> / Edit Post' ), 'edit.php' );
     400?></h2>
     401
     402<div id="previewview">
     403<?php if ( 'publish' == $post->post_status ) { ?>
     404<a class="button" href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Post'); ?></a>
     405<?php } elseif ( 'edit' == $action ) { ?>
     406<a class="button" href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank"  tabindex="4"><?php _e('Preview this Post'); ?></a>
     407<?php } ?>
     408</div>
     409
     410<?php
     411
     412if ( 0 == $post_ID)
     413    wp_nonce_field('add-post');
     414else
     415    wp_nonce_field('update-post_' .  $post_ID);
     416
     417$form_pingback = '<input type="hidden" name="post_pingback" value="' . (int) get_option('default_pingback_flag') . '" id="post_pingback" />';
     418
     419$form_prevstatus = '<input type="hidden" name="prev_status" value="' . attribute_escape( $post->post_status ) . '" />';
     420
     421$saveasdraft = '<input name="save" type="submit" id="save" class="button" tabindex="3" value="' . attribute_escape( __('Save and Continue Editing') ) . '" />';
     422
     423?>
     424
     425<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
     426<input type="hidden" id="hiddenaction" name="action" value="<?php echo $form_action ?>" />
     427<input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" />
     428<input type="hidden" id="post_author" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" />
     429<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
     430<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
     431<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
     432<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
     433
     434<?php echo $form_extra ?>
     435
     436<div id="poststuff">
     437
     438<div id="side-info" style="display: none;"><?php // TODO ?>
     439
     440<h5><?php _e('Related') ?></h5>
     441<ul>
     442<?php if ($post_ID): ?>
     443<li><a href="edit.php?p=<?php echo $post_ID ?>"><?php _e('See Comments on this Post') ?></a></li>
     444<?php endif; ?>
     445<li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li>
     446<li><a href="edit.php"><?php _e('Manage All Posts') ?></a></li>
     447<li><a href="categories.php"><?php _e('Manage All Categories') ?></a></li>
     448<li><a href="edit-tags.php"><?php _e('Manage All Tags') ?></a></li>
     449<li><a href="edit.php?post_status=draft"><?php _e('View Drafts'); ?></a></li>
     450<?php do_action('post_relatedlinks_list'); ?>
     451</ul>
     452
     453<h5><?php _e('Shortcuts') ?></h5>
     454<p><?php _e('Drag-and-drop the following link to your bookmarks bar or right click it and add it to your favorites for a posting shortcut.') ?>  <a href="<?php echo get_shortcut_link(); ?>" title="<?php echo attribute_escape(__('Press This')) ?>"><?php _e('Press This') ?></a></p>
     455</div>
     456
     457<div id="side-info-column" class="inner-sidebar">
     458
     459<?php do_action('submitpost_box'); ?>
     460
     461<?php $side_meta_boxes = do_meta_boxes('post', 'side', $post); ?>
     462
     463</div>
     464
     465<div id="post-body" class="<?php echo $side_meta_boxes ? 'has-sidebar' : ''; ?>">
     466<div id="post-body-content" class="has-sidebar-content">
     467<div id="titlediv">
     468<h3><label for="title"><?php _e('Title') ?></label></h3>
     469<div id="titlewrap">
     470    <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape($post->post_title); ?>" id="title" autocomplete="off" />
     471</div>
     472<div class="inside">
     473<?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
     474    <div id="edit-slug-box">
     475<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
     476    echo $sample_permalink_html;
     477endif; ?>
     478    </div>
     479</div>
     480</div>
     481
     482<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
     483
     484<div id="add-media-button"><a href="<?php echo clean_url( admin_url( 'media-upload.php?post_id=' . ( $post_ID ? $post_ID : $temp_ID ) . '&amp;type=image&amp;TB_iframe=true' ) ); ?>" class="thickbox button"><?php _e( 'Add Media' ); ?></a></div>
     485
     486<h3><?php _e('Post') ?></h3>
     487
     488<?php the_editor($post->post_content); ?>
     489
     490<div id="post-status-info">
     491    <span id="wp-word-count" class="alignleft"></span>
     492    <span class="alignright">
     493    <span id="autosave">&nbsp;</span>
     494<?php
     495    if ( $post_ID ) {
     496        echo '<span id="last-edit">';
     497        if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) {
     498            $last_user = get_userdata($last_id);
     499            printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
     500        } else {
     501            printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
     502        }
     503        echo '</span>';
     504    }
     505?>
     506    </span>
     507    <br class="clear" />
     508</div>
     509
     510
     511<?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
     512<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
     513<?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?>
     514<?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?>
     515<?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
     516</div>
     517
     518<?php
     519
     520echo $form_pingback;
     521echo $form_prevstatus;
     522
     523do_meta_boxes('post', 'normal', $post);
     524
     525do_action('edit_form_advanced');
     526
    392527do_meta_boxes('post', 'advanced', $post);
    393528
    394529do_action('dbx_post_sidebar');
    395 ?>
    396 </div>
    397 </div>
    398 
     530
     531?>
     532
     533</div>
     534</div>
     535</div><!-- /poststuff -->
     536
     537</div>
     538<br class="clear" />
    399539</div>
    400540
Note: See TracChangeset for help on using the changeset viewer.