Wierd admin_path behaviour, does it should be like this? I have even two questions - both are connected to hook_admin_path().


Does menu path 'user/*/edit' and 'user/*/account/edit' are the same, from admin_path perspective and was D7 designed with such functionality? I want menu item 'user/*/account/edit' to be shown on default theme.


When I try to show a menu item with path:

'user/*/account/edit'  - showed on admin theme
'user/*/account/edit1' - showed on default theme

result of path_get_admin_paths():
Array ([admin] =&gt; 
admin
admin/*
user/*/cancel
user/*/edit
user/*/edit/*
...
)


checked with:

path_is_admin('user/%user/account/edit'); // TRUE
drupal_match_path('user/%user/account/edit', 'user/*/edit'); // TRUE


2 . I tryed to change it with

function MY_MODULE_admin_paths_alter() {
  $paths = array(
    'user/*/edit' =&gt; FALSE,
    'user/*/edit/*' =&gt; FALSE,
  );
}


But result of path_get_admin_paths() is the same? No other functions call hook_admin_paths_alter(). As I understand, this function shall be the last and should change admin_path.

Any ideas about that?
Thank you Clive,
I mistakenly used pattern from hook_admin_paths() and not hook_admin_paths_alter() function. 

The correct way was:

function MY_MODULE_admin_paths_alter(&amp;$paths) {
  $paths['user/*/edit'] = FALSE;
  $paths['user/*/edit/*'] = FALSE;
}