Jump to content

Manual:Hooks/OutputPageAfterGetHeadLinksArray

From mediawiki.org
OutputPageAfterGetHeadLinksArray
Available from version 1.32.0 (Gerrit change 441631)
Allows extensions to modify the HTML metadata in the ‎<head> element
Define function:
public static function onOutputPageAfterGetHeadLinksArray( $tags, OutputPage $output ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"OutputPageAfterGetHeadLinksArray": "MediaWiki\\Extension\\MyExtension\\Hooks::onOutputPageAfterGetHeadLinksArray"
	}
}
Called from: File(s): Output/OutputPage.php
Function(s): getHeadLinksArray
Interface: OutputPageAfterGetHeadLinksArrayHook.php

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


Details

[edit]
  • &$tags: Associative array of all ‎<link> elements generated so far
  • $output: the OutputPage object