WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/03/2008 06:44:40 AM (12 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. see #6943 #7070 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r8032 r8034  
    6464    if ( 'page' == $_POST['post_type'] ) {
    6565        if ( 'publish' == $_POST['post_status'] && !current_user_can( 'publish_pages' ) )
    66             $_POST['post_status'] = 'pending';
     66            if ( $previous_status != 'publish' OR !current_user_can( 'edit_published_pages') )
     67                $_POST['post_status'] = 'pending';
    6768    } else {
    6869        if ( 'publish' == $_POST['post_status'] && !current_user_can( 'publish_posts' ) ) :
Note: See TracChangeset for help on using the changeset viewer.