1 redirect.module redirect_get_current_redirect()

Attempt to find redirect from current path, query string, and language code.

Return value

Redirect: The redirect object (if any) for the current page. FALSE if not found.

File

core/modules/redirect/redirect.module, line 225

Code

function redirect_get_current_redirect() {
  $redirect = backdrop_static('redirect_set_current_redirect', NULL);

  if (!isset($redirect)) {
    $redirect = redirect_load_by_source(current_path(), $GLOBALS['language']->langcode, backdrop_get_query_parameters());
  }

  return $redirect;
}