1 common.inc backdrop_goto_deprecated($path = '', array $options = array(), $http_response_code = 302)

Wraps backdrop_goto() to include a deprecated log message.

In earlier versions of Backdrop, this was sometimes used directly as a menu callback. It is now recommended to use system_redirect_deprecated_page() instead when deprecating paths, because that function can handle wildcards and path mapping. It resolves the final path and then calls this function to perform the redirect.

@since 1.5.0

See also

backdrop_goto()

system_redirect_deprecated_page()

Related topics

File

core/includes/common.inc, line 790
Common functions that many Backdrop modules will need to reference.

Code

function backdrop_goto_deprecated($path = '', array $options = array(), $http_response_code = 302) {
  watchdog('system', 'The path %path has been deprecated and will be removed in the next major release of Backdrop. This path was called from %referrer. It is recommended to remove it from any existing links.', array('%path' => $_GET['q'], '%referrer' => $_SERVER['HTTP_REFERER']), WATCHDOG_DEPRECATED);
  backdrop_goto($path, $options, $http_response_code);
}