Add edit_pages checks.
git-svn-id: http://svn.automattic.com/wordpress/trunk@3269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -40,6 +40,9 @@ function write_post() {
|
||||
if ('publish' == $_POST['post_status'] && !current_user_can('publish_posts'))
|
||||
$_POST['post_status'] = 'draft';
|
||||
|
||||
if ('static' == $_POST['post_status'] && !current_user_can('edit_pages'))
|
||||
die(__('This user cannot edit pages.'));
|
||||
|
||||
if (!empty ($_POST['edit_date'])) {
|
||||
$aa = $_POST['aa'];
|
||||
$mm = $_POST['mm'];
|
||||
@@ -158,6 +161,9 @@ function edit_post() {
|
||||
if ('publish' == $_POST['post_status'] && !current_user_can('publish_posts'))
|
||||
$_POST['post_status'] = 'draft';
|
||||
|
||||
if ('static' == $_POST['post_status'] && !current_user_can('edit_pages'))
|
||||
die(__('This user cannot edit pages.'));
|
||||
|
||||
if (!isset ($_POST['comment_status']))
|
||||
$_POST['comment_status'] = 'closed';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user