Changeset 2724
- Timestamp:
- 07/17/2005 09:21:50 PM (19 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r2259 r2724 44 44 $post_id = $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = $comment"); 45 45 $authordata = get_userdata( $wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $post_id") ); 46 if ( user_can_delete_post_comments($user_ID, $post_id) ) :46 if ( current_user_can('edit_post', $post_id) ) : 47 47 $wpdb->query("DELETE FROM $wpdb->comments WHERE comment_ID = $comment"); 48 48 ++$i; … … 94 94 95 95 <p><?php _e('Posted'); echo ' '; comment_date('M j, g:i A'); 96 if ( user_can_edit_post_comments($user_ID, $comment->comment_post_ID) ) {96 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 97 97 echo " | <a href=\"post.php?action=editcomment&comment=".$comment->comment_ID."\">" . __('Edit Comment') . "</a>"; 98 98 } 99 if ( user_can_delete_post_comments($user_ID, $comment->comment_post_ID) ) {99 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 100 100 echo " | <a href=\"post.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), $comment->comment_author) . "')\">" . __('Delete Comment') . "</a> — "; 101 101 } // end if any comments to show 102 102 // Get post title 103 if ( user_can_edit_post($user_ID, $comment->comment_post_ID) ) {103 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 104 104 $post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"); 105 105 $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title; … … 139 139 ?> 140 140 <tr class='<?php echo $class; ?>'> 141 <td><?php if ( user_can_delete_post_comments($user_ID, $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td>141 <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td> 142 142 <td><?php comment_author_link() ?></td> 143 143 <td><?php comment_author_email_link() ?></td> … … 145 145 <td><?php comment_excerpt(); ?></td> 146 146 <td><a href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID() ?>" class="edit"><?php _e('View') ?></a></td> 147 <td><?php if ( user_can_edit_post_comments($user_ID, $comment->comment_post_ID) ) {147 <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 148 148 echo "<a href='post.php?action=editcomment&comment=$comment->comment_ID' class='edit'>" . __('Edit') . "</a>"; } ?></td> 149 <td><?php if ( user_can_delete_post_comments($user_ID, $comment->comment_post_ID) ) {149 <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 150 150 echo "<a href=\"post.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), $comment->comment_author) . "')\" class='delete'>" . __('Delete') . "</a>"; } ?></td> 151 151 </tr> -
trunk/wp-admin/edit-form.php
r2651 r2724 59 59 <input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" /> 60 60 61 <?php if ( user_can_create_post($user_ID) ) : ?>61 <?php if ( current_user_can('edit_posts') ) : ?> 62 62 <input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="<?php _e('Publish') ?>" /> 63 63 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.