| 1 | Index: wp-admin/edit-comments.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-admin/edit-comments.php (revision 12905) |
|---|
| 4 | +++ wp-admin/edit-comments.php (working copy) |
|---|
| 5 | @@ -9,7 +9,7 @@ |
|---|
| 6 | /** WordPress Administration Bootstrap */ |
|---|
| 7 | require_once('admin.php'); |
|---|
| 8 | |
|---|
| 9 | -if ( !current_user_can('edit_posts') ) |
|---|
| 10 | +if ( !current_user_can('moderate_comments') ) |
|---|
| 11 | wp_die(__('Cheatin’ uh?')); |
|---|
| 12 | |
|---|
| 13 | wp_enqueue_script('admin-comments'); |
|---|
| 14 | @@ -41,7 +41,7 @@ |
|---|
| 15 | foreach ($comment_ids as $comment_id) { // Check the permissions on each |
|---|
| 16 | $_post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment_id) ); |
|---|
| 17 | |
|---|
| 18 | - if ( !current_user_can('edit_post', $_post_id) ) |
|---|
| 19 | + if ( !current_user_can('moderate_comments', $_post_id) ) |
|---|
| 20 | continue; |
|---|
| 21 | |
|---|
| 22 | switch( $doaction ) { |
|---|
| 23 | Index: wp-admin/menu.php |
|---|
| 24 | =================================================================== |
|---|
| 25 | --- wp-admin/menu.php (revision 12905) |
|---|
| 26 | +++ wp-admin/menu.php (working copy) |
|---|
| 27 | @@ -74,7 +74,7 @@ |
|---|
| 28 | /* translators: add new page */ |
|---|
| 29 | $submenu['edit.php?post_type=page'][10] = array( _x('Add New', 'page'), 'edit_pages', 'post-new.php?post_type=page' ); |
|---|
| 30 | |
|---|
| 31 | -$menu[25] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='pending-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php', '', 'menu-top', 'menu-comments', 'div' ); |
|---|
| 32 | +$menu[25] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='pending-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'moderate_comments', 'edit-comments.php', '', 'menu-top', 'menu-comments', 'div' ); |
|---|
| 33 | |
|---|
| 34 | $_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group |
|---|
| 35 | |
|---|