Commit 33d2a6ff authored by Project Update Bot's avatar Project Update Bot Committed by Damien McKenna
Browse files

Issue #3329362 by Project Update Bot, DamienMcKenna: Minor improvement to metatag.api.php.

parent 1ef83f2d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -11,6 +11,8 @@ Metatag 8.x-1.x-dev, 2022-xx-xx
  metatag_routes module.
#3329070 by DamienMcKenna: Remove remaining Console references.
#3329071 by DamienMcKenna: Deprecate some Twitter Card plugins.
#3329362 by Project Update Bot, DamienMcKenna: Minor improvement to
  metatag.api.php.


Metatag 8.x-1.22, 2022-09-29
+3 −1
Original line number Diff line number Diff line
@@ -5,6 +5,8 @@
 * Document all supported APIs.
 */

use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Provides a ability to integrate alternative routes with metatags.
 *
@@ -17,7 +19,7 @@
 * @return \Drupal\Core\Entity\EntityInterface|null
 *   Return an entity, if the route should use metatags.
 */
function hook_metatag_route_entity(\Drupal\Core\Routing\RouteMatchInterface $route_match) {
function hook_metatag_route_entity(RouteMatchInterface $route_match) {
  if ($route_match->getRouteName() === 'example.test_route') {
    if ($node = $route_match->getParameter('node')) {
      return $node;