improve getCurrentRoutePath for site with suffix path

This commit is contained in:
2025-08-19 11:34:21 +03:30
parent ad3a70973d
commit 50a15f699c
+3 -1
View File
@@ -33,7 +33,9 @@ abstract class BaseFormRequest
public function getCurrentRoutePath(): string public function getCurrentRoutePath(): string
{ {
return $this->url['path']; $site = parse_url(get_option('siteurl'));
return str_replace($site['path'], null, $this->url['path']);
} }
public function validate(): void public function validate(): void