Changeset 10970
- Timestamp:
- 04/17/2009 12:48:41 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r10968 r10970 2066 2066 $post = get_post($comment->comment_post_ID); 2067 2067 $the_comment_status = wp_get_comment_status($comment->comment_ID); 2068 $user_can = current_user_can('edit_post', $post->ID); 2068 2069 2069 2070 $author_url = get_comment_author_url(); … … 2103 2104 if ( !$checkbox ) break; 2104 2105 echo '<th scope="row" class="check-column">'; 2105 if ( current_user_can('edit_post', $post->ID)) echo "<input type='checkbox' name='delete_comments[]' value='$comment->comment_ID' />";2106 if ( $user_can ) echo "<input type='checkbox' name='delete_comments[]' value='$comment->comment_ID' />"; 2106 2107 echo '</th>'; 2107 2108 break; … … 2114 2115 <div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden"> 2115 2116 <textarea class="comment" rows="3" cols="10"><?php echo $comment->comment_content; ?></textarea> 2116 <div class="author-email"><?php echo attribute_escape( $comment->comment_author_email ); ?></div>2117 <div class="author"><?php echo attribute_escape( $comment->comment_author ); ?></div>2117 <div class="author-email"><?php if ( $user_can ) echo attribute_escape( $comment->comment_author_email ); ?></div> 2118 <div class="author"><?php if ( $user_can ) echo attribute_escape( $comment->comment_author ); ?></div> 2118 2119 <div class="author-url"><?php echo attribute_escape( $comment->comment_author_url ); ?></div> 2119 2120 <div class="comment_status"><?php echo $comment->comment_approved; ?></div> … … 2122 2123 $actions = array(); 2123 2124 2124 if ( current_user_can('edit_post', $post->ID)) {2125 if ( $user_can ) { 2125 2126 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>'; 2126 2127 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; … … 2165 2166 if ( !empty($author_url) ) 2166 2167 echo "<a title='$author_url' href='$author_url'>$author_url_display</a><br />"; 2167 if ( current_user_can( 'edit_post', $post->ID )) {2168 if ( $user_can ) { 2168 2169 if ( !empty($comment->comment_author_email) ) { 2169 2170 comment_author_email_link(); … … 2192 2193 $pending_comments = $_comment_pending_count[$post->ID] = $_comment_pending_count_temp[$post->ID]; 2193 2194 } 2194 if ( current_user_can( 'edit_post', $post->ID )) {2195 if ( $user_can ) { 2195 2196 $post_link = "<a href='" . get_edit_post_link($post->ID) . "'>"; 2196 2197 $post_link .= get_the_title($post->ID) . '</a>';
Note: See TracChangeset
for help on using the changeset viewer.