Make WordPress Core


Ignore:
Timestamp:
06/16/2008 08:44:30 PM (18 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/includes/post.php

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