WordPress.org

Make WordPress Core

Changeset 6619


Ignore:
Timestamp:
01/16/2008 05:52:38 AM (10 years ago)
Author:
ryan
Message:

Make publish status a dropdown.

File:
1 edited

Legend:

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

    r6611 r6619  
    9494<div class="inside">
    9595
    96 
     96<p><strong> <?php _e('Publish Status') ?></strong></p>
    9797<p>
     98<select name='post_status'>
    9899<?php if ( current_user_can('publish_posts') ) : ?>
    99 <label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); checked($post->post_status, 'future'); ?> /> <?php _e('Published') ?></label>
    100 <?php endif; ?>
    101 <label for="post_status_pending" class="selectit"><input id="post_status_pending" name="post_status" type="radio" value="pending" <?php checked($post->post_status, 'pending'); ?> /> <?php _e('Pending Review') ?></label>
    102 <label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post->post_status, 'draft'); ?> /> <?php _e('Draft') ?></label>
     100<?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>
     102<?php else: ?>
     103<option<?php selected( $post->post_status, 'private' ); ?> value='private'><?php _e('Published') ?></option>
     104<?php endif; ?>
     105<option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option>
     106<option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Unpublished') ?></option>
     107</select>
    103108</p>
    104109
Note: See TracChangeset for help on using the changeset viewer.