Check publish_posts not edit_published_posts when setting pending status. Props jeremyclarke. fixes #5329

git-svn-id: http://svn.automattic.com/wordpress/trunk@6333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-11-12 19:58:09 +00:00
parent ea1663435c
commit 6bed155f5d
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';
}