MediaWiki master
|
Various tag hooks, registered in every Parser. More...
Static Public Member Functions | |
static | gallery (?string $content, array $attributes, Parser $parser) |
Core parser tag hook function for 'gallery'. | |
static | html (?string $content, array $attributes, Parser $parser) |
Core parser tag hook function for 'html', used only when $wgRawHtml is enabled. | |
static | indicator (?string $content, array $attributes, Parser $parser, PPFrame $frame) |
XML-style tag for page status indicators: icons (or short text snippets) usually displayed in the top-right corner of the page, outside of the main content. | |
static | langconvert (?string $content, array $attributes, Parser $parser, PPFrame $frame) |
Returns content converted into the requested language variant, using LanguageConverter. | |
static | nowiki (?string $content, array $attributes, Parser $parser) |
Core parser tag hook function for 'nowiki'. | |
static | pre (?string $content, array $attribs, Parser $parser) |
Core parser tag hook function for 'pre'. | |
static | register (Parser $parser, ServiceOptions $options) |
Public Attributes | |
const | REGISTER_OPTIONS |
Various tag hooks, registered in every Parser.
Definition at line 36 of file CoreTagHooks.php.
|
static |
Core parser tag hook function for 'gallery'.
Renders a thumbnail list of the given images, with optional captions. Full syntax documented on the wiki:
https://www.mediawiki.org/wiki/Help:Images#Gallery_syntax
?string | $content | |
array | $attributes | |
Parser | $parser |
Definition at line 177 of file CoreTagHooks.php.
|
static |
Core parser tag hook function for 'html', used only when $wgRawHtml is enabled.
This is potentially unsafe and should be used only in very careful circumstances, as the contents are emitted as raw HTML.
Uses undocumented extended tag hook return values, introduced in r61913.
?string | $content | |
array | $attributes | |
Parser | $parser |
Definition at line 108 of file CoreTagHooks.php.
References MediaWiki\Parser\Parser\getOptions(), and MediaWiki\Parser\Parser\msg().
|
static |
XML-style tag for page status indicators: icons (or short text snippets) usually displayed in the top-right corner of the page, outside of the main content.
?string | $content | |
array | $attributes | |
Parser | $parser | |
PPFrame | $frame |
Definition at line 193 of file CoreTagHooks.php.
References MediaWiki\Parser\Parser\msg().
|
static |
Returns content converted into the requested language variant, using LanguageConverter.
?string | $content | |
array | $attributes | |
Parser | $parser | |
PPFrame | $frame |
Definition at line 219 of file CoreTagHooks.php.
References MediaWiki\Parser\Parser\recursiveTagParse().
|
static |
Core parser tag hook function for 'nowiki'.
Text within this section gets interpreted as a string of text with HTML-compatible character references, and wiki markup within it will not be expanded.
Uses undocumented extended tag hook return values, introduced in r61913.
Uses custom html escaping which phan-taint-check won't recognize hence we suppress the error.
?string | $content | |
array | $attributes | |
Parser | $parser |
Definition at line 147 of file CoreTagHooks.php.
|
static |
Core parser tag hook function for 'pre'.
Text is treated roughly as 'nowiki' wrapped in an HTML 'pre' tag; valid HTML attributes are passed on.
?string | $content | |
array | $attribs | |
Parser | $parser |
Definition at line 77 of file CoreTagHooks.php.
|
static |
Parser | $parser | |
ServiceOptions | $options |
Definition at line 53 of file CoreTagHooks.php.
References MediaWiki\Parser\Parser\setHook().
Referenced by MediaWiki\Parser\Parser\__construct().
const CoreTagHooks::REGISTER_OPTIONS |
Definition at line 41 of file CoreTagHooks.php.
Referenced by MediaWiki\Parser\Parser\__construct().