x_redirect_by хук-фильтрWP 5.1.0

Filters the X-Redirect-By header.

Allows applications to identify themselves when they're doing a redirect.

Использование

add_filter( 'x_redirect_by', 'wp_kama_x_redirect_by_filter', 10, 3 );

/**
 * Function for `x_redirect_by` filter-hook.
 * 
 * @param string|false $x_redirect_by The application doing the redirect or false to omit the header.
 * @param int          $status        Status code to use.
 * @param string       $location      The path to redirect to.
 *
 * @return string|false
 */
function wp_kama_x_redirect_by_filter( $x_redirect_by, $status, $location ){

	// filter...
	return $x_redirect_by;
}
$x_redirect_by(строка|false)
The application doing the redirect or false to omit the header.
$status(int)
Status code to use.
$location(строка)
The path to redirect to.

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

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

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

wp_redirect()
x_redirect_by
wp-includes/pluggable.php 1433
$x_redirect_by = apply_filters( 'x_redirect_by', $x_redirect_by, $status, $location );

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

Использование не найдено.