105 | | <?php if ( current_user_can('publish_posts') ) : ?> |
106 | | <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> |
107 | | <?php endif; ?> |
108 | | <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> |
109 | | <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> |
110 | | <label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="radio" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Private') ?></label></div> |
| 105 | <?php |
| 106 | foreach( get_post_statuses( ) as $status_value => $status_desc ) { |
| 107 | if( $status_value === 'publish' && !current_user_can( 'publish_posts' ) ) |
| 108 | continue; |
| 109 | ?> |
| 110 | <label for="post_status_<?php echo $status_value; ?>" class="selectit"> |
| 111 | <input id="post_status_<?php echo $status_value; ?>" name="post_status" type="radio" value="<?php echo $status_value; ?>" <?php |
| 112 | checked( $post->post_status, $status_value ); |
| 113 | // We consider 'future' to be published |
| 114 | if( $status_value === 'publish' ) |
| 115 | checked( $post->post_status, 'future' ); |
| 116 | ?> /> <?php _e( $status_desc ); ?> </label> |
| 117 | <?php } ?> |
| 118 | </div> |