Manual:Hooks/ArticlePageDataAfter

From MediaWiki.org
Jump to: navigation, search
ArticlePageDataAfter
Available from version 1.6.0
Executes after loading the data of an article from the database

Define function:
public static function onArticlePageDataAfter( $article, $row ) { ... }

Attach hook:
$wgHooks['ArticlePageDataAfter'][] = 'MyExtensionHooks::onArticlePageDataAfter';
Called from: Article.php

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

[edit] Details

  • $article: Article object
  • $row: record retrieved from page table


After MediaWiki reads page data from the database, you have an opportunity within this hook to manipulate the data fields that have been retrieved. These data fields are accessible in $row. If you need access to even more data fields from the same page database entry, you may specify these data fields from ArticlePageDataBefore.

Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox