Skip to content

Commit

Permalink
Replaced the hard-coded string by a dynamic value
Browse files Browse the repository at this point in the history
(cherry picked from commit a65c037)
  • Loading branch information
jonasraoni committed May 19, 2024
1 parent e4aad59 commit 6c91be5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion WebFeedPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ public function setupTemplateLinks(): void
'issue' => 'frontend-issue',
default => 'frontend'
};

$className = explode('\\', WebFeedGatewayPlugin::class);
$className = end($className);
foreach (WebFeedGatewayPlugin::FEED_MIME_TYPE as $feedType => $mimeType) {
$url = $request->url(null, 'gateway', 'plugin', ['WebFeedGatewayPlugin', $feedType]);
$url = $request->url(null, 'gateway', 'plugin', [$className, $feedType]);
$templateManager->addHeader("webFeedPlugin{$feedType}", "<link rel=\"alternate\" type=\"{$mimeType}\" href=\"{$url}\">", ['contexts' => $contexts]);
}

Expand Down

0 comments on commit 6c91be5

Please sign in to comment.