Changeset 48050 for trunk/src/wp-admin/comment.php
- Timestamp:
- 06/15/2020 11:04:27 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/comment.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/comment.php
r47785 r48050 35 35 $action = 'trash'; 36 36 } 37 } 38 39 // Prevent actions on a comment associated with a trashed post. 40 $comment_id = absint( $_GET['c'] ); 41 $comment = get_comment( $comment_id ); 42 43 if ( 'trash' === get_post_status( $comment->comment_post_ID ) ) { 44 wp_die( 45 __( 'You can’t edit this comment because the associated post is in the Trash. Please restore the post first, then try again.' ) 46 ); 37 47 } 38 48 … … 61 71 require_once ABSPATH . 'wp-admin/admin-header.php'; 62 72 63 $comment_id = absint( $_GET['c'] );64 65 $comment = get_comment( $comment_id );66 73 if ( ! $comment ) { 67 74 comment_footer_die( __( 'Invalid comment ID.' ) . sprintf( ' <a href="%s">' . __( 'Go back' ) . '</a>.', 'javascript:history.go(-1)' ) ); … … 88 95 $title = __( 'Moderate Comment' ); 89 96 90 $comment_id = absint( $_GET['c'] );91 92 $comment = get_comment( $comment_id );93 97 if ( ! $comment ) { 94 98 wp_redirect( admin_url( 'edit-comments.php?error=1' ) );
Note: See TracChangeset
for help on using the changeset viewer.