< Manual:Hooks
![]() | This deprecated feature should no longer be used, but is still available for reasons of backwards compatibility. This feature was deprecated in version 1.36.0. Please see BeforeParserFetchTemplateRevisionRecord for an alternative way to use this feature. |
BeforeParserFetchTemplateAndtitle | |
---|---|
Available from version 1.10.1 Allows an extension to specify a version of a page to get for inclusion in a template | |
Define function: | public static function onBeforeParserFetchTemplateAndtitle( Parser $parser, $title, &$skip, &$id ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"BeforeParserFetchTemplateAndtitle": "MyExtensionHooks::onBeforeParserFetchTemplateAndtitle"
}
}
|
Called from: | File(s): parser/Parser.php |
Interface: | BeforeParserFetchTemplateAndtitleHook.php |
For more information about attaching hooks, see Manual:Hooks
For examples of extensions using this hook, see Category:BeforeParserFetchTemplateAndtitle extensions.
Parameters
- $parser: Parser object, used to pass the context of the page whose parsing is calling this hook
- $title: Title object, used to pass the page to be transcluded
- &$skip: Defaults to false, which lets the transclusion continue; if set to true, will replace the transclusion with a simple wiki link to the title
- &$id: Defaults to false, which will cause the most recent revision to be fetched; if set to a revision ID, will fetch that revision instead
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.