Code from wikiHow codebase, where this hook is used by the following extensions:
* AlternateDomain -- used to remove certain links altogether and change the contents of other elements (e.g. <meta description="..." />)
* hooks (PageHooks) -- used to hide certain links for anons on noindexed pages to avoid leaking article info to Googlebot
* QADomain -- used to remove certain elements and correct <meta keywords="..." /> tags not to mention "wikiHow" if that string is present
* search (LSearch) -- used to remove canonical URL on Special:LSearch for SEO
Change-Id: I4a9ceb343bb5c0b4eb79e4589d36c3790938f8a9
pages.
* The array of hidden options ($opts) passed to the 'SpecialSearchPowerBox' hook
is now passed by reference, allowing extensions to modify or even unset it.
pages.
* The array of hidden options ($opts) passed to the 'SpecialSearchPowerBox' hook
is now passed by reference, allowing extensions to modify or even unset it.
+* Added new 'OutputPageAfterGetHeadLinksArray' hook, allowing extensions to
+ modify the return value of OutputPage#getHeadLinksArray in order to add,
+ remove or otherwise alter the elements to be output in the page <head>.
=== External library changes in 1.32 ===
* …
=== External library changes in 1.32 ===
* …
&$otherBlockLink: An array with links to other block logs
$ip: The requested IP address or username
&$otherBlockLink: An array with links to other block logs
$ip: The requested IP address or username
+'OutputPageAfterGetHeadLinksArray': Called in OutputPage#getHeadLinksArray right
+before returning the result.
+&$tags: array containing all <head> links generated so far. The array format is
+"link name or number => 'link HTML'".
+$out: the OutputPage object
+
'OutputPageBeforeHTML': A page has been processed by the parser and the
resulting HTML is about to be displayed.
&$parserOutput: the parserOutput (object) that corresponds to the page
'OutputPageBeforeHTML': A page has been processed by the parser and the
resulting HTML is about to be displayed.
&$parserOutput: the parserOutput (object) that corresponds to the page
+ // Allow extensions to add, remove and/or otherwise manipulate these links
+ // If you want only to *add* <head> links, please use the addHeadItem()
+ // (or addHeadItems() for multiple items) method instead.
+ // This hook is provided as a last resort for extensions to modify these
+ // links before the output is sent to client.
+ Hooks::run( 'OutputPageAfterGetHeadLinksArray', [ &$tags, $this ] );
+