File tree 2 files changed +4
-5
lines changed
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class DetectSitemapsURLs {
14
14
* @return string[] list of URLs
15
15
* @throws WP2StaticException
16
16
*/
17
- public static function detect ( string $ wp_site_url ) : array {
17
+ public static function detect () : array {
18
18
$ sitemaps_urls = [];
19
19
$ parser = new SitemapParser (
20
20
'WP2Static.com ' ,
@@ -27,14 +27,13 @@ public static function detect( string $wp_site_url ) : array {
27
27
]
28
28
);
29
29
30
- $ site_path = rtrim ( SiteInfo::getURL ( 'site ' ), '/ ' );
31
-
32
30
$ port_override = apply_filters (
33
31
'wp2static_curl_port ' ,
34
32
null
35
33
);
36
34
37
- $ base_uri = $ site_path ;
35
+ $ wp_site_url = SiteInfo::getURL ( 'home ' );
36
+ $ base_uri = rtrim ($ wp_site_url , '/ ' );
38
37
39
38
if ( $ port_override ) {
40
39
$ base_uri = "{$ base_uri }: {$ port_override }" ;
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ public static function detectURLs() : string {
91
91
$ detect_sitemaps = apply_filters ( 'wp2static_detect_sitemaps ' , 1 );
92
92
93
93
if ( $ detect_sitemaps ) {
94
- $ arrays_to_merge [] = DetectSitemapsURLs::detect ( SiteInfo:: getURL ( ' site ' ) );
94
+ $ arrays_to_merge [] = DetectSitemapsURLs::detect ();
95
95
}
96
96
97
97
$ detect_parent_theme = apply_filters ( 'wp2static_detect_parent_theme ' , 1 );
You can’t perform that action at this time.
0 commit comments