diff -u b/core/includes/menu.inc b/core/includes/menu.inc --- b/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -863,11 +863,13 @@ * * @param array $item * The passed in and changed menu item with the following elements: - * - href: The actual path to the link, is generated from link_path + * - href: The actual path to the link. This path is generated from the + * link_path of the menu link entity. * - access: Becomes TRUE if the item is accessible, FALSE otherwise. - * - title: The title of the link, is generated from link_title. + * - title: The title of the link. This title is generated from the + * link_title of the menu link entity. * - route_name: The route name of the menu link. - * - route_parameters: The unserialized route parameters. + * - route_parameters: The unserialized route parameters of the men link. * - options: Is unserialized and copied to $item['localized_options']. */ function _menu_link_translate(&$item) { @@ -915,13 +917,13 @@ * Menu path as returned by $item['href'] of menu_get_item(). * @param array $map * An array of path arguments; for example, array('node', '5'). + * @param \Symfony\Component\HttpFoundation\Request $request + * The current request object, used to find the current route. * * @return bool * TRUE if the user has access or FALSE if the user should be presented * with access denied. * - * @throws \Symfony\Component\Routing\Exception\ResourceNotFoundException - * If the system path in $href does not match the $route. */ function menu_item_route_access(Route $route, $href, &$map, Request $request = NULL) { if (!isset($request)) { @@ -2577,7 +2579,7 @@ } /** - * Recursive helper to save menu links. + * Saves menu links recursively for menu_default_links_rebuild(). */ function _menu_link_save_recursive($controller, $machine_name, &$children, &$links) { $menu_link = $links[$machine_name]; @@ -2602,7 +2604,12 @@ } /** - * Find all links returned from hook_default_menu_links(). + * Finds all links returned from hook_default_menu_links(). + * + * @return array + * An array of default menu links. + * + * @see hook_menu() */ function menu_get_default_links() { $module_handler = \Drupal::moduleHandler(); diff -u b/core/includes/theme.inc b/core/includes/theme.inc --- b/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2109,14 +2109,6 @@ 'name' => String::checkPlain($site_config->get('name')), ); } - // @todo Remove once views is not bypassing the view subscriber anymore. - // @see http://drupal.org/node/2068471 - elseif (drupal_is_front_page()) { - $head_title = array( - 'title' => t('Home'), - 'name' => String::checkPlain($site_config->get('name')), - ); - } else { $head_title = array('name' => String::checkPlain($site_config->get('name'))); if ($site_config->get('slogan')) { @@ -2158,6 +2150,14 @@ 'name' => String::checkPlain($site_config->get('name')), ); } + // @todo Remove once views is not bypassing the view subscriber anymore. + // @see http://drupal.org/node/2068471 + elseif (drupal_is_front_page()) { + $head_title = array( + 'title' => t('Home'), + 'name' => String::checkPlain($site_config->get('name')), + ); + } else { $head_title = array('name' => String::checkPlain($site_config->get('name'))); if ($site_config->get('slogan')) { diff -u b/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module --- b/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -262,15 +262,6 @@ } /** - * Implements hook_default_menu_links_alter(). - */ -function content_translation_default_menu_links_alter(array &$links) { - // Clarify where translation settings are located. - $items['admin.config.regional.language.content_settings_page']['link_title'] = 'Content language and translation'; - $items['admin.config.regional.language.content_settings_page']['description'] = 'Configure language and translation support for content.'; -} - -/** * Implements hook_local_tasks_alter(). */ function content_translation_local_tasks_alter(&$local_tasks) { @@ -303,6 +294,15 @@ } /** + * Implements hook_default_menu_links_alter(). + */ +function content_translation_default_menu_links_alter(array &$links) { + // Clarify where translation settings are located. + $items['admin.config.regional.language.content_settings_page']['link_title'] = 'Content language and translation'; + $items['admin.config.regional.language.content_settings_page']['description'] = 'Configure language and translation support for content.'; +} + +/** * Convert an entity canonical link to a router path. * * @param string $link