<?php

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

add_filter('login_url', function ($login_url, $redirect, $force_reauth) {
  $url = DOLPHY_SIGNIN_URL;

  if (!empty($redirect)) {
    $url = add_query_arg(array('redirect' => $redirect), $url);
  }

  return $url;
}, 5000, 3);

add_filter('register_url', function ($url) {
  return DOLPHY_SIGNUP_URL;
}, 5000);

add_filter('lostpassword_url', function ($url, $redirect) {
  $url = DOLPHY_FORGOTPASSWORD_URL;

  if (!empty($redirect)) {
    $url = add_query_arg(array('redirect' => $redirect), $url);
  }

  return $url;
}, 5000, 2);

// ------------------------

// add_filter('admin_url', function ($url, $path, $blog_id) {
//   // echo $url; exit;
//   return $url;
// }, 5000, 3);
