Make WordPress Core


Ignore:
Timestamp:
06/02/2008 09:01:42 PM (17 years ago)
Author:
ryan
Message:

Don't unpublish posts when a user edit who can edit publised posts but not publih new posts edits a post. Props jeremyclarke. see #7070 for trunk

File:
1 edited

Legend:

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

    r8011 r8032  
    9292<p>
    9393<select name='post_status' id='post_status' tabindex='4'>
    94 <?php if ( current_user_can('publish_posts') ) : // Contributors only get "Unpublished" and "Pending Review" ?>
     94<?php
     95// only show the publish menu item if they are allowed to publish posts or they are allowed to edit this post (accounts for 'edit_published_posts' capability)
     96if ( current_user_can('publish_posts') OR ( $post->post_status == 'publish' AND current_user_can('edit_post', $post->ID) ) ) :
     97?>
    9598<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option>
    9699<?php if ( 'future' == $post->post_status ) : ?>
Note: See TracChangeset for help on using the changeset viewer.