diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 4e434a4..8a17c50 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -873,7 +873,7 @@ function hook_menu() { * @return array * An associative array keyed by the local action's route name, containing: * - title: The title of the local action. - * - routes: An array of route names for this action to be display on. + * - appears_on: An array of route names for this action to be display on. */ function hook_local_actions_info() { return array( diff --git a/core/modules/user/user.module b/core/modules/user/user.module index 322311f..b547955 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -949,9 +949,8 @@ function user_menu() { 'type' => MENU_LOCAL_TASK, ); $items['admin/people/roles/add'] = array( - 'title' => 'Add role', 'route_name' => 'user_role_add', - 'type' => MENU_LOCAL_ACTION, + 'type' => MENU_SIBLING_LOCAL_TASK, ); $items['admin/people/roles/manage/%user_role'] = array( @@ -1040,6 +1039,20 @@ function user_menu() { } /** + * Implements hook_local_actions_info(). + */ +function user_local_actions_info() { + return array( + 'user_role_add' => array( + 'title' => 'Add role', + 'appears_on' => array( + 'user_role_list', + ), + ), + ); +} + +/** * Implements hook_menu_site_status_alter(). */ function user_menu_site_status_alter(&$menu_site_status, $path) {