Changeset 3660 for trunk/wp-admin/edit.php
- Timestamp:
- 03/29/2006 01:51:55 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r3564 r3660 115 115 116 116 <?php 117 118 117 // define the columns to display, the syntax is 'internal name' => 'display name' 119 118 $posts_columns = array( … … 134 133 ?> 135 134 136 <table id="the-list-x" width="100%" cellpadding="3" cellspacing="3"> 135 <table width="100%" cellpadding="3" cellspacing="3"> 136 <thead> 137 137 <tr> 138 138 … … 142 142 143 143 </tr> 144 </thead> 145 <tbody id="the-list"> 144 146 <?php 145 147 if ($posts) { 146 148 $bgcolor = ''; 147 149 foreach ($posts as $post) { start_wp(); 150 add_filter('the_title','wp_specialchars'); 148 151 $class = ('alternate' == $class) ? '' : 'alternate'; 149 152 ?> … … 208 211 case 'control_delete': 209 212 ?> 210 <td><?php if ( current_user_can('delete_post',$post->ID) ) { echo "<a href='post.php?action=delete&post=$id' class='delete' onclick=\"return deleteSomething( 'post', " . $id . ", '" . sprintf(__("You are about to delete this post "%s".\\n"OK" to delete, "Cancel" to stop."), wp_specialchars(get_the_title('', ''), 1) ) . "' );\">" . __('Delete') . "</a>"; } ?></td>213 <td><?php if ( current_user_can('delete_post',$post->ID) ) { echo "<a href='post.php?action=delete&post=$id' class='delete' onclick=\"return deleteSomething( 'post', " . $id . ", '" . sprintf(__("You are about to delete this post "%s".\\n"OK" to delete, "Cancel" to stop."), addslashes(wp_specialchars(get_the_title(),'double')) ) . "' );\">" . __('Delete') . "</a>"; } ?></td> 211 214 <?php 212 215 break; … … 230 233 <?php 231 234 } // end if ($posts) 232 ?> 235 ?> 236 </tbody> 233 237 </table> 234 238 … … 247 251 ?> 248 252 <h3><?php _e('Comments') ?></h3> 249 <ol id="comments"> 250 <?php 253 <ol id="the-list"> 254 <?php 255 $i = 0; 251 256 foreach ($comments as $comment) { 252 $comment_status = wp_get_comment_status($comment->comment_ID); 257 $class = ( ++$i % 2 ) ? array('alternate') : array(); 258 if ( 'unapproved' == $comment_status = wp_get_comment_status($comment->comment_ID) ) 259 $class[] = 'unapproved'; 253 260 ?> 254 261 255 <li <?php if ("unapproved" == $comment_status) echo "class='unapproved'"; ?>>262 <li id='comment-<?php echo $comment->comment_ID; ?>'<?php if ( $class ) echo " class='" . join(' ', $class) . "'"; ?>> 256 263 <?php comment_date('Y-n-j') ?> 257 264 @ … … 259 266 <?php 260 267 if ( current_user_can('edit_post', $post->ID) ) { 261 echo "[ <a href= \"post.php?action=editcomment&comment=".$comment->comment_ID."\">" . __('Edit') . "</a>";262 echo " - <a href=\"post.php?action=deletecomment&p=".$post->ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'OK\' to delete, \'Cancel\' to stop."), $comment->comment_author) . "')\">" . __('Delete') . "</a> ";268 echo "[ <a href='post.php?action=editcomment&comment=".$comment->comment_ID."\'>" . __('Edit') . '</a>'; 269 echo ' - <a href="post.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> '; 263 270 if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { 264 if ('approved' == wp_get_comment_status($comment->comment_ID)) { 265 echo " - <a href=\"post.php?action=unapprovecomment&p=".$post->ID."&comment=".$comment->comment_ID."\">" . __('Unapprove') . "</a> "; 266 } else { 267 echo " - <a href=\"post.php?action=approvecomment&p=".$post->ID."&comment=".$comment->comment_ID."\">" . __('Approve') . "</a> "; 268 } 271 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>'; 272 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>'; 269 273 } 270 274 echo "]";
Note: See TracChangeset
for help on using the changeset viewer.