hook_admin_paths
function hook_admin_paths
hook_admin_paths()
Define administrative paths.
Modules may specify whether or not the paths they define in hook_menu() are to be considered administrative. Other modules may use this information to display those pages differently (e.g. in a modal overlay, or in a different theme).
To change the administrative status of menu items defined in another module's hook_menu(), modules should implement hook_admin_paths_alter().
Return value
An associative array. For each item, the key is the path in question, in a format acceptable to drupal_match_path(). The value for each item should be TRUE (for paths considered administrative) or FALSE (for non- administrative paths).
See also
Related topics
File
- modules/system/system.api.php, line 508
- Hooks provided by Drupal core and the System module.
Code
function hook_admin_paths() { $paths = array( 'mymodule/*/add' => TRUE, 'mymodule/*/edit' => TRUE, ); return $paths; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_admin_paths/7.x