allowed_redirect_hosts хук-фильтр . WP 2.3.0
Filters the list of allowed hosts to redirect to.
Использование
add_filter( 'allowed_redirect_hosts', 'filter_function_name_9395', 10, 2 ); function filter_function_name_9395( $hosts, $host ){ // filter... return $hosts; }
- $hosts(строка[])
- An array of allowed host names.
- $host(строка)
- The host name of the redirect destination; empty string if not set.
Список изменений
С версии 2.3.0 | Введена. |
Где вызывается хук
allowed_redirect_hosts
wp-includes/pluggable.php 1480
$allowed_hosts = (array) apply_filters( 'allowed_redirect_hosts', array( $wpp['host'] ), isset( $lp['host'] ) ? $lp['host'] : '' );
Где используется хук в ядре WordPress
wp-includes/pluggable.php 75
add_filter( 'allowed_redirect_hosts', 'redirect_this_site' );