Summery Summery
Whitelists any domain in a multisite installation for safe HTTP requests.
Syntax Syntax
Description Description
Attached to the ‘http_request_host_is_external’ filter.
Parameters Parameters
- $is_external
-
(Required)
- $host
-
(Required)
Return Return
(bool)
Source Source
File: wp-includes/http.php
static $queried = array();
if ( $is_external ) {
return $is_external;
}
if ( get_network()->domain === $host ) {
return true;
}
if ( isset( $queried[ $host ] ) ) {
return $queried[ $host ];
}
$queried[ $host ] = (bool) $wpdb->get_var( $wpdb->prepare( "SELECT domain FROM $wpdb->blogs WHERE domain = %s LIMIT 1", $host ) );
return $queried[ $host ];
}
/**
Advertisement
Changelog Changelog
| Version | Description |
|---|---|
| 3.6.0 | Introduced. |