Manual:Hooks/AfterBuildFeedLinks

Category:MediaWiki hooks#AfterBuildFeedLinks Category:Hooks added in MediaWiki 1.27.0#AfterBuildFeedLinks
AfterBuildFeedLinks
Available from version 1.27.0
Use this hook to remove feed links from the head of the output.
Define function:
public static function onAfterBuildFeedLinks( &$feedLinks ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"AfterBuildFeedLinks": "MediaWiki\\Extension\\MyExtension\\Hooks::onAfterBuildFeedLinks"
	}
}
Called from: File(s): OutputPage.phpCategory:MediaWiki hooks included in OutputPage.php#AfterBuildFeedLinks
Interface: AfterBuildFeedLinksHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:AfterBuildFeedLinks extensions.

Details

  • $feedLinks: Added feed links to be outputted. You can remove them using unset(), and it's possible to add additional feed links. However, you should use the OutputPage::addFeedLink() method, instead.
Category:Hooks added in MediaWiki 1.27.0 Category:MediaWiki hooks Category:MediaWiki hooks included in OutputPage.php