diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index de907cf06..4dfcdd679 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -9,6 +9,9 @@ /** WordPress Administration Bootstrap */ require_once('admin.php'); +if ( !current_user_can('edit_posts') ) + wp_die(__('Cheatin’ uh?')); + wp_enqueue_script('admin-comments'); enqueue_comment_hotkeys_js(); diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php index 8c47cfb2d..032636fb9 100644 --- a/wp-admin/edit-pages.php +++ b/wp-admin/edit-pages.php @@ -9,6 +9,9 @@ /** WordPress Administration Bootstrap */ require_once('admin.php'); +if ( !current_user_can('edit_pages') ) + wp_die(__('Cheatin’ uh?')); + // Handle bulk actions if ( isset($_GET['doaction']) || isset($_GET['doaction2']) || isset($_GET['delete_all']) || isset($_GET['delete_all2']) ) { check_admin_referer('bulk-pages'); diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 12cd94e0d..fe4b5780b 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -9,6 +9,9 @@ /** WordPress Administration Bootstrap */ require_once('admin.php'); +if ( !current_user_can('edit_posts') ) + wp_die(__('Cheatin’ uh?')); + // Back-compat for viewing comments of an entry if ( $_redirect = intval( max( @$_GET['p'], @$_GET['attachment_id'], @$_GET['page_id'] ) ) ) { wp_redirect( admin_url('edit-comments.php?p=' . $_redirect ) );