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:
Ryan Boren 2007-11-12 19:58:09 +00:00
parent a24adbd80b
commit f00acd7eb0
1 changed files with 2 additions and 2 deletions

View File

@ -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';
}