function url_alter_is_disabled in URL alter 6
Check if running the eval() url_alter code has been disabled.
Return value
TRUE if the user is on the admin settings page or has disabled it via the query parameter, or FALSE otherwise.
3 calls to url_alter_is_disabled()
- url_alter_requirements in ./
url_alter.install - Implementation of hook_requirements().
- url_alter_url_inbound_alter in ./
url_alter.module - Implementation of hook_url_inbound_alter().
- url_alter_url_outbound_alter in ./
url_alter.module - Implementation of hook_url_outbound_alter().
File
- ./
url_alter.module, line 111
Code
function url_alter_is_disabled() {
static $is_disabled;
if (!isset($is_disabled)) {
$is_disabled = FALSE;
if (isset($_GET['url-alter-kill'])) {
// Always disable when the query parameter is defined.
$is_disabled = TRUE;
}
elseif (isset($_GET['q']) && $_GET['q'] == 'admin/settings/url-alter') {
// Always disable on the settings page.
$is_disabled = TRUE;
}
}
return $is_disabled;
}