diff --git a/src/DetectSitemapsURLs.php b/src/DetectSitemapsURLs.php index fee16c53..1602b825 100644 --- a/src/DetectSitemapsURLs.php +++ b/src/DetectSitemapsURLs.php @@ -14,7 +14,7 @@ class DetectSitemapsURLs { * @return string[] list of URLs * @throws WP2StaticException */ - public static function detect( string $wp_site_url ) : array { + public static function detect() : array { $sitemaps_urls = []; $parser = new SitemapParser( 'WP2Static.com', @@ -27,14 +27,13 @@ public static function detect( string $wp_site_url ) : array { ] ); - $site_path = rtrim( SiteInfo::getURL( 'site' ), '/' ); - $port_override = apply_filters( 'wp2static_curl_port', null ); - $base_uri = $site_path; + $wp_site_url = SiteInfo::getURL( 'home' ); + $base_uri = rtrim( $wp_site_url, '/' ); if ( $port_override ) { $base_uri = "{$base_uri}:{$port_override}"; diff --git a/src/URLDetector.php b/src/URLDetector.php index aca2739e..2405eb77 100755 --- a/src/URLDetector.php +++ b/src/URLDetector.php @@ -91,7 +91,7 @@ public static function detectURLs() : string { $detect_sitemaps = apply_filters( 'wp2static_detect_sitemaps', 1 ); if ( $detect_sitemaps ) { - $arrays_to_merge[] = DetectSitemapsURLs::detect( SiteInfo::getURL( 'site' ) ); + $arrays_to_merge[] = DetectSitemapsURLs::detect(); } $detect_parent_theme = apply_filters( 'wp2static_detect_parent_theme', 1 );