Add edit_pages checks.

git-svn-id: https://develop.svn.wordpress.org/trunk@3269 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2005-12-05 04:04:23 +00:00
parent 89fb46bcce
commit 3edb82141a
2 changed files with 13 additions and 0 deletions

View File

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