function redirect_disable_by_path in Redirect 7.2
Same name and namespace in other branches
- 7 redirect.module \redirect_disable_by_path()
Disable any redirects associated with a path.
Given a source like 'node/1' this function will delete any redirects that have that specific source.
Parameters
$path: An string with an internal Drupal path.
@langauge: The langcode of the path.
Related topics
2 calls to redirect_disable_by_path()
- redirect_path_insert in ./
redirect.module - Implements hook_path_insert().
- redirect_path_update in ./
redirect.module - Implements hook_path_update().
File
- ./
redirect.module, line 954
Code
function redirect_disable_by_path($path, $language) {
$rids = redirect_fetch_rids_by_path($path, $language, FALSE);
if ($rids) {
return redirect_change_status_multiple($rids, 0);
}
}