Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.227.48.91
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : home-url-helper.php
<?php

namespace Yoast\WP\SEO\Helpers;

/**
 * A helper object for the home URL.
 */
class Home_Url_Helper {

	/**
	 * The home url.
	 *
	 * @var string
	 */
	protected static $home_url;

	/**
	 * The parsed home url.
	 *
	 * @var array
	 */
	protected static $parsed_home_url;

	/**
	 * Retrieves the home url.
	 *
	 * @return string The home url.
	 */
	public function get() {
		if ( static::$home_url === null ) {
			static::$home_url = \home_url();
		}

		return static::$home_url;
	}

	/**
	 * Retrieves the home url that has been parsed.
	 *
	 * @return array The parsed url.
	 */
	public function get_parsed() {
		if ( static::$parsed_home_url === null ) {
			static::$parsed_home_url = \wp_parse_url( $this->get() );
		}

		return static::$parsed_home_url;
	}
}
© 2025 GrazzMean