allowed_http_request_hosts

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

WordPress Version: 5.5

/**
 * Mark allowed redirect hosts safe for HTTP requests as well.
 *
 * Attached to the {@see 'http_request_host_is_external'} filter.
 *
 * @since 3.6.0
 *
 * @param bool   $is_external
 * @param string $host
 * @return bool
 */
function allowed_http_request_hosts($is_external, $host)
{
    if (!$is_external && wp_validate_redirect('http://' . $host)) {
        $is_external = true;
    }
    return $is_external;
}

WordPress Version: 4.6

/**
 * Whitelists allowed redirect hosts for safe HTTP requests as well.
 *
 * Attached to the {@see 'http_request_host_is_external'} filter.
 *
 * @since 3.6.0
 *
 * @param bool   $is_external
 * @param string $host
 * @return bool
 */
function allowed_http_request_hosts($is_external, $host)
{
    if (!$is_external && wp_validate_redirect('http://' . $host)) {
        $is_external = true;
    }
    return $is_external;
}

WordPress Version: 4.3

/**
 * Whitelists allowed redirect hosts for safe HTTP requests as well.
 *
 * Attached to the http_request_host_is_external filter.
 *
 * @since 3.6.0
 *
 * @param bool   $is_external
 * @param string $host
 * @return bool
 */
function allowed_http_request_hosts($is_external, $host)
{
    if (!$is_external && wp_validate_redirect('http://' . $host)) {
        $is_external = true;
    }
    return $is_external;
}

WordPress Version: 3.7

/**
 * Whitelists allowed redirect hosts for safe HTTP requests as well.
 *
 * Attached to the http_request_host_is_external filter.
 *
 * @since 3.6.0
 *
 * @param bool $is_external
 * @param string $host
 * @return bool
 */
function allowed_http_request_hosts($is_external, $host)
{
    if (!$is_external && wp_validate_redirect('http://' . $host)) {
        $is_external = true;
    }
    return $is_external;
}