Changeset 3722
- Timestamp:
- 04/19/2006 08:30:56 AM (20 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
-
edit-comments.php (modified) (1 diff)
-
edit.php (modified) (1 diff)
-
moderation.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r3721 r3722 112 112 echo "<li id='comment-$comment->comment_ID' class='$class'>"; 113 113 ?> 114 <p><strong><?php _e('Name:') ?></strong> <?php comment_author() ?> <?php if ($comment->comment_author_email) { ?>| <strong><?php _e('E-mail:') ?></strong> <?php comment_author_email_link() ?> <?php } if ($comment->comment_author_url && 'http://' != $comment->comment_author_url ) { ?> | <strong><?php _e('URI:') ?></strong> <?php comment_author_url_link() ?> <?php } ?>| <strong><?php _e('IP:') ?></strong> <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></p> 115 116 <?php comment_text() ?> 117 118 <p><?php _e('Posted'); echo ' '; comment_date('M j, g:i A'); 119 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 120 echo " [ <a href='comment.php?action=editcomment&comment=".$comment->comment_ID."\'>" . __('Edit') . '</a>'; 121 echo ' | <a href="comment.php?action=deletecomment&p=' . $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') . '</a> '; 122 if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { 123 echo '<span class="unapprove"> | <a href="comment.php?action=unapprovecomment&p=' . $post->ID . '&comment=' . $comment->comment_ID . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\' );">' . __('Unapprove') . '</a> </span>'; 124 echo '<span class="approve"> | <a href="comment.php?action=approvecomment&p=' . $post->ID . '&comment=' . $comment->comment_ID . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\' );">' . __('Approve') . '</a> </span>'; 125 } 126 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 )) . "' );\">" . __('Spam') . "</a> ]"; 127 } // end if any comments to show 128 // Get post title 129 $post = get_post($comment->comment_post_ID); 130 $post_title = $post->post_title; 131 $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title; 132 if ( 'page' == $post->post_type ) { 133 if ( current_user_can('edit_page', $comment->comment_post_ID) ) ?> 134 [ <a href="page.php?action=edit&post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Page “%s”'), $post_title); ?></a> 135 <?php } else { 136 if ( current_user_can('edit_post', $comment->comment_post_ID) ) ?> 137 [ <a href="post.php?action=edit&post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Post “%s”'), $post_title); ?></a> 138 <?php } ?> 139 | <a href="<?php echo get_permalink($comment->comment_post_ID); ?>"><?php _e('View Post') ?></a> ]</p> 114 <p><strong><?php comment_author() ?></strong> <?php if ($comment->comment_author_email) { ?>| <?php comment_author_email_link() ?> <?php } if ($comment->comment_author_url && 'http://' != $comment->comment_author_url) { ?> | <?php comment_author_url_link() ?> <?php } ?>| <?php _e('IP:') ?> <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></p> 115 116 <?php comment_text() ?> 117 118 <p><?php comment_date('M j, g:i A'); ?> — [ 119 <?php 120 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 121 echo " <a href='comment.php?action=editcomment&comment=".$comment->comment_ID."\'>" . __('Edit') . '</a>'; 122 echo ' | <a href="comment.php?action=deletecomment&p=' . $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') . '</a> '; 123 if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { 124 echo '<span class="unapprove"> | <a href="comment.php?action=unapprovecomment&p=' . $post->ID . '&comment=' . $comment->comment_ID . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\' );">' . __('Unapprove') . '</a> </span>'; 125 echo '<span class="approve"> | <a href="comment.php?action=approvecomment&p=' . $post->ID . '&comment=' . $comment->comment_ID . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\' );">' . __('Approve') . '</a> </span>'; 126 } 127 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 )) . "' );\">" . __('Spam') . "</a> "; 128 } 129 $post = get_post($comment->comment_post_ID); 130 $post_title = wp_specialchars( $post->post_title, 'double' ); 131 $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title; 132 ?> 133 | <a href="<?php echo get_permalink($comment->comment_post_ID); ?>" title="<?php echo $post_title; ?>"><?php _e('View Post') ?></a> ]</p> 140 134 </li> 141 135 -
trunk/wp-admin/edit.php
r3699 r3722 252 252 ?> 253 253 <h3 id="comments"><?php _e('Comments') ?></h3> 254 <ol id="the-list" >254 <ol id="the-list" class="commentlist"> 255 255 <?php 256 256 $i = 0; 257 257 foreach ($comments as $comment) { 258 $class = ( ++$i % 2 ) ? array('alternate') : array(); 259 if ( 'unapproved' == $comment_status = wp_get_comment_status($comment->comment_ID) ) 260 $class[] = 'unapproved'; 261 ?> 262 263 <li id='comment-<?php echo $comment->comment_ID; ?>'<?php if ( $class ) echo " class='" . join(' ', $class) . "'"; ?>> 264 <?php comment_date('Y-n-j') ?> 265 @ 266 <?php comment_time('g:m:s a') ?> 267 <?php 268 if ( current_user_can('edit_post', $post->ID) ) { 269 echo "[ <a href='comment.php?action=editcomment&comment=".$comment->comment_ID."\'>" . __('Edit') . '</a>'; 270 echo ' - <a href="comment.php?action=deletecomment&p=' . $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') . '</a> '; 271 if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { 272 echo '<span class="unapprove"> - <a href="comment.php?action=unapprovecomment&p=' . $post->ID . '&comment=' . $comment->comment_ID . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\' );">' . __('Unapprove') . '</a> </span>'; 273 echo '<span class="approve"> - <a href="comment.php?action=approvecomment&p=' . $post->ID . '&comment=' . $comment->comment_ID . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\' );">' . __('Approve') . '</a> </span>'; 274 } 275 echo "]"; 276 } // end if any comments to show 277 ?> 278 <br /> 279 <strong> 280 <?php comment_author() ?> 281 ( 282 <?php comment_author_email_link() ?> 283 / 284 <?php comment_author_url_link() ?> 285 )</strong> (IP: 286 <?php comment_author_IP() ?> 287 ) 288 <?php comment_text() ?> 289 290 </li> 291 <!-- /comment --> 258 259 ++$i; $class = ''; 260 $authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID")); 261 $comment_status = wp_get_comment_status($comment->comment_ID); 262 if ('unapproved' == $comment_status) 263 $class .= ' unapproved'; 264 if ($i % 2) 265 $class .= ' alternate'; 266 echo "<li id='comment-$comment->comment_ID' class='$class'>"; 267 ?> 268 <p><strong><?php comment_author() ?></strong> <?php if ($comment->comment_author_email) { ?>| <?php comment_author_email_link() ?> <?php } if ($comment->comment_author_url && 'http://' != $comment->comment_author_url) { ?> | <?php comment_author_url_link() ?> <?php } ?>| <?php _e('IP:') ?> <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></p> 269 270 <?php comment_text() ?> 271 272 <p><?php comment_date('M j, g:i A'); ?> — [ 273 <?php 274 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 275 echo " <a href='comment.php?action=editcomment&comment=".$comment->comment_ID."\'>" . __('Edit') . '</a>'; 276 echo ' | <a href="comment.php?action=deletecomment&p=' . $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') . '</a> '; 277 if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { 278 echo '<span class="unapprove"> | <a href="comment.php?action=unapprovecomment&p=' . $post->ID . '&comment=' . $comment->comment_ID . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\' );">' . __('Unapprove') . '</a> </span>'; 279 echo '<span class="approve"> | <a href="comment.php?action=approvecomment&p=' . $post->ID . '&comment=' . $comment->comment_ID . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\' );">' . __('Approve') . '</a> </span>'; 280 } 281 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 )) . "' );\">" . __('Spam') . "</a> ]"; 282 } // end if any comments to show 283 ?> 284 </p> 285 </li> 286 292 287 <?php //end of the loop, don't delete 293 288 } // end foreach -
trunk/wp-admin/moderation.php
r3665 r3722 145 145 echo "\n\t<li id='comment-$comment->comment_ID' $class>"; 146 146 ?> 147 <p><strong><?php _e('Name:') ?></strong> <?php comment_author_link() ?> <?php if ($comment->comment_author_email) { ?>| <strong><?php _e('E-mail:') ?></strong> <?php comment_author_email_link() ?> <?php } if ($comment->comment_author_url && 'http://' != $comment->comment_author_url) { ?> | <strong><?php _e('URI:') ?></strong> <?php comment_author_url_link() ?> <?php } ?>| <strong><?php _e('IP:') ?></strong> <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a> | <strong><?php _e('Date:') ?></strong> <?php comment_date(); ?></p>147 <p><strong><?php comment_author() ?></strong> <?php if ($comment->comment_author_email) { ?>| <?php comment_author_email_link() ?> <?php } if ($comment->comment_author_url && 'http://' != $comment->comment_author_url) { ?> | <?php comment_author_url_link() ?> <?php } ?>| <?php _e('IP:') ?> <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></p> 148 148 <?php comment_text() ?> 149 <p><?php 150 echo '<a href="comment.php?action=editcomment&comment='.$comment->comment_ID.'">' . __('Edit') . '</a> | ';?> 151 <a href="<?php echo get_permalink($comment->comment_post_ID); ?>"><?php _e('View Post') ?></a> | 152 <?php 153 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 just this comment') . "</a> | "; ?> <?php _e('Bulk action:') ?> 154 <input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment[<?php echo $comment->comment_ID; ?>]-approve" value="approve" /> <label for="comment[<?php echo $comment->comment_ID; ?>]-approve"><?php _e('Approve') ?></label> 155 <input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment[<?php echo $comment->comment_ID; ?>]-spam" value="spam" /> <label for="comment[<?php echo $comment->comment_ID; ?>]-spam"><?php _e('Spam') ?></label> 156 <input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment[<?php echo $comment->comment_ID; ?>]-delete" value="delete" /> <label for="comment[<?php echo $comment->comment_ID; ?>]-delete"><?php _e('Delete') ?></label> 149 <p><?php comment_date('M j, g:i A'); ?> — [ <?php 150 echo '<a href="comment.php?action=editcomment&comment='.$comment->comment_ID.'">' . __('Edit') . '</a> | '; 151 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 ') . "</a> | "; ?> 152 <?php 153 $post = get_post($comment->comment_post_ID); 154 $post_title = wp_specialchars( $post->post_title, 'double' ); 155 $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title; 156 ?> 157 <a href="<?php echo get_permalink($comment->comment_post_ID); ?>" title="<?php echo $post_title; ?>"><?php _e('View Post') ?></a> ] — 158 <?php _e('Bulk action:') ?> 159 <input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment[<?php echo $comment->comment_ID; ?>]-approve" value="approve" /> <label for="comment[<?php echo $comment->comment_ID; ?>]-approve"><?php _e('Approve') ?></label> 160 <input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment[<?php echo $comment->comment_ID; ?>]-spam" value="spam" /> <label for="comment[<?php echo $comment->comment_ID; ?>]-spam"><?php _e('Spam') ?></label> 161 <input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment[<?php echo $comment->comment_ID; ?>]-delete" value="delete" /> <label for="comment[<?php echo $comment->comment_ID; ?>]-delete"><?php _e('Delete') ?></label> 157 162 <input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment[<?php echo $comment->comment_ID; ?>]-nothing" value="later" checked="checked" /> <label for="comment[<?php echo $comment->comment_ID; ?>]-nothing"><?php _e('Defer until later') ?></label> 158 163 </p> … … 166 171 <div id="ajax-response"></div> 167 172 168 <p class="submit"><input type="submit" name="submit" value="<?php _e(' Moderate Comments »') ?>" /></p>173 <p class="submit"><input type="submit" name="submit" value="<?php _e('Bulk Moderate Comments »') ?>" /></p> 169 174 <script type="text/javascript"> 170 175 // <![CDATA[ … … 222 227 223 228 224 include('admin-footer.php') ?> 229 include('admin-footer.php'); 230 231 ?>
Note: See TracChangeset
for help on using the changeset viewer.