public function block_direct_cron()
{
if (false !== stripos($_SERVER['REQUEST_URI'], '/wp-cron.php') || false !== stripos($_SERVER['SCRIPT_NAME'], '/wp-cron.php')) {
status_header(403);
wp_send_json_error(new \WP_Error('forbidden', sprintf(__('Normal cron execution is blocked when the %s plugin is active.', 'automattic-cron-control'), 'Cron Control')), array('status' => 400));
}
}