Ticket #12104: moderate_comments.diff
File moderate_comments.diff, 1.8 KB (added by , 15 years ago) |
---|
-
wp-admin/edit-comments.php
9 9 /** WordPress Administration Bootstrap */ 10 10 require_once('admin.php'); 11 11 12 if ( !current_user_can(' edit_posts') )12 if ( !current_user_can('moderate_comments') ) 13 13 wp_die(__('Cheatin’ uh?')); 14 14 15 15 wp_enqueue_script('admin-comments'); … … 41 41 foreach ($comment_ids as $comment_id) { // Check the permissions on each 42 42 $_post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment_id) ); 43 43 44 if ( !current_user_can(' edit_post', $_post_id) )44 if ( !current_user_can('moderate_comments', $_post_id) ) 45 45 continue; 46 46 47 47 switch( $doaction ) { -
wp-admin/menu.php
74 74 /* translators: add new page */ 75 75 $submenu['edit.php?post_type=page'][10] = array( _x('Add New', 'page'), 'edit_pages', 'post-new.php?post_type=page' ); 76 76 77 $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' );77 $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' ); 78 78 79 79 $_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group 80 80