WordPress at a glance
filter is not described

allowed_redirect_hosts filter-hook . WP 2.3.0

Filters the list of allowed hosts to redirect to.


add_filter( 'allowed_redirect_hosts', 'filter_function_name_4367', 10, 2 );
function filter_function_name_4367( $hosts, $host ){
	// filter...

	return $hosts;
An array of allowed host names.
The host name of the redirect destination; empty string if not set.

Список изменений

С версии 2.3.0 Введена.

Где вызывается хук

wp-includes/pluggable.php 1480
$allowed_hosts = (array) apply_filters( 'allowed_redirect_hosts', array( $wpp['host'] ), isset( $lp['host'] ) ? $lp['host'] : '' );

Где используется хук в ядре WP

wp-includes/ms-default-filters.php 75
add_filter( 'allowed_redirect_hosts', 'redirect_this_site' );