redirect_this_site

The timeline below displays how wordpress function redirect_this_site has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Ensures that the current site's domain is listed in the allowed redirect host list.
 *
 * @see wp_validate_redirect()
 * @since MU (3.0.0)
 *
 * @param array|string $deprecated Not used.
 * @return string[] {
 *     An array containing the current site's domain.
 *
 *     @type string $0 The current site's domain.
 * }
 */
function redirect_this_site($deprecated = '')
{
    return array(get_network()->domain);
}

WordPress Version: 5.4

/**
 * Ensure that the current site's domain is listed in the allowed redirect host list.
 *
 * @see wp_validate_redirect()
 * @since MU (3.0.0)
 *
 * @param array|string $deprecated Not used.
 * @return string[] {
 *     An array containing the current site's domain.
 *
 *     @type string $0 The current site's domain.
 * }
 */
function redirect_this_site($deprecated = '')
{
    return array(get_network()->domain);
}

WordPress Version: 4.9

/**
 * Ensure that the current site's domain is listed in the allowed redirect host list.
 *
 * @see wp_validate_redirect()
 * @since MU (3.0.0)
 *
 * @param array|string $deprecated Not used.
 * @return array The current site's domain
 */
function redirect_this_site($deprecated = '')
{
    return array(get_network()->domain);
}

WordPress Version: 4.7

/**
 * Ensure that the current site's domain is listed in the allowed redirect host list.
 *
 * @see wp_validate_redirect()
 * @since MU
 *
 * @param array|string $deprecated Not used.
 * @return array The current site's domain
 */
function redirect_this_site($deprecated = '')
{
    return array(get_network()->domain);
}

WordPress Version: 4.5

/**
 * Ensure that the current site's domain is listed in the allowed redirect host list.
 *
 * @see wp_validate_redirect()
 * @since MU
 *
 * @param array|string $deprecated Not used.
 * @return array The current site's domain
 */
function redirect_this_site($deprecated = '')
{
    return array(get_current_site()->domain);
}

WordPress Version: 3.8

/**
 * Ensure that the current site's domain is listed in the allowed redirect host list.
 *
 * @see wp_validate_redirect()
 * @since MU
 *
 * @return array The current site's domain
 */
function redirect_this_site($deprecated = '')
{
    return array(get_current_site()->domain);
}

WordPress Version: 3.7

/**
 * Ensure that the current site's domain is listed in the allowed redirect host list.
 *
 * @see wp_validate_redirect()
 * @since MU
 *
 * @return array The current site's domain
 */
function redirect_this_site($deprecated = '')
{
    global $current_site;
    return array($current_site->domain);
}