wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
is_allowed_http_origin › WordPress Function
Seit3.4.0
Veraltetn/v
› is_allowed_http_origin ( $origin = null )
| Parameter: |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Determines if the HTTP origin is an authorized one.
Ähnliche Funktionen: get_allowed_http_origins, get_http_origin, ms_allowed_http_request_hosts, add_allowed_options, allowed_tags
Quellcode
function is_allowed_http_origin( $origin = null ) {
$origin_arg = $origin;
if ( null === $origin ) {
$origin = get_http_origin();
}
if ( $origin && ! in_array( $origin, get_allowed_http_origins(), true ) ) {
$origin = '';
}
/**
* Changes the allowed HTTP origin result.
*
* @since 3.4.0
*
* @param string $origin Origin URL if allowed, empty string if not.
* @param string $origin_arg Original origin string passed into is_allowed_http_origin function.
*/
return apply_filters( 'allowed_http_origin', $origin, $origin_arg );
}