7.x system.api.php hook_admin_paths_alter(&$paths)

Redefine administrative paths defined by other modules.

Parameters

$paths: An associative array of administrative paths, as defined by implementations of hook_admin_paths().

See also

hook_admin_paths()

Related topics

1 invocation of hook_admin_paths_alter()
path_get_admin_paths in includes/path.inc
Gets a list of administrative and non-administrative paths.

File

modules/system/system.api.php, line 525
Hooks provided by Drupal core and the System module.

Code

function hook_admin_paths_alter(&$paths) {

  // Treat all user pages as administrative.
  $paths['user'] = TRUE;
  $paths['user/*'] = TRUE;

  // Treat the forum topic node form as a non-administrative page.
  $paths['node/add/forum'] = FALSE;
}

Comments

hamidrezanateghi’s picture

Can someone name a module that uses this hook to redefine other modules' administrative paths?
Thank you in advance.

Chi’s picture

mogtofu33’s picture