diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 6f699aa..b8e9401 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -1743,12 +1743,13 @@ function theme_menu_local_action($variables) { $link['localized_options']['attributes']['class'][] = 'button-action'; $output = '
  • '; - // @todo Remove the is_plugin check once - if (!empty($link['route_name']) && !empty($link['is_plugin'])) { - $output .= Drupal::l($link['title'], $link['route_name'], $link['route_parameters'], $link['localized_options']); + // @todo Remove this check and the call to l() when all pages are converted to + // routes. + if (!empty($link['href'])) { + $output .= l($link['title'], $link['href'], $link['localized_options']); } else { - $output .= l($link['title'], $link['href'], $link['localized_options']); + $output .= Drupal::l($link['title'], $link['route_name'], $link['route_parameters'], $link['localized_options']); } $output .= "
  • "; diff --git a/core/lib/Drupal/Core/Menu/LocalActionManager.php b/core/lib/Drupal/Core/Menu/LocalActionManager.php index 290400a..eeb73d3 100644 --- a/core/lib/Drupal/Core/Menu/LocalActionManager.php +++ b/core/lib/Drupal/Core/Menu/LocalActionManager.php @@ -37,7 +37,7 @@ class LocalActionManager extends DefaultPluginManager { * @var array */ protected $defaults = array( - // The ID. + // The plugin id. Set by the plugin system based on the top-level YAML key. 'id' => '', // The static title for the local action. 'title' => '', @@ -162,7 +162,7 @@ public function getActionsForRoute($route_appears) { } // Pre-fetch all the action route objects. This reduces the number of SQL // queries that would otherwise be triggered by the access manager. - $routes = $route_names ? $this->routeProvider->getRoutesByNames($route_names) : array(); + $route_names ? $this->routeProvider->getRoutesByNames($route_names) : array(); } $links = array(); foreach ($this->instances[$route_appears] as $plugin) { @@ -175,7 +175,6 @@ public function getActionsForRoute($route_appears) { 'route_name' => $route_name, 'route_parameters' => $route_parameters, 'localized_options' => $plugin->getOptions($this->request), - 'is_plugin' => TRUE, ), '#access' => $this->accessManager->checkNamedRoute($route_name, $route_parameters), );