Changeset 45583 for trunk/src/wp-admin/edit-comments.php
- Timestamp:
- 07/01/2019 12:50:14 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-comments.php
r45140 r45583 40 40 } 41 41 42 $approved = $unapproved = $spammed = $unspammed = $trashed = $untrashed = $deleted = 0; 42 $approved = 0; 43 $unapproved = 0; 44 $spammed = 0; 45 $unspammed = 0; 46 $trashed = 0; 47 $untrashed = 0; 48 $deleted = 0; 43 49 44 50 $redirect_to = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'spammed', 'unspammed', 'approved', 'unapproved', 'ids' ), wp_get_referer() ); … … 308 314 } 309 315 310 if ( $same > 0 && $comment = get_comment( $same ) ) { 311 switch ( $comment->comment_approved ) { 312 case '1': 313 $messages[] = __( 'This comment is already approved.' ) . ' <a href="' . esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) . '">' . __( 'Edit comment' ) . '</a>'; 314 break; 315 case 'trash': 316 $messages[] = __( 'This comment is already in the Trash.' ) . ' <a href="' . esc_url( admin_url( 'edit-comments.php?comment_status=trash' ) ) . '"> ' . __( 'View Trash' ) . '</a>'; 317 break; 318 case 'spam': 319 $messages[] = __( 'This comment is already marked as spam.' ) . ' <a href="' . esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) . '">' . __( 'Edit comment' ) . '</a>'; 320 break; 316 if ( $same > 0 ) { 317 $comment = get_comment( $same ); 318 if ( $comment ) { 319 switch ( $comment->comment_approved ) { 320 case '1': 321 $messages[] = __( 'This comment is already approved.' ) . ' <a href="' . esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) . '">' . __( 'Edit comment' ) . '</a>'; 322 break; 323 case 'trash': 324 $messages[] = __( 'This comment is already in the Trash.' ) . ' <a href="' . esc_url( admin_url( 'edit-comments.php?comment_status=trash' ) ) . '"> ' . __( 'View Trash' ) . '</a>'; 325 break; 326 case 'spam': 327 $messages[] = __( 'This comment is already marked as spam.' ) . ' <a href="' . esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) . '">' . __( 'Edit comment' ) . '</a>'; 328 break; 329 } 321 330 } 322 331 }
Note: See TracChangeset
for help on using the changeset viewer.