Make WordPress Core


Ignore:
Timestamp:
06/16/2008 08:44:30 PM (16 years ago)
Author:
ryan
Message:

Don't unpublish pages when a user who can edit publised pages but not publish new pages edits a page. Props jeremyclarke. fixes #6943 #7070 for 2.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-admin/edit-page-form.php

    r7795 r8102  
    6969
    7070<div class="inside">
    71 
    7271<p><strong><?php _e('Publish Status') ?></strong></p>
    7372<p>
    7473<select name='post_status' tabindex='4'>
    75 <?php if ( current_user_can('publish_pages') ) : ?>
     74<?php // Show publish in dropdown if user can publish or if they can re-publish this page ('edit_published_pages')
     75// 'publish' option will be selected for published AND private posts (checkbox overrides dropdown)
     76if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND current_user_can('edit_page', $post->ID) ) ) :
     77?>
    7678<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option>
    77 <?php else: ?>
    78 <option<?php selected( $post->post_status, 'private' ); ?> value='private'><?php _e('Published') ?></option>
    7979<?php endif; ?>
    8080<?php if ( 'future' == $post->post_status ) : ?>
     
    8585</select>
    8686</p>
    87 
     87<?php if ( current_user_can( 'publish_posts' ) ) : ?>
    8888<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'); ?> tabindex='4' /> <?php _e('Keep this page private') ?></label></p>
     89<?php endif; ?>
     90
    8991<?php
    9092if ($post_ID) {
Note: See TracChangeset for help on using the changeset viewer.