Skip to content

Commit

Permalink
add a better way to get the url
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrés Blanco committed Oct 16, 2024
1 parent 5827661 commit 3978554
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2826,7 +2826,9 @@ function wpcom_launchpad_is_primary_domain_wpcom() {
return false;
}

$site_slug = wpcom_get_site_slug();
$url = home_url();
$host = wp_parse_url( $url, PHP_URL_HOST );

// If site_slug ends with .wpcomstaging.com return true
return str_ends_with( $site_slug, '.wpcomstaging.com' );
return str_ends_with( $host, '.wpcomstaging.com' );
}

0 comments on commit 3978554

Please sign in to comment.