# wordpress-seo/28.6/src/schema-aggregator/infrastructure/wordpress-current-site-url-provider.php

Yoast SEO – Advanced SEO with real-time guidance and built-in AI, version 28.6. 23 lines.

- Page: https://pluginprobe.com/plugins/wordpress-seo/28.6/code/src/schema-aggregator/infrastructure/wordpress-current-site-url-provider.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/28.6/raw/src/schema-aggregator/infrastructure/wordpress-current-site-url-provider.php
- Modified: 2026-02-17T12:17:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wordpress-seo/28.6/code/src/schema-aggregator/infrastructure/wordpress-current-site-url-provider.php#L10-L20`.

```php
<?php

// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\Schema_Aggregator\Infrastructure;

use Yoast\WP\SEO\Schema_Aggregator\Domain\Current_Site_URL_Provider_Interface;

/**
 * WordPress implementation of current site URL provider.
 */
class WordPress_Current_Site_URL_Provider implements Current_Site_URL_Provider_Interface {

	/**
	 * Gets the current site's home URL with trailing slash.
	 *
	 * @return string The current site's home URL.
	 */
	public function get_current_site_url(): string {
		$blog_id = \get_current_blog_id();
		return \trailingslashit( \get_home_url( $blog_id ) );
	}
}

```
