MediaWiki master
MediaWiki\Page\Hook\OpportunisticLinksUpdateHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onOpportunisticLinksUpdate ( $page, $title, $parserOutput)
 This hook is called by WikiPage::triggerOpportunisticLinksUpdate when a page view triggers a re-rendering of the page.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "OpportunisticLinksUpdate" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 16 of file OpportunisticLinksUpdateHook.php.

Member Function Documentation

◆ onOpportunisticLinksUpdate()

MediaWiki\Page\Hook\OpportunisticLinksUpdateHook::onOpportunisticLinksUpdate (   $page,
  $title,
  $parserOutput 
)

This hook is called by WikiPage::triggerOpportunisticLinksUpdate when a page view triggers a re-rendering of the page.

This may happen particularly if the parser cache is split by user language, and no cached rendering of the page exists in the user's language. The hook is called before checking whether page_links_updated indicates that the links are up to date.

Since
1.35
Parameters
WikiPage$pageWikiPage that was rendered
Title$titleTitle of the rendered page
ParserOutput$parserOutputParserOutput resulting from rendering the page
Returns
bool|void True or no return value to continue, or false to abort triggerOpportunisticLinksUpdate() without triggering any updates

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: