redirect_this_site() WordPress Function

The redirect_this_site() function is a simple way to redirect a WordPress site to a new URL. This is useful if you want to move your site to a new domain or change the structure of your URLs. The function takes two arguments: the old URL and the new URL. Simply specify the URL you want to redirect to in the second argument and the function will take care of the rest.

redirect_this_site( array|string $deprecated = '' ) #

Ensures that the current site’s domain is listed in the allowed redirect host list.


Description

Top ↑

See also


Top ↑

Parameters

$deprecated

(array|string)(Optional)Not used.

Default value: ''


Top ↑

Return

(string[]) An array containing the current site's domain.

  • (string) The current site's domain.


Top ↑

Source

File: wp-includes/ms-functions.php

function redirect_this_site( $deprecated = '' ) {
	return array( get_network()->domain );
}


Top ↑

Changelog

Changelog
VersionDescription
MU (3.0.0)Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More