< Manual:Hooks
ArticleContentViewCustom
Available from version 1.21.0
Removed in version 1.35.0
allows to output the text of the article in a different format than wikitext
Define function:
public static function onArticleContentViewCustom( $content, $title, $output ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ArticleContentViewCustom": "MyExtensionHooks::onArticleContentViewCustom"
	}
}
Called from: File(s): page/Article.php
Interface: ArticleContentViewCustomHook.php

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

Details

Allows to output the text of the article in a different format than wikitext. Note that it is preferable to implement proper handing for a custom data type using the ContentHandler facility.

  • $content: content of the page, as a Content object
  • $title: title of the page
  • $output: reference to $wgOut
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.