Make WordPress Core

Changeset 6623


Ignore:
Timestamp:
01/16/2008 07:26:41 AM (16 years ago)
Author:
ryan
Message:

Add date display and pending status.

File:
1 edited

Legend:

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

    r6620 r6623  
    9494<div class="inside">
    9595
    96 <p><strong> <?php _e('Publish Status') ?></strong></p>
     96<p><strong><?php _e('Publish Status') ?></strong></p>
    9797<p>
    9898<select name='post_status'>
    9999<?php if ( current_user_can('publish_posts') ) : ?>
    100100<?php ( 'private' == $post-post_status ) ? $pub_value = 'private' : $pub_value = 'publish'; ?>
    101 <option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'future' ); selected( $post->post_status, 'private' );?> value='<?php echo $pub_value ?>'><?php _e('Published') ?></option>
     101<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='<?php echo $pub_value ?>'><?php _e('Published') ?></option>
    102102<?php else: ?>
    103103<option<?php selected( $post->post_status, 'private' ); ?> value='private'><?php _e('Published') ?></option>
     104<?php endif; ?>
     105<?php if ( 'future' == $post->post_status ) : ?>
     106<option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Pending') ?></option>
    104107<?php endif; ?>
    105108<option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option>
     
    109112
    110113<p><label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Keep this post private') ?></label></p>
     114<?php
     115if ($post_ID):
     116
     117if ( 'future' == $post->post_status )
     118    $time = __('Scheduled for:<br />%1$s at %2$s');
     119else if ( 'publish' == $post->post_status )
     120    $time = __('Published on:<br />%1$s at %2$s');
     121else
     122    $time = __('Saved on:<br />%1$s at %2$s');
     123?>
     124<p><?php printf($time, mysql2date(get_option('date_format'), $post->post_date), mysql2date(get_option('time_format'), $post->post_date)); ?>
     125<?php endif; ?>
    111126</div>
    112127
Note: See TracChangeset for help on using the changeset viewer.