Check publish_posts not edit_published_posts when setting pending status. Props jeremyclarke. fixes #5329
git-svn-id: https://develop.svn.wordpress.org/trunk@6333 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a24adbd80b
commit
f00acd7eb0
@ -63,10 +63,10 @@ function edit_post() {
|
||||
$_POST['post_status'] = 'draft';
|
||||
|
||||
if ( 'page' == $_POST['post_type'] ) {
|
||||
if ('publish' == $_POST['post_status'] && !current_user_can( 'edit_published_pages' ))
|
||||
if ('publish' == $_POST['post_status'] && !current_user_can( 'publish_pages' ))
|
||||
$_POST['post_status'] = 'pending';
|
||||
} else {
|
||||
if ('publish' == $_POST['post_status'] && !current_user_can( 'edit_published_posts' ))
|
||||
if ('publish' == $_POST['post_status'] && !current_user_can( 'publish_posts' ))
|
||||
$_POST['post_status'] = 'pending';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user