Manual:Hooks/OutputPageCheckLastModified

From Linux Web Expert

Revision as of 07:35, 28 January 2024 by imported>Cavila (Fix link)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

OutputPageCheckLastModified
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
When checking if the page has been modified since the last visit
<translate> Define function:</translate>
public static function onOutputPageCheckLastModified( &$modifiedTimes, $out ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"OutputPageCheckLastModified": "MediaWiki\\Extension\\MyExtension\\Hooks::onOutputPageCheckLastModified"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> Output/OutputPage.php
<translate> Interface:</translate> OutputPageCheckLastModifiedHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:OutputPageCheckLastModified extensions</tvar>.</translate>

Details

  • &$modifiedTimes: array of timestamps, the following keys are set:
  • $out: OutputPage object