| ArticlePageDataBefore | |
|---|---|
| Available from version 1.6.0 Executes before data is loaded for the article requested | |
| Define function: | publicstaticfunctiononArticlePageDataBefore($article,$fields,&$tables,&$joinConds){...} |
| Attach hook: | Inextension.json:{"Hooks":{"ArticlePageDataBefore":"MediaWiki\\Extension\\MyExtension\\Hooks::onArticlePageDataBefore"}} |
| Called from: | File(s):page/WikiPage.php |
| Interface: | ArticlePageDataBeforeHook.php |
For more information about attaching hooks, seeManual:Hooks.
For examples of extensions using this hook, seeCategory:ArticlePageDataBefore extensions.
As MediaWiki reads in thepage data, this hook allows you to read more data fields related to the same database row than what is specified in WikiPage::selectFields(). You specify more data fields by adding them to $fields parameter. Such data fields can then be manipulated from ArticlePageDataAfter.