Add date display and pending status.

git-svn-id: https://develop.svn.wordpress.org/trunk@6623 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-01-16 07:26:41 +00:00
parent 4b50895652
commit f1c7a96841
1 changed files with 17 additions and 2 deletions

View File

@ -93,21 +93,36 @@ addLoadEvent(focusit);
<div class="inside">
<p><strong> <?php _e('Publish Status') ?></strong></p>
<p><strong><?php _e('Publish Status') ?></strong></p>
<p>
<select name='post_status'>
<?php if ( current_user_can('publish_posts') ) : ?>
<?php ( 'private' == $post-post_status ) ? $pub_value = 'private' : $pub_value = 'publish'; ?>
<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>
<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='<?php echo $pub_value ?>'><?php _e('Published') ?></option>
<?php else: ?>
<option<?php selected( $post->post_status, 'private' ); ?> value='private'><?php _e('Published') ?></option>
<?php endif; ?>
<?php if ( 'future' == $post->post_status ) : ?>
<option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Pending') ?></option>
<?php endif; ?>
<option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option>
<option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Unpublished') ?></option>
</select>
</p>
<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>
<?php
if ($post_ID):
if ( 'future' == $post->post_status )
$time = __('Scheduled for:<br />%1$s at %2$s');
else if ( 'publish' == $post->post_status )
$time = __('Published on:<br />%1$s at %2$s');
else
$time = __('Saved on:<br />%1$s at %2$s');
?>
<p><?php printf($time, mysql2date(get_option('date_format'), $post->post_date), mysql2date(get_option('time_format'), $post->post_date)); ?>
<?php endif; ?>
</div>
<p class="submit">