public function getVar(string $specific_ep = '', $default = null)
    {
        if (!did_action('wp')) {
            throw new Exception('`wp` action not done yet.');
        }
        $WP       = $GLOBALS['wp']; // WP class instance.
        $WP_Query = $GLOBALS['wp_the_query']; // Main.

        if (!get_option('permalink_structure')) {
            return $default; // Impossible.
        } elseif (empty($WP->request) || empty($WP_Query->query_vars)) {
            return $default; // Impossible.
        } elseif (!($request_components = explode('/', $WP->request))) {
            return $default; // Impossible.
        }
        foreach ($request_components as $_maybe_ep) {
            if (!$_maybe_ep) {
                continue; // It's empty, bypass.
            } elseif ($specific_ep && $_maybe_ep !== $specific_ep) {
                continue; // Not what we're looking for.
            } elseif (!isset($WP_Query->query_vars[$_maybe_ep])) {
                continue; // It's not an endpoint; query var not set.
            } else {
                return get_query_var($_maybe_ep, $default);
            }
        } // unset($_maybe_ep); // Housekeeping.

        return $default;
    }