Changeset 3563 for trunk/wp-admin/edit-comments.php
- Timestamp:
- 02/21/2006 06:11:46 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r3541 r3563 104 104 <p><?php _e('Posted'); echo ' '; comment_date('M j, g:i A'); 105 105 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 106 echo " | <a href=\" post.php?action=editcomment&comment=".$comment->comment_ID."\">" . __('Edit Comment') . "</a>";107 echo " | <a href=\" post.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), wp_specialchars( $comment->comment_author, 1 )) . "' );\">" . __('Delete Comment') . "</a> ";108 echo " | <a href=\" post.php?action=deletecomment&delete_type=spam&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by "%s".\\n"Cancel" to stop, "OK" to mark as spam."), wp_specialchars( $comment->comment_author, 1 )) . "' );\">" . __('Mark Comment as Spam') . "</a> ";106 echo " | <a href=\"comment.php?action=editcomment&comment=".$comment->comment_ID."\">" . __('Edit Comment') . "</a>"; 107 echo " | <a href=\"comment.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), wp_specialchars( $comment->comment_author, 1 )) . "' );\">" . __('Delete Comment') . "</a> "; 108 echo " | <a href=\"comment.php?action=deletecomment&delete_type=spam&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by "%s".\\n"Cancel" to stop, "OK" to mark as spam."), wp_specialchars( $comment->comment_author, 1 )) . "' );\">" . __('Mark Comment as Spam') . "</a> "; 109 109 } // end if any comments to show 110 110 // Get post title 111 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 112 $post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"); 113 $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title; 114 ?> | <a href="post.php?action=edit&post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Post “%s”'), stripslashes($post_title)); ?></a> 115 <?php } ?> 111 $post = get_post($comment->comment_post_ID); 112 $post_title = $post->post_title; 113 $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title; 114 if ( 'page' == $post->post_type ) { 115 if ( current_user_can('edit_page', $comment->comment_post_ID) ) ?> 116 | <a href="page.php?action=edit&post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Page “%s”'), $post_title); ?></a> 117 <?php } else { 118 if ( current_user_can('edit_post', $comment->comment_post_ID) ) ?> 119 | <a href="post.php?action=edit&post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Post “%s”'), $post_title); ?></a> 120 <?php } ?> 116 121 | <a href="<?php echo get_permalink($comment->comment_post_ID); ?>"><?php _e('View Post') ?></a></p> 117 122 </li> … … 156 161 <td><a href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID() ?>" class="edit"><?php _e('View') ?></a></td> 157 162 <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 158 echo "<a href=' post.php?action=editcomment&comment=$comment->comment_ID' class='edit'>" . __('Edit') . "</a>"; } ?></td>163 echo "<a href='comment.php?action=editcomment&comment=$comment->comment_ID' class='edit'>" . __('Edit') . "</a>"; } ?></td> 159 164 <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 160 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>165 echo "<a href=\"comment.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> 161 166 </tr> 162 167 <?php
Note: See TracChangeset
for help on using the changeset viewer.