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
See also
Parameters
- $deprecated
(array|string)(Optional)Not used.
Default value: ''
Return
(string[]) An array containing the current site's domain.
- (string) The current site's domain.
Source
File: wp-includes/ms-functions.php
function redirect_this_site( $deprecated = '' ) { return array( get_network()->domain ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
MU (3.0.0) | Introduced. |