<?php

use Dolphy\Plugin\Ajax\Response;

defined('DOLPHY_PLUGIN') or die('Access Denied!');

add_action('init', function () {
  global $pagenow, $wp_query;

  if ($pagenow === 'wp-login.php') {
    if (isset($_GET['action']) && $_GET['action'] === 'logout') {
      return;
    }

    status_header(404);
    $wp_query->is_404 = true;

    include get_404_template();
    exit;
  }
}, 1);
