wp_redirect_status хук-фильтрWP 2.3.0

Filters the redirect HTTP response status code to use.

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

add_filter( 'wp_redirect_status', 'wp_kama_redirect_status_filter', 10, 2 );

/**
 * Function for `wp_redirect_status` filter-hook.
 * 
 * @param int    $status   The HTTP response status code to use.
 * @param string $location The path or URL to redirect to.
 *
 * @return int
 */
function wp_kama_redirect_status_filter( $status, $location ){

	// filter...
	return $status;
}
$status(int)
The HTTP response status code to use.
$location(строка)
The path or URL to redirect to.

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

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

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

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

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

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