getOptionsWithDefaults(); // Get the current user's settings mode preference $settingsMode = $this->logic->getSettingsMode(); // if the current URL does not match the chosen menuLocation then redirect to the correct URL $helperFunctions = ABJ_404_Solution_Functions::getInstance(); $urlParts = parse_url($helperFunctions->normalizeUrlString($_SERVER['REQUEST_URI'] ?? '')); $currentURL = (is_array($urlParts) && isset($urlParts['path'])) ? $urlParts['path'] : ''; if (is_array($options) && isset($options['menuLocation']) && $options['menuLocation'] == 'settingsLevel') { if ($this->f->strpos($currentURL, 'options-general.php') !== false) { // the option changed and we're at the wrong URL now, so we redirect to the correct one. $this->logic->forceRedirect(admin_url() . "admin.php?page=" . ABJ404_PP . '&subpage=abj404_options'); } } else if ($this->f->strpos($currentURL, 'admin.php') !== false) { // if the current URL has admin.php then the URLs don't match and we need to reload. $this->logic->forceRedirect(admin_url() . "options-general.php?page=" . ABJ404_PP . '&subpage=abj404_options'); } // Toast notification container $abj404view->echoToastNotification(); // Options page header with mode toggle and expand button echo "\n