WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/18/2008 10:10:41 AM (12 years ago)
Author:
azaozz
Message:

crazyhorse: fixed toolbar on write post screen, sortables js improvements, no redirect after publishing post

File:
1 edited

Legend:

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

    r8329 r8371  
    99$messages[4] = __('Post updated.');
    1010$messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( $_GET['revision'], false ) );
     11$messages[6] = __('Post published.');
    1112
    1213$notice = false;
     
    3738
    3839?>
    39 <?php if ( $notice ) : ?>
    40 <div id="notice" class="error"><p><?php echo $notice ?></p></div>
    41 <?php endif; ?>
    42 <?php if (isset($_GET['message'])) : ?>
    43 <div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
    44 <?php endif; ?>
     40
    4541
    4642<?php
     
    232228
    233229<form name="post" action="post.php" method="post" id="post">
     230<div id="wpbody-content">
     231
     232<?php if ( $notice ) : ?>
     233<div id="notice" class="error"><p><?php echo $notice ?></p></div>
     234<?php endif; ?>
     235<?php if (isset($_GET['message'])) : ?>
     236<div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
     237<?php endif; ?>
     238
    234239<?php if ( (isset($mode) && 'bookmarklet' == $mode) || isset($_GET['popupurl']) ): ?>
    235240<input type="hidden" name="mode" value="bookmarklet" />
     
    244249?></h2>
    245250
    246 <p id="big-add-button">
     251<!--<p id="big-add-button">
    247252<span id="previewview">
    248253<?php if ( 'publish' == $post->post_status ) { ?>
     
    252257<?php } ?>
    253258</span>
    254 </p>
     259</p>-->
    255260
    256261<?php
     
    344349<div id="post-status-info">
    345350    <span id="wp-word-count" class="alignleft"></span>
    346     <span id="autosave" class="alignright"></span>
     351    <span class="alignright">
     352    <span id="autosave">&nbsp;</span>
     353<?php
     354    if ( $post_ID ) {
     355        echo '<span id="last-edit">';
     356        if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) {
     357            $last_user = get_userdata($last_id);
     358            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));
     359        } else {
     360            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));
     361        }
     362        echo '</span>';
     363    }
     364?>
     365    </span>
    347366    <br class="clear" />
    348367</div>
    349368
    350 <div id="submitpost" class="submitbox">
     369
     370<?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
     371<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
     372<?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?>
     373<?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?>
     374<?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
     375</div>
     376
     377<?php
     378
     379echo $form_pingback;
     380echo $form_prevstatus;
     381
     382do_meta_boxes('post', 'normal', $post);
     383
     384do_action('edit_form_advanced');
     385
     386do_meta_boxes('post', 'advanced', $post);
     387
     388do_action('dbx_post_sidebar');
     389
     390?>
     391
     392</div>
     393</div>
     394</div><!-- /poststuff -->
     395
     396</div>
     397</div>
     398
     399<div id="fixedbar">
     400<table id="fixedbar-wrap"><tbody><tr>
     401<td id="preview-link">&nbsp;
     402<?php if ( 'publish' == $post->post_status ) { ?>
     403<a href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Post'); ?></a>
     404<?php } elseif ( 'edit' == $action ) { ?>
     405<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>
     406<?php } ?>
     407</td>
     408<td id="submitpost" class="submitbox">
    351409<div id="post-time-info" class="alignleft">
    352410<?php
    353411    if ( current_user_can( 'publish_posts' ) ) : // Contributors don't get to choose the date of publish
    354412        $stamp = __( 'Timestamp: <span class="timestamp">%1$s%3$s</span>' );
    355         $edit = '&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex="4">' . __('(Change)') . '</a>';
     413        $edit = '&nbsp;(<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex="4">' . __('Change') . '</a>)';
    356414        if ($post_ID) {
    357415            if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified
     
    370428?>
    371429
    372     <p class="curtime"><?php printf($stamp, $date, $time, $edit); ?>
    373 </p>
     430    <p class="curtime"><?php printf($stamp, $date, $time, $edit); ?></p>
    374431    <div id='timestampdiv' class='hide-if-js'><?php touch_time(($action == 'edit'),1,4); ?></div>
    375432
    376433<?php
    377 
    378434    endif;
    379 
    380     if ( $post_ID ) {
    381         echo '<p id="last-edit">';
    382         if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) {
    383             $last_user = get_userdata($last_id);
    384             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));
    385         } else {
    386             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));
    387         }
    388         echo '</p>';
    389     }
    390 
    391 ?>
    392 
     435?>
    393436</div>
    394437<p class="submit alignright">
     
    409452    <input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" />
    410453
    411 <?php       else : ?>
     454<?php   else : ?>
    412455
    413456    <input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" />
     
    420463?>
    421464</p>
    422 <br class="clear" />
    423 </div>
    424 
    425 <?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
    426 <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
    427 <?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?>
    428 <?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?>
    429 <?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
    430 </div>
    431 
    432 <?php
    433 
    434 echo $form_pingback;
    435 echo $form_prevstatus;
    436 
    437 do_meta_boxes('post', 'normal', $post);
    438 
    439 do_action('edit_form_advanced');
    440 
    441 do_meta_boxes('post', 'advanced', $post);
    442 
    443 do_action('dbx_post_sidebar');
    444 
    445 ?>
    446 
    447 </div>
    448 </div>
    449 </div>
    450 
     465</td></tr></tbody></table>
    451466</div>
    452467
Note: See TracChangeset for help on using the changeset viewer.