From 6bed155f5df2dd0a8980815f70a9b02755caa40b Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 12 Nov 2007 19:58:09 +0000 Subject: [PATCH] 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 --- wp-admin/includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 3c9cc770d5..55a7ab37bb 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -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'; }