Changeset 13247
- Timestamp:
- 02/20/2010 11:48:38 AM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/comment.php
r13246 r13247 84 84 } 85 85 86 // No need to re-approve/re-trash/re-spam a comment. 87 if ( $action == str_replace( '1', 'approve', $comment->comment_approved ) ) { 88 wp_redirect( admin_url( 'edit-comments.php?same=' . $comment_id ) ); 89 die(); 90 } 91 86 92 require_once('admin-header.php'); 87 93 … … 117 123 break; 118 124 } 125 126 if ( $comment->comment_approved != '0' ) { // if not unapproved 127 $message = ''; 128 switch ( $comment->comment_approved ) { 129 case '1' : 130 $message = __('This comment is currently approved.'); 131 break; 132 case 'spam' : 133 $message = __('This comment is currently marked as spam.'); 134 break; 135 case 'trash' : 136 $message = __('This comment is currently in the Trash.'); 137 break; 138 } 139 if ( $message ) 140 echo '<div class="updated"><p>' . $message . '</p></div>'; 141 } 119 142 ?> 120 121 143 <p><strong><?php _e('Caution:'); ?></strong> <?php echo $caution_msg; ?></p> 122 144 -
trunk/wp-admin/edit-comments.php
r13246 r13247 142 142 } 143 143 144 if ( isset($_GET['approved']) || isset($_GET['deleted']) || isset($_GET['trashed']) || isset($_GET['untrashed']) || isset($_GET['spammed']) || isset($_GET['unspammed']) ) {144 if ( isset($_GET['approved']) || isset($_GET['deleted']) || isset($_GET['trashed']) || isset($_GET['untrashed']) || isset($_GET['spammed']) || isset($_GET['unspammed']) || isset($_GET['same']) ) { 145 145 $approved = isset( $_GET['approved'] ) ? (int) $_GET['approved'] : 0; 146 146 $deleted = isset( $_GET['deleted'] ) ? (int) $_GET['deleted'] : 0; … … 149 149 $spammed = isset( $_GET['spammed'] ) ? (int) $_GET['spammed'] : 0; 150 150 $unspammed = isset( $_GET['unspammed'] ) ? (int) $_GET['unspammed'] : 0; 151 152 if ( $approved > 0 || $deleted > 0 || $trashed > 0 || $untrashed > 0 || $spammed > 0 || $unspammed > 0 ) { 151 $same = isset( $_GET['same'] ) ? (int) $_GET['same'] : 0; 152 153 if ( $approved > 0 || $deleted > 0 || $trashed > 0 || $untrashed > 0 || $spammed > 0 || $unspammed > 0 || $same > 0 ) { 153 154 if ( $approved > 0 ) 154 155 $messages[] = sprintf( _n( '%s comment approved', '%s comments approved', $approved ), $approved ); … … 172 173 if ( $deleted > 0 ) 173 174 $messages[] = sprintf( _n( '%s comment permanently deleted', '%s comments permanently deleted', $deleted ), $deleted ); 175 176 if ( $same > 0 && $comment = get_comment( $same ) ) { 177 switch ( $comment->comment_approved ) { 178 case '1' : 179 $messages[] = __('This comment is already approved.') . ' <a href="' . esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) . '">' . __( 'Edit comment' ) . '</a>'; 180 break; 181 case 'trash' : 182 $messages[] = __( 'This comment is already in the Trash.' ) . ' <a href="' . esc_url( admin_url( 'edit-comments.php?comment_status=trash' ) ) . '"> ' . __( 'View Trash' ) . '</a>'; 183 break; 184 case 'spam' : 185 $messages[] = __( 'This comment is already marked as spam.' ) . ' <a href="' . esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) . '">' . __( 'Edit comment' ) . '</a>'; 186 break; 187 } 188 } 174 189 175 190 echo '<div id="moderated" class="updated"><p>' . implode( "<br/>\n", $messages ) . '</p></div>';
Note: See TracChangeset
for help on using the changeset viewer.