| 1 |
<?php |
| 2 |
// phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded |
| 3 |
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure. |
| 4 |
namespace Yoast\WP\SEO\MyYoast_Client\Infrastructure\WordPress; |
| 5 |
|
| 6 |
use Yoast\WP\SEO\MyYoast_Client\Application\Ports\Site_URL_Provider_Interface; |
| 7 |
|
| 8 |
/** |
| 9 |
* WordPress implementation of the site URL provider. |
| 10 |
*/ |
| 11 |
class Site_URL_Provider implements Site_URL_Provider_Interface { |
| 12 |
|
| 13 |
/** |
| 14 |
* Returns the site URL. |
| 15 |
* |
| 16 |
* @return string The site URL. |
| 17 |
*/ |
| 18 |
public function get(): string { |
| 19 |
return \site_url(); |
| 20 |
} |
| 21 |
} |
| 22 |
|