Url_Helper::network_safe_home_url()publicYoast 1.0

Retrieve network home URL if plugin is network-activated, or home url otherwise.

Метод класса: Url_Helper{}

Хуки из метода


Строку. Home URL with optional path, appropriately slashed if not.


$Url_Helper = new Url_Helper();

Код Url_Helper::network_safe_home_url() Yoast 21.6

public function network_safe_home_url() {
	 * Action: 'wpseo_home_url' - Allows overriding of the home URL.
	\do_action( 'wpseo_home_url' );

	// If the plugin is network-activated, use the network home URL.
	if ( self::is_plugin_network_active() ) {
		return \network_home_url();

	return \home_url();