mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
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
git-svn-id: https://develop.svn.wordpress.org/trunk@8034 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -63,7 +63,8 @@ function _wp_translate_postdata( $update = false ) {
|
||||
// Change status from 'publish' to 'pending' if user lacks permissions to publish or to resave published posts.
|
||||
if ( 'page' == $_POST['post_type'] ) {
|
||||
if ( 'publish' == $_POST['post_status'] && !current_user_can( 'publish_pages' ) )
|
||||
$_POST['post_status'] = 'pending';
|
||||
if ( $previous_status != 'publish' OR !current_user_can( 'edit_published_pages') )
|
||||
$_POST['post_status'] = 'pending';
|
||||
} else {
|
||||
if ( 'publish' == $_POST['post_status'] && !current_user_can( 'publish_posts' ) ) :
|
||||
// Stop attempts to publish new posts, but allow already published posts to be saved if appropriate.
|
||||
|
||||
Reference in New Issue
Block a user