<?php
require_once __DIR__ . '/admin.php';
$parent_file = 'edit-comments.php';
$submenu_file = 'edit-comments.php';
global $action;
wp_reset_vars( array( 'action' ) );
if ( isset( $_POST['deletecomment'] ) ) {
$action = 'deletecomment';
}
if ( 'cdc' === $action ) {
$action = 'delete';
} elseif ( 'mac' === $action ) {
$action = 'approve';
}
if ( isset( $_GET['dt'] ) ) {
if ( 'spam' === $_GET['dt'] ) {
$action = 'spam';
} elseif ( 'trash' === $_GET['dt'] ) {
$action = 'trash';
}
}
if ( isset( $_REQUEST['c'] ) ) {
$comment_id = absint( $_REQUEST['c'] );
$comment = get_comment( $comment_id );
if ( $comment && 'trash' === get_post_status( $comment->comment_post_ID ) ) {
wp_die(