diff --git a/core/CHANGELOG.txt b/core/CHANGELOG.txt index 3420ece..5747107 100644 --- a/core/CHANGELOG.txt +++ b/core/CHANGELOG.txt @@ -81,7 +81,7 @@ Drupal 8.0, xxxx-xx-xx (development version) environments. * Improved content language support: * Made it possible to assign language to taxonomy terms, vocabularies, - menu items, and files. + menu links, and files. * Added a field translation based content translation module that applies to all content entities. * Removed the old node-copy based content translation module. @@ -398,7 +398,7 @@ Drupal 6.0, 2008-02-13 database rights. * Dynamically check password strength and confirmation. * Refactored poll administration. - * Implemented drag-and-drop positioning for blocks, menu items, taxonomy + * Implemented drag-and-drop positioning for blocks, menu links, taxonomy vocabularies and terms, forums, profile fields, and input format filters. - Theme system: * Added .info files to themes and made it easier to specify regions and @@ -499,7 +499,7 @@ Drupal 5.0, 2007-01-15 ---------------------- - Completely retooled the administration page * /Admin now contains an administration page which may be themed - * Reorganised administration menu items by task and by module + * Reorganised administration menu links by task and by module * Added a status report page with detailed PHP/MySQL/Drupal information - Added web-based installer which can: * Check installation and run-time requirements @@ -527,7 +527,7 @@ Drupal 5.0, 2007-01-15 * Made it easy to investigate popular search terms. * Added a 'select all' checkbox and a range select feature to administration tables. * Simplified the 'break' tag to split teasers from body. - * Use proper capitalization for titles, menu items and operations. + * Use proper capitalization for titles, menu links and operations. - Integrated urlfilter.module into filter.module - Block system: * Extended the block visibility settings with a role specific setting. @@ -821,7 +821,7 @@ Drupal 4.5.1, 2004-12-01 Drupal 4.5.0, 2004-10-18 ------------------------ - Navigation: - * Made it possible to add, delete, rename and move menu items. + * Made it possible to add, delete, rename and move menu links. * Introduced tabs and subtabs for local tasks. * Reorganized the navigation menus. - User management: diff --git a/core/LICENSE.txt b/core/LICENSE.txt index 94fb846..a40b7b9 100644 --- a/core/LICENSE.txt +++ b/core/LICENSE.txt @@ -320,7 +320,7 @@ when it starts in an interactive mode: The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. +mouse-clicks or menu links--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if diff --git a/core/lib/Drupal/Core/Menu/MenuLinkTreeInterface.php b/core/lib/Drupal/Core/Menu/MenuLinkTreeInterface.php index e414666..09589a0 100644 --- a/core/lib/Drupal/Core/Menu/MenuLinkTreeInterface.php +++ b/core/lib/Drupal/Core/Menu/MenuLinkTreeInterface.php @@ -84,10 +84,10 @@ public function transform(array $tree, array $manipulators); /** * Builds a renderable array from a menu tree. * - * The menu item's LI element is given one of the following classes: - * - expanded: The menu item is showing its submenu. - * - collapsed: The menu item has a submenu that is not shown. - * - leaf: The menu item has no submenu. + * The menu link's LI element is given one of the following classes: + * - expanded: The menu link is showing its submenu. + * - collapsed: The menu link has a submenu that is not shown. + * - leaf: The menu link has no submenu. * * @param \Drupal\Core\Menu\MenuLinkTreeElement[] $tree * A data structure representing the tree, as returned from diff --git a/core/lib/Drupal/Core/Menu/MenuTreeStorage.php b/core/lib/Drupal/Core/Menu/MenuTreeStorage.php index 659d6be..8d869c7 100644 --- a/core/lib/Drupal/Core/Menu/MenuTreeStorage.php +++ b/core/lib/Drupal/Core/Menu/MenuTreeStorage.php @@ -1218,7 +1218,7 @@ protected static function schemaDefinition() { 'default' => '', ), 'route_name' => array( - 'description' => 'The machine name of a defined Symfony Route this menu item represents.', + 'description' => 'The machine name of a defined Symfony Route this menu link represents.', 'type' => 'varchar_ascii', 'length' => 255, ), @@ -1287,7 +1287,7 @@ protected static function schemaDefinition() { 'default' => 'system', ), 'enabled' => array( - 'description' => 'A flag for whether the link should be rendered in menus. (0 = a disabled menu item that may be shown on admin screens, 1 = a normal, visible link)', + 'description' => 'A flag for whether the link should be rendered in menus. (0 = a disabled menu link that may be shown on admin screens, 1 = a normal, visible link)', 'type' => 'int', 'not null' => TRUE, 'default' => 1, diff --git a/core/modules/book/src/BookManagerInterface.php b/core/modules/book/src/BookManagerInterface.php index db3d1dd..0a32fc6 100644 --- a/core/modules/book/src/BookManagerInterface.php +++ b/core/modules/book/src/BookManagerInterface.php @@ -245,9 +245,9 @@ public function deleteFromBook($nid); /** * Returns a rendered menu tree. * - * The menu item's LI element is given one of the following classes: - * - expanded: The menu item is showing its submenu. - * - collapsed: The menu item has a submenu which is not shown. + * The menu link's LI element is given one of the following classes: + * - expanded: The menu link is showing its submenu. + * - collapsed: The menu link has a submenu which is not shown. * * @param array $tree * A data structure representing the tree as returned from buildBookOutlineData. diff --git a/core/modules/book/src/Form/BookAdminEditForm.php b/core/modules/book/src/Form/BookAdminEditForm.php index 9df174d..bb8b966 100644 --- a/core/modules/book/src/Form/BookAdminEditForm.php +++ b/core/modules/book/src/Form/BookAdminEditForm.php @@ -108,7 +108,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $row = $form['table'][$key]; $values = $form_state->getValue(array('table', $key)); - // Update menu item if moved. + // Update menu link if moved. if ($row['parent']['pid']['#default_value'] != $values['pid'] || $row['weight']['#default_value'] != $values['weight']) { $link = $this->bookManager->loadBookLink($values['nid'], FALSE); $link['weight'] = $values['weight']; diff --git a/core/modules/ckeditor/js/plugins/drupallink/plugin.js b/core/modules/ckeditor/js/plugins/drupallink/plugin.js index 04d8aba..3e97cdf 100644 --- a/core/modules/ckeditor/js/plugins/drupallink/plugin.js +++ b/core/modules/ckeditor/js/plugins/drupallink/plugin.js @@ -154,7 +154,7 @@ } }); - // If the "menu" plugin is loaded, register the menu items. + // If the "menu" plugin is loaded, register the menu links. if (editor.addMenuItems) { editor.addMenuItems({ link: { diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module index b572c82..4e5c4a3 100644 --- a/core/modules/field_ui/field_ui.module +++ b/core/modules/field_ui/field_ui.module @@ -103,7 +103,7 @@ function field_ui_entity_type_build(array &$entity_types) { */ function field_ui_entity_bundle_create($entity_type, $bundle) { // When a new bundle is created, the menu needs to be rebuilt to add our - // menu item tabs. + // menu link tabs. \Drupal::service('router.builder')->setRebuildNeeded(); } @@ -112,7 +112,7 @@ function field_ui_entity_bundle_create($entity_type, $bundle) { */ function field_ui_entity_bundle_rename($entity_type, $bundle_old, $bundle_new) { // When a bundle is renamed, the menu needs to be rebuilt to add our - // menu item tabs. + // menu link tabs. \Drupal::service('router.builder')->setRebuildNeeded(); } diff --git a/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php b/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php index 5260513..0133ea6 100644 --- a/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php +++ b/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php @@ -108,10 +108,10 @@ public function getDerivativeDefinitions($base_plugin_definition) { ); // View and form modes secondary tabs. - // The same base $path for the menu item (with a placeholder) can be + // The same base $path for the menu link (with a placeholder) can be // used for all bundles of a given entity type; but depending on // administrator settings, each bundle has a different set of view - // modes available for customisation. So we define menu items for all + // modes available for customisation. So we define menu link for all // view modes, and use a route requirement to determine which ones are // actually visible for a given bundle. $this->derivatives['field_form_display_default_' . $entity_type_id] = array( diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module index 01a66e5..5e5c1ca 100644 --- a/core/modules/forum/forum.module +++ b/core/modules/forum/forum.module @@ -44,7 +44,7 @@ function forum_help($route_name, RouteMatchInterface $route_match) { $output .= '
' . t('Starting a discussion') . '
'; $output .= '
' . t('The Forum topic link on the Add content page creates the first post of a new threaded discussion, or thread.', array('!create-topic' => \Drupal::url('node.add', array('node_type' => 'forum')), '!content-add' => \Drupal::url('node.add_page'))) . '
'; $output .= '
' . t('Navigating in the forum') . '
'; - $output .= '
' . t('Enabling the Forum module provides a default Forums menu item in the Tools menu that links to the Forums page.', array('!forums' => \Drupal::url('forum.index'))) . '
'; + $output .= '
' . t('Enabling the Forum module provides a default Forums menu link in the Tools menu that links to the Forums page.', array('!forums' => \Drupal::url('forum.index'))) . '
'; $output .= '
' . t('Moving forum topics') . '
'; $output .= '
' . t('A forum topic (and all of its comments) may be moved between forums by selecting a different forum while editing a forum topic. When moving a forum topic between forums, the Leave shadow copy option creates a link in the original forum pointing to the new location.') . '
'; $output .= '
' . t('Locking and disabling comments') . '
'; diff --git a/core/modules/help/src/Plugin/Block/HelpBlock.php b/core/modules/help/src/Plugin/Block/HelpBlock.php index 7b86f9f..7f8c78d 100644 --- a/core/modules/help/src/Plugin/Block/HelpBlock.php +++ b/core/modules/help/src/Plugin/Block/HelpBlock.php @@ -27,7 +27,7 @@ class HelpBlock extends BlockBase implements ContainerFactoryPluginInterface { /** - * Stores the help text associated with the active menu item. + * Stores the help text associated with the active menu link. * * @var string */ @@ -106,7 +106,7 @@ protected function blockAccess(AccountInterface $account) { } /** - * Returns the help associated with the active menu item. + * Returns the help associated with the active menu link. * * @param \Symfony\Component\HttpFoundation\Request $request * The current request. diff --git a/core/modules/locale/src/LocaleLookup.php b/core/modules/locale/src/LocaleLookup.php index f5b4fc1..fd73cd7 100644 --- a/core/modules/locale/src/LocaleLookup.php +++ b/core/modules/locale/src/LocaleLookup.php @@ -114,7 +114,7 @@ public function __construct($langcode, $context, StringStorageInterface $string_ protected function getCid() { if (!isset($this->cid)) { // Add the current user's role IDs to the cache key, this ensures that, - // for example, strings for admin menu items and settings forms are not + // for example, strings for admin menu links and settings forms are not // cached for anonymous users. $user = \Drupal::currentUser(); $rids = $user ? implode(':', array_keys($user->getRoles())) : '0'; diff --git a/core/modules/menu_ui/menu_ui.admin.js b/core/modules/menu_ui/menu_ui.admin.js index 5120d6e..0a0d261 100644 --- a/core/modules/menu_ui/menu_ui.admin.js +++ b/core/modules/menu_ui/menu_ui.admin.js @@ -15,11 +15,11 @@ attach: function (context, settings) { var $menu = $('#edit-menu').once('menu-parent'); if ($menu.length) { - // Update the list of available parent menu items to match the initial + // Update the list of available parent menu links to match the initial // available menus. Drupal.menuUiUpdateParentList(); - // Update list of available parent menu items. + // Update list of available parent menu links. $menu.on('change', 'input', Drupal.menuUiUpdateParentList); } } diff --git a/core/modules/menu_ui/menu_ui.module b/core/modules/menu_ui/menu_ui.module index c67dbea..ab3a350 100644 --- a/core/modules/menu_ui/menu_ui.module +++ b/core/modules/menu_ui/menu_ui.module @@ -40,7 +40,7 @@ function menu_ui_help($route_name, RouteMatchInterface $route_match) { $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing menus') . '
'; - $output .= '
' . t('Users with the Administer menus and menu items permission can add, edit, and delete custom menus on the Menus page. Custom menus can be special site menus, menus of external links, or any combination of internal and external links. You may create an unlimited number of additional menus, each of which will automatically have an associated block (if you have the Block module installed). By selecting Edit menu, you can add, edit, or delete links for a given menu. The links listing page provides a drag-and-drop interface for controlling the order of links, and creating a hierarchy within the menu.', array('!block_help' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('help.page', array('name' => 'block')) : '#', '!menu' => \Drupal::url('entity.menu.collection'))) . '
'; + $output .= '
' . t('Users with the Administer menus and menu links permission can add, edit, and delete custom menus on the Menus page. Custom menus can be special site menus, menus of external links, or any combination of internal and external links. You may create an unlimited number of additional menus, each of which will automatically have an associated block (if you have the Block module installed). By selecting Edit menu, you can add, edit, or delete links for a given menu. The links listing page provides a drag-and-drop interface for controlling the order of links, and creating a hierarchy within the menu.', array('!block_help' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('help.page', array('name' => 'block')) : '#', '!menu' => \Drupal::url('entity.menu.collection'))) . '
'; $output .= '
' . t('Displaying menus') . '
'; $output .= '
' . t('If you have the Block module enabled, then each menu that you create is rendered in a block that you enable and position on the Block layout page. In some themes, the main menu and possibly the secondary menu will be output automatically; you may be able to disable this behavior on the theme\'s settings page.', array('!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#', '!themes' => \Drupal::url('system.themes_page'), '!theme_settings' => \Drupal::url('system.theme_settings'))) . '
'; $output .= '
'; @@ -245,7 +245,7 @@ function menu_ui_get_menu_link_defaults(NodeInterface $node) { /** * Implements hook_form_BASE_FORM_ID_alter() for node_form. * - * Adds menu item fields to the node form. + * Adds menu link fields to the node form. * * @see menu_ui_form_node_form_submit() */ @@ -271,7 +271,7 @@ function menu_ui_form_node_form_alter(&$form, FormStateInterface $form_state) { $default = $node_type->getThirdPartySetting('menu_ui', 'parent', 'main:'); } $parent_element = $menu_parent_selector->parentSelectElement($default, $defaults['id'], $available_menus); - // If no possible parent menu items were found, there is nothing to display. + // If no possible parent menu links were found, there is nothing to display. if (empty($parent_element)) { return; } @@ -324,7 +324,7 @@ function menu_ui_form_node_form_alter(&$form, FormStateInterface $form_state) { ); $form['menu']['link']['menu_parent'] = $parent_element; - $form['menu']['link']['menu_parent']['#title'] = t('Parent item'); + $form['menu']['link']['menu_parent']['#title'] = t('Parent link'); $form['menu']['link']['menu_parent']['#attributes']['class'][] = 'menu-parent-select'; $form['menu']['link']['weight'] = array( @@ -342,7 +342,7 @@ function menu_ui_form_node_form_alter(&$form, FormStateInterface $form_state) { } /** - * Form submission handler for menu item field on the node form. + * Form submission handler for menu link field on the node form. * * @see menu_ui_form_node_form_alter() */ @@ -407,10 +407,10 @@ function menu_ui_form_node_type_form_alter(&$form, FormStateInterface $form_stat $options = $menu_parent_selector->getParentSelectOptions('', NULL, $options_cacheability); $form['menu']['menu_parent'] = array( '#type' => 'select', - '#title' => t('Default parent item'), + '#title' => t('Default parent link'), '#default_value' => $type->getThirdPartySetting('menu_ui', 'parent', 'main:'), '#options' => $options, - '#description' => t('Choose the menu item to be the default parent for a new link in the content authoring form.'), + '#description' => t('Choose the menu link to be the default parent for a new link in the content authoring form.'), '#attributes' => array('class' => array('menu-title-select')), ); $options_cacheability->applyTo($form['menu']['menu_parent']); @@ -431,7 +431,7 @@ function menu_ui_form_node_type_form_validate(&$form, FormStateInterface $form_s if (count($available_menus)) { $menu_item_id_parts = explode(':', $form_state->getValue('menu_parent')); if (!in_array($menu_item_id_parts[0], $available_menus)) { - $form_state->setErrorByName('menu_parent', t('The selected menu item is not under one of the selected menus.')); + $form_state->setErrorByName('menu_parent', t('The selected menu link is not under one of the selected menus.')); } } else { diff --git a/core/modules/menu_ui/menu_ui.permissions.yml b/core/modules/menu_ui/menu_ui.permissions.yml index 9bc104f..5653aac 100644 --- a/core/modules/menu_ui/menu_ui.permissions.yml +++ b/core/modules/menu_ui/menu_ui.permissions.yml @@ -1,2 +1,2 @@ administer menu: - title: 'Administer menus and menu items' + title: 'Administer menus and menu links' diff --git a/core/modules/menu_ui/src/Controller/MenuController.php b/core/modules/menu_ui/src/Controller/MenuController.php index 7287054..2cd735f 100644 --- a/core/modules/menu_ui/src/Controller/MenuController.php +++ b/core/modules/menu_ui/src/Controller/MenuController.php @@ -45,13 +45,13 @@ public static function create(ContainerInterface $container) { } /** - * Gets all the available menus and menu items as a JavaScript array. + * Gets all the available menus and menu links as a JavaScript array. * * @param \Symfony\Component\HttpFoundation\Request $request * The request of the page. * * @return \Symfony\Component\HttpFoundation\JsonResponse - * The available menu and menu items. + * The available menu and menu links. */ public function getParentOptions(Request $request) { $available_menus = array(); diff --git a/core/modules/menu_ui/src/MenuForm.php b/core/modules/menu_ui/src/MenuForm.php index e008b3b..97d2683 100644 --- a/core/modules/menu_ui/src/MenuForm.php +++ b/core/modules/menu_ui/src/MenuForm.php @@ -331,7 +331,7 @@ protected function buildOverviewForm(array &$form, FormStateInterface $form_stat * @param \Drupal\Core\Menu\MenuLinkTreeElement[] $tree * The tree retrieved by \Drupal\Core\Menu\MenuLinkTreeInterface::load(). * @param int $delta - * The default number of menu items used in the menu weight selector is 50. + * The default number of menu links used in the menu weight selector is 50. * * @return array * The overview tree form. @@ -451,7 +451,7 @@ protected function submitOverviewForm(array $complete_form, FormStateInterface $ $input = NestedArray::getValue($form_state->getUserInput(), $parents); $form = &NestedArray::getValue($complete_form, $parents); - // When dealing with saving menu items, the order in which these items are + // When dealing with saving menu links, the order in which these items are // saved is critical. If a changed child item is saved before its parent, // the child item could be saved with an invalid path past its immediate // parent. To prevent this, save items in the form in the same order they @@ -467,7 +467,7 @@ protected function submitOverviewForm(array $complete_form, FormStateInterface $ if (isset($form_links[$id]['#item'])) { $element = $form_links[$id]; $updated_values = array(); - // Update any fields that have changed in this menu item. + // Update any fields that have changed in this menu link. foreach ($fields as $field) { if ($element[$field]['#value'] != $element[$field]['#default_value']) { $updated_values[$field] = $element[$field]['#value']; diff --git a/core/modules/menu_ui/src/Tests/MenuNodeTest.php b/core/modules/menu_ui/src/Tests/MenuNodeTest.php index 2647bc8..0b70006 100644 --- a/core/modules/menu_ui/src/Tests/MenuNodeTest.php +++ b/core/modules/menu_ui/src/Tests/MenuNodeTest.php @@ -79,14 +79,14 @@ function testMenuNodeFormWidget() { $node = $this->drupalGetNodeByTitle($node_title); $this->assertEqual($node->getTitle(), $edit['title[0][value]']); - // Test that we cannot set a menu item from a menu that is not set as + // Test that we cannot set a menu link from a menu that is not set as // available. $edit = array( 'menu_options[tools]' => 1, 'menu_parent' => 'main:', ); $this->drupalPostForm('admin/structure/types/manage/page', $edit, t('Save content type')); - $this->assertText(t('The selected menu item is not under one of the selected menus.')); + $this->assertText(t('The selected menu link is not under one of the selected menus.')); $this->assertNoRaw(t('The content type %name has been updated.', array('%name' => 'Basic page'))); // Enable Tools menu as available menu. @@ -98,7 +98,7 @@ function testMenuNodeFormWidget() { $this->drupalPostForm('admin/structure/types/manage/page', $edit, t('Save content type')); $this->assertRaw(t('The content type %name has been updated.', array('%name' => 'Basic page'))); - // Test that we can preview a node that will create a menu item. + // Test that we can preview a node that will create a menu link. $edit = array( 'title[0][value]' => $node_title, 'menu[enabled]' => 1, diff --git a/core/modules/menu_ui/src/Tests/MenuTest.php b/core/modules/menu_ui/src/Tests/MenuTest.php index 59616e7..69e0e20 100644 --- a/core/modules/menu_ui/src/Tests/MenuTest.php +++ b/core/modules/menu_ui/src/Tests/MenuTest.php @@ -453,7 +453,7 @@ function doMenuTests() { $item7 = $this->addMenuLink('', 'https://www.drupal.org', $menu_name); $this->assertMenuLink($item7->getPluginId(), array('url' => 'https://www.drupal.org')); - // Add menu item. + // Add menu link. $item8 = $this->addMenuLink('', '/', $menu_name); $this->assertMenuLink($item8->getPluginId(), array('route_name' => '')); $this->drupalGet(''); @@ -536,7 +536,7 @@ function testSystemMenuRename() { } /** - * Tests that menu items pointing to unpublished nodes are editable. + * Tests that menu links pointing to unpublished nodes are editable. */ function testUnpublishedNodeMenuItem() { $this->drupalLogin($this->drupalCreateUser(array('access administration pages', 'administer blocks', 'administer menu', 'create article content', 'bypass node access'))); @@ -550,7 +550,7 @@ function testUnpublishedNodeMenuItem() { $this->modifyMenuLink($item); // Test that a user with 'administer menu' but without 'bypass node access' - // cannot see the menu item. + // cannot see the menu link. $this->drupalLogout(); $this->drupalLogin($this->adminUser); $this->drupalGet('admin/structure/menu/manage/' . $item->getMenuName()); @@ -928,7 +928,7 @@ private function verifyAccess($response = 200) { $this->drupalGet('admin/structure/menu/link/' . $item->getPluginId() . '/edit'); $this->assertResponse($response); if ($response == 200) { - $this->assertText(t('Edit menu item'), 'Menu edit page was displayed'); + $this->assertText(t('Edit menu link'), 'Menu edit page was displayed'); } // View add menu page. diff --git a/core/modules/menu_ui/src/Tests/MenuWebTestBase.php b/core/modules/menu_ui/src/Tests/MenuWebTestBase.php index 7599023..2dcf601 100644 --- a/core/modules/menu_ui/src/Tests/MenuWebTestBase.php +++ b/core/modules/menu_ui/src/Tests/MenuWebTestBase.php @@ -22,10 +22,10 @@ public static $modules = array('menu_ui', 'menu_link_content'); /** - * Fetches the menu item from the database and compares it to expected item. + * Fetches the menu link from the database and compares it to expected item. * * @param int $menu_plugin_id - * Menu item id. + * Menu link id. * @param array $expected_item * Array containing properties to verify. */ diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index 1d5c275..b0db417 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -29,7 +29,7 @@ function shortcut_help($route_name, RouteMatchInterface $route_match) { $output .= '
' . t('Adding and removing shortcuts') . '
'; $output .= '
' . t('The Shortcut module creates an add/remove link for each page on your site; the link lets you add or remove the current page from the currently-enabled set of shortcuts (if your theme displays it and you have permission to edit your shortcut set). The core Seven administration theme displays this link next to the page title, as a grey or yellow star. If you click on the grey star, you will add that page to your preferred set of shortcuts. If the page is already part of your shortcut set, the link will be a yellow star, and will allow you to remove the current page from your shortcut set.') . '
'; $output .= '
' . t('Displaying shortcuts') . '
'; - $output .= '
' . t('You can display your shortcuts by enabling the Shortcuts block on the Blocks administration page. Certain administrative modules also display your shortcuts; for example, the core Toolbar module provides a corresponding menu item.', array('!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#', '!toolbar-help' => (\Drupal::moduleHandler()->moduleExists('toolbar')) ? \Drupal::url('help.page', array('name' => 'toolbar')) : '#')) . '
'; + $output .= '
' . t('You can display your shortcuts by enabling the Shortcuts block on the Blocks administration page. Certain administrative modules also display your shortcuts; for example, the core Toolbar module provides a corresponding menu link.', array('!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#', '!toolbar-help' => (\Drupal::moduleHandler()->moduleExists('toolbar')) ? \Drupal::url('help.page', array('name' => 'toolbar')) : '#')) . '
'; $output .= ''; return $output; diff --git a/core/modules/system/entity.api.php b/core/modules/system/entity.api.php index e60550f..4cfa739 100644 --- a/core/modules/system/entity.api.php +++ b/core/modules/system/entity.api.php @@ -736,7 +736,7 @@ function hook_entity_bundle_info_alter(&$bundles) { */ function hook_entity_bundle_create($entity_type_id, $bundle) { // When a new bundle is created, the menu needs to be rebuilt to add the - // Field UI menu item tabs. + // Field UI menu link tabs. \Drupal::service('router.builder')->setRebuildNeeded(); } diff --git a/core/modules/system/menu.api.php b/core/modules/system/menu.api.php index 1d8298f..d6014d5 100644 --- a/core/modules/system/menu.api.php +++ b/core/modules/system/menu.api.php @@ -151,7 +151,7 @@ * administrative hierarchy. See system.links.menu.yml to find the main * skeleton of the hierarchy. * - weight: Lower (negative) numbers come before higher (positive) numbers, - * for menu items with the same parent. + * for menu links with the same parent. * * Discovered menu links from other modules can be altered using * hook_menu_links_discovered_alter(). @@ -344,16 +344,16 @@ * - parent: (optional) The machine name of the link that is this link's menu * parent. * - weight: (optional) An integer that determines the relative position of - * items in the menu; higher-weighted items sink. Defaults to 0. Menu items + * items in the menu; higher-weighted items sink. Defaults to 0. Menu links * with the same weight are ordered alphabetically. * - menu_name: (optional) The machine name of a menu to put the link in, if * not the default Tools menu. * - expanded: (optional) If set to TRUE, and if a menu link is provided for - * this menu item (as a result of other properties), then the menu link is + * this menu link (as a result of other properties), then the menu link is * always expanded, equivalent to its 'always expanded' checkbox being set * in the UI. * - options: (optional) An array of options to be passed to _l() when - * generating a link from this menu item. + * generating a link from this menu link. * * @ingroup menu */ diff --git a/core/modules/system/src/Plugin/Block/SystemMenuBlock.php b/core/modules/system/src/Plugin/Block/SystemMenuBlock.php index aec9716..f05b84d 100644 --- a/core/modules/system/src/Plugin/Block/SystemMenuBlock.php +++ b/core/modules/system/src/Plugin/Block/SystemMenuBlock.php @@ -96,7 +96,7 @@ public function blockForm($form, FormStateInterface $form_state) { '#title' => $this->t('Initial menu level'), '#default_value' => $config['level'], '#options' => $options, - '#description' => $this->t('The menu will only be visible if the menu item for the current page is at or below the selected starting level. Select level 1 to always keep this menu visible.'), + '#description' => $this->t('The menu will only be visible if the menu link for the current page is at or below the selected starting level. Select level 1 to always keep this menu visible.'), '#required' => TRUE, ); diff --git a/core/modules/system/src/SystemManager.php b/core/modules/system/src/SystemManager.php index 33d6de5..44bf051 100644 --- a/core/modules/system/src/SystemManager.php +++ b/core/modules/system/src/SystemManager.php @@ -50,7 +50,7 @@ class SystemManager { protected $menuActiveTrail; /** - * A static cache of menu items. + * A static cache of menu links. * * @var array */ @@ -182,10 +182,10 @@ public function getBlockContents() { * Provide a single block on the administration overview page. * * @param \Drupal\Core\Menu\MenuLinkInterface $instance - * The menu item to be displayed. + * The menu link to be displayed. * * @return array - * An array of menu items, as expected by admin-block-content.html.twig. + * An array of menu links, as expected by admin-block-content.html.twig. */ public function getAdminBlock(MenuLinkInterface $instance) { $content = array(); diff --git a/core/modules/system/src/Tests/Menu/MenuRouterTest.php b/core/modules/system/src/Tests/Menu/MenuRouterTest.php index 4089931..6e8236f 100644 --- a/core/modules/system/src/Tests/Menu/MenuRouterTest.php +++ b/core/modules/system/src/Tests/Menu/MenuRouterTest.php @@ -99,12 +99,12 @@ protected function doTestTitleMenuCallback() { } /** - * Tests menu item descriptions. + * Tests menu link descriptions. */ protected function doTestDescriptionMenuItems() { // Verify that the menu router item title is output as page title. $this->drupalGet('menu_callback_description'); - $this->assertText(t('Menu item description text')); + $this->assertText(t('Menu link description text')); } /** diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 81fa6af..74077a6 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -48,7 +48,7 @@ function _system_is_incompatible(&$incompatible, $files, Extension $file) { * @param $variables * An associative array containing: * - content: An array containing information about the block. Each element - * of the array represents an administrative menu item, and must at least + * of the array represents an administrative menu link, and must at least * contain the keys 'title', 'link_path', and 'localized_options', which are * passed to l(). A 'description' key may also be provided. */ diff --git a/core/modules/system/templates/admin-block-content.html.twig b/core/modules/system/templates/admin-block-content.html.twig index f1c5f27..1db251e 100644 --- a/core/modules/system/templates/admin-block-content.html.twig +++ b/core/modules/system/templates/admin-block-content.html.twig @@ -5,7 +5,7 @@ * * Available variables: * - content: A list containing information about the block. Each element - * of the array represents an administrative menu item, and must at least + * of the array represents an administrative menu link, and must at least * contain the keys 'title', 'link_path', and 'localized_options', which are * passed to l(). A 'description' key may also be provided. * - attributes: HTML attributes to be added to the element. diff --git a/core/modules/system/templates/menu.html.twig b/core/modules/system/templates/menu.html.twig index f01ce84..afe5154 100644 --- a/core/modules/system/templates/menu.html.twig +++ b/core/modules/system/templates/menu.html.twig @@ -5,9 +5,9 @@ * * Available variables: * - menu_name: The machine name of the menu. - * - items: A nested list of menu items. Each menu item contains: - * - attributes: HTML attributes for the menu item. - * - below: The menu item child items. + * - items: A nested list of menu links. Each menu link contains: + * - attributes: HTML attributes for the menu link. + * - below: The menu link child items. * - title: The menu link title. * - url: The menu link url, instance of \Drupal\Core\Url * - localized_options: Menu link localized options. diff --git a/core/modules/system/tests/modules/menu_test/menu_test.links.menu.yml b/core/modules/system/tests/modules/menu_test/menu_test.links.menu.yml index 914fbd5..d38f1d2 100644 --- a/core/modules/system/tests/modules/menu_test/menu_test.links.menu.yml +++ b/core/modules/system/tests/modules/menu_test/menu_test.links.menu.yml @@ -6,13 +6,13 @@ menu_test.menu_name_test: # This item uses SystemController::systemAdminMenuBlockPage() to list child # items. menu_test.menu_callback_description: - title: 'Menu item title' - description: 'Menu item description parent' + title: 'Menu link title' + description: 'Menu link description parent' route_name: menu_test.callback_description # This item tests the description key. menu_test.menu_callback_description.description-plain: - title: 'Menu item with a regular description' - description: 'Menu item description text' + title: 'Menu link with a regular description' + description: 'Menu link description text' route_name: menu_test.callback_description_plain parent: menu_test.menu_callback_description menu_test.menu_no_title_callback: diff --git a/core/modules/system/tests/modules/menu_test/menu_test.routing.yml b/core/modules/system/tests/modules/menu_test/menu_test.routing.yml index 33a337b..6db7388 100644 --- a/core/modules/system/tests/modules/menu_test/menu_test.routing.yml +++ b/core/modules/system/tests/modules/menu_test/menu_test.routing.yml @@ -33,7 +33,7 @@ menu_test.callback_description: menu_test.callback_description_plain: path: '/menu_callback_description/description-plain' defaults: - _title: 'Menu item with a regular description' + _title: 'Menu link with a regular description' _controller: '\Drupal\menu_test\Controller\MenuTestController::menuTestCallback' requirements: _access: 'TRUE' diff --git a/core/modules/toolbar/js/toolbar.menu.js b/core/modules/toolbar/js/toolbar.menu.js index e590297..29ef7db 100644 --- a/core/modules/toolbar/js/toolbar.menu.js +++ b/core/modules/toolbar/js/toolbar.menu.js @@ -38,7 +38,7 @@ } /** - * Handle clicks from a menu item link. + * Handle clicks from a menu link. * * @param {Object} event * A jQuery Event object. @@ -84,10 +84,10 @@ /** * Add markup to the menu elements. * - * Items with sub-elements have a list toggle attached to them. Menu item - * links and the corresponding list toggle are wrapped with in a div - * classed with .toolbar-box. The .toolbar-box div provides a positioning - * context for the item list toggle. + * Items with sub-elements have a list toggle attached to them. Menu links + * and the corresponding list toggle are wrapped with in a div classed with + * .toolbar-box. The .toolbar-box div provides a positioning context for the + * item list toggle. * * @param {jQuery} $menu * The root of the menu to be initialized. @@ -134,7 +134,7 @@ } /** - * On page load, open the active menu item. + * On page load, open the active menu link. * * Marks the trail of the active link in the menu back to the root of the * menu with .menu-item--active-trail. diff --git a/core/modules/toolbar/src/Tests/ToolbarMenuTranslationTest.php b/core/modules/toolbar/src/Tests/ToolbarMenuTranslationTest.php index c0db4b2..47c695f 100644 --- a/core/modules/toolbar/src/Tests/ToolbarMenuTranslationTest.php +++ b/core/modules/toolbar/src/Tests/ToolbarMenuTranslationTest.php @@ -10,7 +10,7 @@ use Drupal\simpletest\WebTestBase; /** - * Tests that the toolbar icon class remains for translated menu items. + * Tests that the toolbar icon class remains for translated menu links. * * @group toolbar */ @@ -48,27 +48,27 @@ function testToolbarClasses() { $edit['predefined_langcode'] = $langcode; $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add language')); - // The menu item 'Structure' in the toolbar will be translated. + // The menu link 'Structure' in the toolbar will be translated. $menu_item = 'Structure'; // Visit a page that has the string on it so it can be translated. $this->drupalGet($langcode . '/admin/structure'); - // Search for the menu item. + // Search for the menu link. $search = array( 'string' => $menu_item, 'langcode' => $langcode, 'translation' => 'untranslated', ); $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter')); - // Make sure will be able to translate the menu item. - $this->assertNoText('No strings available.', 'Search found the menu item as untranslated.'); + // Make sure will be able to translate the menu link. + $this->assertNoText('No strings available.', 'Search found the menu link as untranslated.'); // Check that the class is on the item before we translate it. $xpath = $this->xpath('//a[contains(@class, "icon-system-admin-structure")]'); - $this->assertEqual(count($xpath), 1, 'The menu item class ok before translation.'); + $this->assertEqual(count($xpath), 1, 'The menu link class ok before translation.'); - // Translate the menu item. + // Translate the menu link. $menu_item_translated = $this->randomMachineName(); $textarea = current($this->xpath('//textarea')); $lid = (string) $textarea[0]['name']; @@ -77,25 +77,25 @@ function testToolbarClasses() { ); $this->drupalPostForm('admin/config/regional/translate', $edit, t('Save translations')); - // Search for the translated menu item. + // Search for the translated menu link. $search = array( 'string' => $menu_item, 'langcode' => $langcode, 'translation' => 'translated', ); $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter')); - // Make sure the menu item string was translated. - $this->assertText($menu_item_translated, 'Search found the menu item as translated: ' . $menu_item_translated . '.'); + // Make sure the menu link string was translated. + $this->assertText($menu_item_translated, 'Search found the menu link as translated: ' . $menu_item_translated . '.'); - // Go to another page in the custom language and make sure the menu item + // Go to another page in the custom language and make sure the menu link // was translated. $this->drupalGet($langcode . '/admin/structure'); $this->assertText($menu_item_translated, 'Found the menu translated.'); // Toolbar icons are included based on the presence of a specific class on - // the menu item. Ensure that class also exists for a translated menu item. + // the menu link. Ensure that class also exists for a translated menu link. $xpath = $this->xpath('//a[contains(@class, "icon-system-admin-structure")]'); - $this->assertEqual(count($xpath), 1, 'The menu item class is the same.'); + $this->assertEqual(count($xpath), 1, 'The menu link class is the same.'); } } diff --git a/core/modules/toolbar/templates/menu--toolbar.html.twig b/core/modules/toolbar/templates/menu--toolbar.html.twig index 3578b95..85b907d 100644 --- a/core/modules/toolbar/templates/menu--toolbar.html.twig +++ b/core/modules/toolbar/templates/menu--toolbar.html.twig @@ -5,9 +5,9 @@ * * Available variables: * - menu_name: The machine name of the menu. - * - items: A nested list of menu items. Each menu item contains: - * - attributes: HTML attributes for the menu item. - * - below: The menu item child items. + * - items: A nested list of menu links. Each menu link contains: + * - attributes: HTML attributes for the menu link. + * - below: The menu link child items. * - title: The menu link title. * - url: The menu link url, instance of \Drupal\Core\Url * - localized_options: Menu link localized options. diff --git a/core/modules/toolbar/toolbar.info.yml b/core/modules/toolbar/toolbar.info.yml index 6967bf6..70ba7df 100644 --- a/core/modules/toolbar/toolbar.info.yml +++ b/core/modules/toolbar/toolbar.info.yml @@ -1,6 +1,6 @@ name: Toolbar type: module -description: 'Provides a toolbar that shows the top-level administration menu items and links from other modules.' +description: 'Provides a toolbar that shows the top-level administration menu links and links from other modules.' core: 8.x package: Core version: VERSION diff --git a/core/modules/update/update.module b/core/modules/update/update.module index 63ed8d0..9c282e3 100644 --- a/core/modules/update/update.module +++ b/core/modules/update/update.module @@ -156,13 +156,13 @@ function update_page_top() { } /** - * Access callback: Resolves if the current user can access updater menu items. + * Access callback: Resolves if the current user can access updater menu links. * * It both enforces the 'administer software updates' permission and the global * kill switch for the authorize.php script. * * @return - * TRUE if the current user can access the updater menu items; FALSE + * TRUE if the current user can access the updater menu links; FALSE * otherwise. * * @see update_menu() diff --git a/core/modules/views/src/Plugin/views/display/Page.php b/core/modules/views/src/Plugin/views/display/Page.php index 751b2fe..d37f581 100644 --- a/core/modules/views/src/Plugin/views/display/Page.php +++ b/core/modules/views/src/Plugin/views/display/Page.php @@ -169,7 +169,7 @@ public function optionsSummary(&$categories, &$options) { // This adds a 'Settings' link to the style_options setting if the style // has options. if ($menu['type'] == 'default tab') { - $options['menu']['setting'] = $this->t('Parent menu item'); + $options['menu']['setting'] = $this->t('Parent menu link'); $options['menu']['links']['tab_options'] = $this->t('Change settings for the parent menu'); } } @@ -182,7 +182,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { switch ($form_state->get('section')) { case 'menu': - $form['#title'] .= $this->t('Menu item entry'); + $form['#title'] .= $this->t('Menu link entry'); $form['menu'] = array( '#prefix' => '
', '#suffix' => '
', @@ -315,7 +315,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { } $form['tab_markup'] = array( - '#markup' => '
' . $this->t('When providing a menu item as a tab, Drupal needs to know what the parent menu item of that tab will be. Sometimes the parent will already exist, but other times you will need to have one created. The path of a parent item will always be the same path with the last part left off. i.e, if the path to this view is foo/bar/baz, the parent path would be foo/bar.') . '
', + '#markup' => '
' . $this->t('When providing a menu link as a tab, Drupal needs to know what the parent menu link of that tab will be. Sometimes the parent will already exist, but other times you will need to have one created. The path of a parent link will always be the same path with the last part left off. i.e, if the path to this view is foo/bar/baz, the parent path would be foo/bar.') . '
', ); $form['tab_options'] = array( @@ -326,9 +326,9 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $form['tab_options']['type'] = array( '#prefix' => '
', '#suffix' => '
', - '#title' => $this->t('Parent menu item'), + '#title' => $this->t('Parent menu link'), '#type' => 'radios', - '#options' => array('none' => $this->t('Already exists'), 'normal' => $this->t('Normal menu item'), 'tab' => $this->t('Menu tab')), + '#options' => array('none' => $this->t('Already exists'), 'normal' => $this->t('Normal menu link'), 'tab' => $this->t('Menu tab')), '#default_value' => $tab_options['type'], ); $form['tab_options']['title'] = array( @@ -336,7 +336,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { '#title' => $this->t('Title'), '#type' => 'textfield', '#default_value' => $tab_options['title'], - '#description' => $this->t('If creating a parent menu item, enter the title of the item.'), + '#description' => $this->t('If creating a parent menu link, enter the title of the item.'), '#states' => array( 'visible' => array( array( @@ -352,7 +352,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { '#title' => $this->t('Description'), '#type' => 'textfield', '#default_value' => $tab_options['description'], - '#description' => $this->t('If creating a parent menu item, enter the description of the item.'), + '#description' => $this->t('If creating a parent menu link, enter the description of the link.'), '#states' => array( 'visible' => array( array( @@ -370,7 +370,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { '#type' => 'textfield', '#default_value' => $tab_options['weight'], '#size' => 5, - '#description' => $this->t('If the parent menu item is a tab, enter the weight of the tab. Heavier tabs will sink and the lighter tabs will be positioned nearer to the first menu item.'), + '#description' => $this->t('If the parent menu link is a tab, enter the weight of the tab. Heavier tabs will sink and the lighter tabs will be positioned nearer to the first menu link.'), '#states' => array( 'visible' => array( ':input[name="tab_options[type]"]' => array('value' => 'tab'), @@ -391,7 +391,7 @@ public function validateOptionsForm(&$form, FormStateInterface $form_state) { $path = $this->getOption('path'); $menu_type = $form_state->getValue(array('menu', 'type')); if ($menu_type == 'normal' && strpos($path, '%') !== FALSE) { - $form_state->setError($form['menu']['type'], $this->t('Views cannot create normal menu items for paths with a % in them.')); + $form_state->setError($form['menu']['type'], $this->t('Views cannot create normal menu links for paths with a % in them.')); } if ($menu_type == 'default tab' || $menu_type == 'tab') { diff --git a/core/modules/views_ui/js/views-admin.js b/core/modules/views_ui/js/views-admin.js index 17b16d5..c644b4d 100644 --- a/core/modules/views_ui/js/views-admin.js +++ b/core/modules/views_ui/js/views-admin.js @@ -344,7 +344,7 @@ // Add a mouseleave handler to close the dropdown when the user mouses // away from the item. We use mouseleave instead of mouseout because // the user is going to trigger mouseout when she moves from the trigger - // link to the sub menu items. + // link to the sub menu links. // We use the live binder because the open class on this item will be // toggled on and off and we want the handler to take effect in the cases // that the class is present, but not when it isn't. diff --git a/core/themes/classy/templates/navigation/menu.html.twig b/core/themes/classy/templates/navigation/menu.html.twig index 4e12ea1..91451b9 100644 --- a/core/themes/classy/templates/navigation/menu.html.twig +++ b/core/themes/classy/templates/navigation/menu.html.twig @@ -5,9 +5,9 @@ * * Available variables: * - menu_name: The machine name of the menu. - * - items: A nested list of menu items. Each menu item contains: - * - attributes: HTML attributes for the menu item. - * - below: The menu item child items. + * - items: A nested list of menu links. Each menu link contains: + * - attributes: HTML attributes for the menu link. + * - below: The menu link child items. * - title: The menu link title. * - url: The menu link url, instance of \Drupal\Core\Url * - localized_options: Menu link localized options. diff --git a/core/themes/seven/templates/admin-block-content.html.twig b/core/themes/seven/templates/admin-block-content.html.twig index 5991a1b..ee572e2 100644 --- a/core/themes/seven/templates/admin-block-content.html.twig +++ b/core/themes/seven/templates/admin-block-content.html.twig @@ -6,10 +6,10 @@ * Uses unordered list markup in both compact and extended modes. * * Available variables: - * - content: List of administrative menu items. Each menu item contains: + * - content: List of administrative menu links. Each menu link contains: * - url: Path to the admin section. * - title: Short name of the section. - * - description: Description of the administrative menu item. + * - description: Description of the administrative menu link. * - attributes: HTML attributes to be added to the element. * - compact: Boolean indicating whether compact mode is turned on or not. *