File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class DetectSitemapsURLs {
1414 * @return string[] list of URLs
1515 * @throws WP2StaticException
1616 */
17- public static function detect ( string $ wp_site_url ) : array {
17+ public static function detect () : array {
1818 $ sitemaps_urls = [];
1919 $ parser = new SitemapParser (
2020 'WP2Static.com ' ,
@@ -27,14 +27,13 @@ public static function detect( string $wp_site_url ) : array {
2727 ]
2828 );
2929
30- $ site_path = rtrim ( SiteInfo::getURL ( 'site ' ), '/ ' );
31-
3230 $ port_override = apply_filters (
3331 'wp2static_curl_port ' ,
3432 null
3533 );
3634
37- $ base_uri = $ site_path ;
35+ $ wp_site_url = SiteInfo::getURL ( 'home ' );
36+ $ base_uri = rtrim ($ wp_site_url , '/ ' );
3837
3938 if ( $ port_override ) {
4039 $ 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 {
9191 $ detect_sitemaps = apply_filters ( 'wp2static_detect_sitemaps ' , 1 );
9292
9393 if ( $ detect_sitemaps ) {
94- $ arrays_to_merge [] = DetectSitemapsURLs::detect ( SiteInfo:: getURL ( ' site ' ) );
94+ $ arrays_to_merge [] = DetectSitemapsURLs::detect ();
9595 }
9696
9797 $ detect_parent_theme = apply_filters ( 'wp2static_detect_parent_theme ' , 1 );
You can’t perform that action at this time.
0 commit comments