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:
parent
ea1663435c
commit
6bed155f5d
|
@ -63,10 +63,10 @@ function edit_post() {
|
||||||
$_POST['post_status'] = 'draft';
|
$_POST['post_status'] = 'draft';
|
||||||
|
|
||||||
if ( 'page' == $_POST['post_type'] ) {
|
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';
|
$_POST['post_status'] = 'pending';
|
||||||
} else {
|
} 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';
|
$_POST['post_status'] = 'pending';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue