WordPress.org

Make WordPress Core

Changeset 7409


Ignore:
Timestamp:
03/20/2008 04:19:58 AM (12 years ago)
Author:
markjaquith
Message:

Only show Contributors post stati they can chose. Hide date editing from Contributors (as they cannot use it). fixes #6303

File:
1 edited

Legend:

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

    r7400 r7409  
    8585<p>
    8686<select name='post_status'>
    87 <?php if ( current_user_can('publish_posts') ) : ?>
     87<?php if ( current_user_can('publish_posts') ) : // Contributors only get "Unpublished" and "Pending Review" ?>
    8888<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option>
    89 <?php else: ?>
    90 <option<?php selected( $post->post_status, 'private' ); ?> value='private'><?php _e('Published') ?></option>
    91 <?php endif; ?>
    9289<?php if ( 'future' == $post->post_status ) : ?>
    93 <option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Pending') ?></option>
     90<option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Scheduled') ?></option>
     91<?php endif; ?>
    9492<?php endif; ?>
    9593<option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option>
     
    9896</p>
    9997
     98<?php if ( current_user_can( 'publish_posts' ) ) : ?>
    10099<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>
     100<?php endif; ?>
    101101<?php
    102102if ($post_ID) {
     
    118118}
    119119?>
     120<?php if ( current_user_can( 'publish_posts' ) ) : // Contributors don't get to choose the date of publish ?>
    120121<p class="curtime"><?php printf($stamp, $date, $time); ?>
    121122&nbsp;<a href="#edit_timestamp" class="edit-timestamp"><?php _e('Edit') ?></a></p>
    122123
    123124<div id='timestampdiv'><?php touch_time(($action == 'edit')); ?></div>
     125<?php endif; ?>
    124126
    125127</div>
Note: See TracChangeset for help on using the changeset viewer.