wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



allowed_http_request_hosts › WordPress Function

Od3.6.0
Przestarzałyn/a
allowed_http_request_hosts ( $is_external, $host )
Parametry: (2)
  • (bool) $is_external
    Wymagane: Tak
  • (string) $host
    Wymagane: Tak
Powrót:
  • (bool)
Zdefiniowane na:
Codex:

Mark allowed redirect hosts safe for HTTP requests as well.

Attached to the {@see 'http_request_host_is_external'} filter.


Źródło

function allowed_http_request_hosts( $is_external, $host ) {
	if ( ! $is_external && wp_validate_redirect( 'http://' . $host ) ) {
		$is_external = true;
	}
	return $is_external;
}