From dd96f8f97e9119a5e4548ec11daf30dd6a7bef36 Mon Sep 17 00:00:00 2001 From: Caspar Date: Mon, 21 Oct 2019 09:14:49 +0200 Subject: [PATCH] Key does not handle http-equiv meta tags The resolveValues of Key does not handle the http-equiv metatags. Added a new if-statement to check for this case. --- src/Plugin/GraphQL/Fields/Metatag/Key.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Plugin/GraphQL/Fields/Metatag/Key.php b/src/Plugin/GraphQL/Fields/Metatag/Key.php index bf94d3a..b790816 100644 --- a/src/Plugin/GraphQL/Fields/Metatag/Key.php +++ b/src/Plugin/GraphQL/Fields/Metatag/Key.php @@ -22,7 +22,12 @@ class Key extends FieldPluginBase { */ protected function resolveValues($value, array $args, ResolveContext $context, ResolveInfo $info) { if (isset($value['#tag']) && $value['#tag'] === 'meta') { - yield isset($value['#attributes']['property']) ? $value['#attributes']['property'] : $value['#attributes']['name']; + if (isset($value['#attributes']['http-equiv'])) { + yield $value['#attributes']['http-equiv']; + } + else { + yield isset($value['#attributes']['property']) ? $value['#attributes']['property'] : $value['#attributes']['name']; + } } else if (isset($value['#tag']) && $value['#tag'] === 'link') { yield $value['#attributes']['rel'];