wp_safe_redirect_fallback хук-фильтрWP 4.3.0

Filters the redirect fallback URL for when the provided redirect is not safe (local).

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

add_filter( 'wp_safe_redirect_fallback', 'wp_kama_safe_redirect_fallback_filter', 10, 2 );

/**
 * Function for `wp_safe_redirect_fallback` filter-hook.
 * 
 * @param string $fallback_url The fallback URL to use by default.
 * @param int    $status       The HTTP response status code to use.
 *
 * @return string
 */
function wp_kama_safe_redirect_fallback_filter( $fallback_url, $status ){

	// filter...
	return $fallback_url;
}
$fallback_url(строка)
The fallback URL to use by default.
$status(int)
The HTTP response status code to use.

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

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

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

wp_safe_redirect()
wp_safe_redirect_fallback
wp-includes/pluggable.php 1541
$fallback_url = apply_filters( 'wp_safe_redirect_fallback', admin_url(), $status );

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

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