diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 6ed67a1..8bd76ae 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -240,13 +240,9 @@ function taxonomy_menu() { ); $items['admin/structure/taxonomy/add'] = array( 'title' => 'Add vocabulary', - 'page callback' => 'taxonomy_vocabulary_add', - 'access callback' => 'entity_page_create_access', - 'access arguments' => array('taxonomy_vocabulary'), - 'type' => MENU_LOCAL_ACTION, - 'file' => 'taxonomy.admin.inc', + 'route_name' => 'taxonomy_vocabulary_add', + 'type' => MENU_SIBLING_LOCAL_TASK, ); - $items['taxonomy/term/%taxonomy_term'] = array( 'title' => 'Taxonomy term', 'title callback' => 'taxonomy_term_title', @@ -1306,3 +1302,18 @@ function taxonomy_library_info() { return $libraries; } + +/** + * Implements hook_local_actions. + */ +function taxonomy_local_actions() { + return array( + array( + 'route_name' => 'taxonomy_vocabulary_add', + 'title' => t('Add vocabulary'), + 'appears_on' => array( + 'taxonomy_vocabulary_list', + ), + ), + ); +} diff --git a/core/modules/taxonomy/taxonomy.routing.yml b/core/modules/taxonomy/taxonomy.routing.yml index e98df37..75e5589 100644 --- a/core/modules/taxonomy/taxonomy.routing.yml +++ b/core/modules/taxonomy/taxonomy.routing.yml @@ -5,3 +5,10 @@ taxonomy_vocabulary_list: entity_type: 'taxonomy_vocabulary' requirements: _permission: 'administer taxonomy' + +taxonomy_vocabulary_add: + pattern: '/admin/structure/taxonomy/add' + defaults: + _entity_form: taxonomy_vocabulary + requirements: + _permission: 'administer taxonomy'