Skip to content

Commit

Permalink
[5.1] Load Schema.org only in proper forms (#42825)
Browse files Browse the repository at this point in the history
  • Loading branch information
n3t authored Jul 7, 2024
1 parent b6f4dfd commit d5047c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/system/schemaorg/src/Extension/Schemaorg.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,10 @@ protected function isSupported($context)
$parts = explode('.', $context, 2);
$component = $this->getApplication()->bootComponent($parts[0]);

return $component instanceof SchemaorgServiceInterface;
if ($component instanceof SchemaorgServiceInterface) {
return \in_array($context, array_keys($component->getSchemaorgContexts()));
}

return false;
}
}

0 comments on commit d5047c7

Please sign in to comment.