Manual:Hooks/ArticleAfterFetchContent

From MediaWiki.org
Jump to: navigation, search
ArticleAfterFetchContent
Available from version 1.6.0
Used to process raw wiki code after most of the other parser processing is complete.

Define function:
public static function onArticleAfterFetchContent( &$article, &$content ) { ... }

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

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

[edit] Details

  • &$article: the article object being loaded from the database
  • &$content: the content (text) of the article

[edit] Notes

  • Not called when loading page from cache, use ?action=purge to force page render.
  • Also called when fetching article source for action=edit.
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox