if ( !
( isset( $_GET['recheckqueue'
] ) || ( isset( $_REQUEST['action'
] ) && 'akismet_recheck_queue' ==
$_REQUEST['action'
] ) ) ) { return;
} if ( !
wp_verify_nonce( $_POST['nonce'
], 'akismet_check_for_spam'
) ) { wp_send_json( array
( 'error' =>
__( 'You don’t have permission to do that.', 'akismet'
),
));
return;
} $result_counts = self::
recheck_queue_portion( empty( $_POST['offset'
] ) ? 0 :
$_POST['offset'
],
empty( $_POST['limit'
] ) ? 100 :
$_POST['limit'
] );
if ( defined( 'DOING_AJAX'
) && DOING_AJAX
) { wp_send_json( array
( 'counts' =>
$result_counts,
));
} else { $redirect_to =
isset( $_SERVER['HTTP_REFERER'
] ) ?
$_SERVER['HTTP_REFERER'
] :
admin_url( 'edit-comments.php'
);
wp_safe_redirect( $redirect_to );
exit;
} }