Changeset 48959 for branches/5.5/src/wp-admin/comment.php
- Timestamp:
- 09/08/2020 10:44:56 PM (4 years ago)
- Location:
- branches/5.5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.5
-
branches/5.5/src/wp-admin/comment.php
r48594 r48959 37 37 } 38 38 39 $comment_id = absint( $_GET['c'] ); 40 $comment = get_comment( $comment_id ); 41 42 // Prevent actions on a comment associated with a trashed post. 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 ); 39 if ( isset( $_REQUEST['c'] ) ) { 40 $comment_id = absint( $_REQUEST['c'] ); 41 $comment = get_comment( $comment_id ); 42 43 // Prevent actions on a comment associated with a trashed post. 44 if ( $comment && 'trash' === get_post_status( $comment->comment_post_ID ) ) { 45 wp_die( 46 __( 'You can’t edit this comment because the associated post is in the Trash. Please restore the post first, then try again.' ) 47 ); 48 } 49 } else { 50 $comment = null; 47 51 } 48 52
Note: See TracChangeset
for help on using the changeset viewer.