34 public static function register(
$parser ) {
37 # Syntax for arguments (see Parser::setFunctionHook):
38 # "name for lookup in localized magic words array",
40 # optional Parser::SFH_NO_HASH to omit the hash from calls (e.g. {{int:...}}
41 # instead of {{#int:...}})
43 'ns',
'nse',
'urlencode',
'lcfirst',
'ucfirst',
'lc',
'uc',
44 'localurl',
'localurle',
'fullurl',
'fullurle',
'canonicalurl',
45 'canonicalurle',
'formatnum',
'grammar',
'gender',
'plural',
'bidi',
46 'numberofpages',
'numberofusers',
'numberofactiveusers',
47 'numberofarticles',
'numberoffiles',
'numberofadmins',
48 'numberingroup',
'numberofedits',
'language',
49 'padleft',
'padright',
'anchorencode',
'defaultsort',
'filepath',
50 'pagesincategory',
'pagesize',
'protectionlevel',
'protectionexpiry',
51 'namespacee',
'namespacenumber',
'talkspace',
'talkspacee',
52 'subjectspace',
'subjectspacee',
'pagename',
'pagenamee',
53 'fullpagename',
'fullpagenamee',
'rootpagename',
'rootpagenamee',
54 'basepagename',
'basepagenamee',
'subpagename',
'subpagenamee',
55 'talkpagename',
'talkpagenamee',
'subjectpagename',
56 'subjectpagenamee',
'pageid',
'revisionid',
'revisionday',
57 'revisionday2',
'revisionmonth',
'revisionmonth1',
'revisionyear',
58 'revisiontimestamp',
'revisionuser',
'cascadingsources',
60 foreach ( $noHashFunctions as $func ) {
61 $parser->setFunctionHook( $func, [ __CLASS__, $func ], Parser::SFH_NO_HASH );
66 [ __CLASS__,
'mwnamespace' ],
69 $parser->setFunctionHook(
'int', [ __CLASS__,
'intFunction' ], Parser::SFH_NO_HASH );
70 $parser->setFunctionHook(
'special', [ __CLASS__,
'special' ] );
71 $parser->setFunctionHook(
'speciale', [ __CLASS__,
'speciale' ] );
72 $parser->setFunctionHook(
'tag', [ __CLASS__,
'tagObj' ], Parser::SFH_OBJECT_ARGS );
73 $parser->setFunctionHook(
'formatdate', [ __CLASS__,
'formatDate' ] );
78 [ __CLASS__,
'displaytitle' ],
85 [ __CLASS__,
'pagesinnamespace' ],
97 if (
strval( $part1 ) !==
'' ) {
100 ->inLanguage(
$parser->getOptions()->getUserLangObj() );
101 return [ $message->plain(),
'noparse' =>
false ];
103 return [
'found' =>
false ];
118 $date =
trim( $date );
120 $pref =
$parser->getOptions()->getDateFormat();
124 if ( $pref ==
'default' && $defaultPref ) {
128 $date = $df->reformat( $pref, $date, [
'match-whole' ] );
133 if (
intval( $part1 ) || $part1 ==
"0" ) {
134 $index =
intval( $part1 );
136 $index =
$parser->getContentLanguage()->getNsIndex(
str_replace(
' ',
'_', $part1 ) );
138 if ( $index !==
false ) {
139 return $parser->getContentLanguage()->getFormattedNsText( $index );
141 return [
'found' =>
false ];
169 $parser->getMagicWordFactory()->newArray( [
'url_path',
'url_query',
'url_wiki' ] );
174 $func =
'wfUrlencode';
180 $func =
'rawurlencode';
194 return $parser->getContentLanguage()->lcfirst(
$s );
198 return $parser->getContentLanguage()->ucfirst(
$s );
207 return $parser->markerSkipCallback(
$s, [
$parser->getContentLanguage(),
'lc' ] );
216 return $parser->markerSkipCallback(
$s, [
$parser->getContentLanguage(),
'uc' ] );
259 $title = Title::newFromText(
$s );
260 # Due to order of execution of a lot of bits, the values might be encoded
261 # before arriving here; if that's true, then the title can't be created
262 # and the variable will fail. If we can't get a decent title from the first
263 # attempt, url-decode and try for a second.
268 # Convert NS_MEDIA -> NS_FILE
269 if ( $title->inNamespace(
NS_MEDIA ) ) {
270 $title = Title::makeTitle(
NS_FILE, $title->getDBkey() );
273 $text = $title->$func( $arg );
275 $text = $title->$func();
279 return [
'found' =>
false ];
290 if ( self::matchAgainstMagicword(
$parser->getMagicWordFactory(),
'rawsuffix', $arg ) ) {
291 $func = [
$parser->getFunctionLang(),
'parseFormattedNumber' ];
293 self::matchAgainstMagicword(
$parser->getMagicWordFactory(),
'nocommafysuffix', $arg )
295 $func = [
$parser->getFunctionLang(),
'formatNumNoSeparators' ];
297 $func = [
$parser->getFunctionLang(),
'formatNum' ];
299 return $parser->markerSkipCallback( $num, $func );
309 $word =
$parser->killMarkers( $word );
310 return $parser->getFunctionLang()->convertGrammar( $word, $case );
322 if ( count( $forms ) === 0 ) {
324 }
elseif ( count( $forms ) === 1 ) {
333 $title = Title::newFromText(
$username, NS_USER );
335 if ( $title && $title->inNamespace( NS_USER ) ) {
341 $genderCache = MediaWikiServices::getInstance()->getGenderCache();
343 $gender = $genderCache->getGenderOf( $user, __METHOD__ );
345 $gender = $genderCache->getGenderOf(
$parser->getOptions()->getUser(), __METHOD__ );
347 $ret =
$parser->getFunctionLang()->gender( $gender, $forms );
358 $text =
$parser->getFunctionLang()->parseFormattedNumber( $text );
360 return $parser->getFunctionLang()->convertPlural( $text, $forms );
369 return $parser->getFunctionLang()->embedBidi( $text );
387 [
'displaytitle_noerror',
'displaytitle_noreplace' ] );
392 $text =
$parser->doQuotes( $text );
395 $text =
$parser->killMarkers( $text );
399 $bad = [
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'div',
'blockquote',
'ol',
'ul',
'li',
'hr',
400 'table',
'tr',
'th',
'td',
'dl',
'dd',
'caption',
'p',
'ruby',
'rb',
'rt',
'rtc',
'rp',
'br' ];
404 $htmlTagsCallback =
function ( &
$params ) {
405 $decoded = Sanitizer::decodeTagAttributes(
$params );
407 if (
isset( $decoded[
'style'] ) ) {
410 $decoded[
'style'] = Sanitizer::checkCss( $decoded[
'style'] );
412 if (
preg_match(
'/(display|user-select|visibility)\s*:/i', $decoded[
'style'] ) ) {
413 $decoded[
'style'] =
'/* attempt to bypass $wgRestrictDisplayTitle */';
417 $params = Sanitizer::safeEncodeTagAttributes( $decoded );
420 $htmlTagsCallback =
null;
426 $text = Sanitizer::normalizeCharReferences( Sanitizer::removeHTMLtags(
433 $title = Title::newFromText( Sanitizer::stripAllTags( $text ) );
436 ( $title instanceof
Title
438 && $title->equals(
$parser->mTitle ) )
440 $old =
$parser->mOutput->getProperty(
'displaytitle' );
441 if ( $old ===
false || $arg !==
'displaytitle_noreplace' ) {
442 $parser->mOutput->setDisplayTitle( $text );
444 if ( $old !==
false && $old !== $text && !$arg ) {
445 $converter =
$parser->getTargetLanguage()->getConverter();
446 return '<span class="error">' .
451 )->inContentLanguage()->text() .
457 $parser->getOutput()->addWarning(
463 $parser->addTrackingCategory(
'restricted-displaytitle-ignored' );
483 $mwObject = $magicWordFactory->
get( $magicword );
484 return $mwObject->matchStartToEnd(
$value );
499 if ( $raw !==
null && !$magicWordFactory ) {
500 $magicWordFactory = MediaWikiServices::getInstance()->getMagicWordFactory();
503 $raw !==
null && self::matchAgainstMagicword( $magicWordFactory,
'rawsuffix', $raw )
507 return $language->formatNum( $num );
567 $t = Title::newFromText( $title );
574 $t = Title::newFromText( $title );
581 $t = Title::newFromText( $title );
585 return $t->getNamespace();
588 $t = Title::newFromText( $title );
595 $t = Title::newFromText( $title );
602 $t = Title::newFromText( $title );
609 $t = Title::newFromText( $title );
624 $t = Title::newFromText( $title );
631 $t = Title::newFromText( $title );
638 $t = Title::newFromText( $title );
645 $t = Title::newFromText( $title );
652 $t = Title::newFromText( $title );
659 $t = Title::newFromText( $title );
666 $t = Title::newFromText( $title );
673 $t = Title::newFromText( $title );
680 $t = Title::newFromText( $title );
687 $t = Title::newFromText( $title );
694 $t = Title::newFromText( $title );
701 $t = Title::newFromText( $title );
708 $t = Title::newFromText( $title );
715 $t = Title::newFromText( $title );
736 'pagesincategory_all',
737 'pagesincategory_pages',
738 'pagesincategory_subcats',
739 'pagesincategory_files'
745 if ( self::matchAgainstMagicword(
$parser->getMagicWordFactory(),
'rawsuffix', $arg1 ) ) {
755 $type =
'pagesincategory_all';
758 $title = Title::makeTitleSafe(
NS_CATEGORY, $name );
759 if ( !$title ) { # invalid
title
762 $parser->getContentLanguage()->findVariantLink( $name, $title,
true );
765 $name = $title->getDBkey();
768 $category = Category::newFromTitle( $title );
770 $allCount = $subcatCount = $fileCount = $pagesCount = 0;
771 if (
$parser->incrementExpensiveFunctionCount() ) {
774 $allCount = (
int)$category->getPageCount();
775 $subcatCount = (
int)$category->getSubcatCount();
776 $fileCount = (
int)$category->getFileCount();
777 $pagesCount = $allCount - $subcatCount -
$fileCount;
799 $title = Title::newFromText( $page );
807 $length =
$rev ?
$rev->getSize() : 0;
808 if ( $length ===
null ) {
828 $titleObject = Title::newFromText( $title );
829 if ( !( $titleObject instanceof
Title ) ) {
830 $titleObject =
$parser->mTitle;
832 if ( $titleObject->areRestrictionsLoaded() ||
$parser->incrementExpensiveFunctionCount() ) {
834 # Title::getRestrictions returns an array, its possible it may have
835 # multiple values in the future
836 return implode(
',', $restrictions );
854 $titleObject = Title::newFromText( $title );
855 if ( !( $titleObject instanceof
Title ) ) {
856 $titleObject =
$parser->mTitle;
858 if ( $titleObject->areRestrictionsLoaded() ||
$parser->incrementExpensiveFunctionCount() ) {
862 if ( $expiry ===
false ) {
880 $lang = Language::fetchLanguageName(
$code, $inLanguage );
893 public static function pad(
894 $parser, $string, $length, $padding =
'0', $direction = STR_PAD_RIGHT
896 $padding =
$parser->killMarkers( $padding );
897 $lengthOfPadding =
mb_strlen( $padding );
898 if ( $lengthOfPadding == 0 ) {
902 # The remaining length to add counts down to 0 as padding is added
903 $length = min( (
int)$length, 500 ) -
mb_strlen( $string );
904 if ( $length <= 0 ) {
909 # $finalPadding is just $padding repeated enough times so that
910 # mb_strlen( $string ) + mb_strlen( $finalPadding ) == $length
912 while ( $length > 0 ) {
913 # If $length < $lengthofPadding, truncate $padding so we get the
914 # exact length desired.
915 $finalPadding .=
mb_substr( $padding, 0, $length );
919 if ( $direction == STR_PAD_LEFT ) {
920 return $finalPadding .
$string;
926 public static function padleft(
$parser, $string =
'', $length = 0, $padding =
'0' ) {
930 public static function padright(
$parser, $string =
'', $length = 0, $padding =
'0' ) {
940 $text =
$parser->killMarkers( $text );
942 return Sanitizer::safeEncodeAttribute(
$section );
946 list( $page, $subpage ) = MediaWikiServices::getInstance()->getSpecialPageFactory()->
947 resolveAlias( $text );
949 $title = SpecialPage::getTitleFor( $page, $subpage );
950 return $title->getPrefixedText();
953 $title = Title::makeTitleSafe(
NS_SPECIAL, $text );
974 [
'defaultsort_noerror',
'defaultsort_noreplace' ] );
978 $text =
trim( $text );
979 if (
strlen( $text ) == 0 ) {
982 $old =
$parser->getCustomDefaultSort();
983 if ( $old ===
false || $arg !==
'defaultsort_noreplace' ) {
984 $parser->setDefaultSort( $text );
987 if ( $old ===
false || $old == $text || $arg ) {
990 $converter =
$parser->getTargetLanguage()->getConverter();
991 return '<span class="error">' .
996 )->inContentLanguage()->text() .
1015 if ( $argA ==
'nowiki' ) {
1018 $parsedWidthParam = Parser::parseWidthParam( $argB );
1021 $parsedWidthParam = Parser::parseWidthParam( $argA );
1022 $isNowiki = ( $argB ==
'nowiki' );
1026 $url = $file->getFullUrl();
1029 if ( count( $parsedWidthParam ) ) {
1030 $mto = $file->transform( $parsedWidthParam );
1032 if ( $mto && !$mto->isError() ) {
1038 return [ $url,
'nowiki' =>
true ];
1054 if ( !count(
$args ) ) {
1059 if ( count(
$args ) ) {
1066 foreach (
$args as $arg ) {
1067 $bits = $arg->splitArg();
1068 if (
strval( $bits[
'index'] ) ===
'' ) {
1069 $name =
trim( $frame->expand( $bits[
'name'], PPFrame::STRIP_COMMENTS ) );
1070 $value =
trim( $frame->expand( $bits[
'value'] ) );
1078 $stripList =
$parser->getStripList();
1079 if ( !
in_array( $tagName, $stripList ) ) {
1082 foreach ( $attributes as $name =>
$value ) {
1085 if ( $inner ===
null ) {
1086 return "<$tagName$attrText/>";
1088 return "<$tagName$attrText>$inner</$tagName>";
1094 'attributes' => $attributes,
1095 'close' =>
"</$tagName>",
1119 if ( $title->equals(
$parser->getTitle() ) ) {
1120 $parserRev =
$parser->getRevisionObject();
1121 if ( $parserRev && $parserRev->isCurrent() ) {
1123 $parser->getOutput()->setFlag(
'vary-revision' );
1124 wfDebug( __METHOD__ .
": use current revision from parser, setting vary-revision...\n" );
1130 $page = $title->getPrefixedDBkey();
1132 if ( !(
$parser->currentRevisionCache &&
$parser->currentRevisionCache->has( $page ) )
1133 && !
$parser->incrementExpensiveFunctionCount() ) {
1136 $rev =
$parser->fetchCurrentRevisionOfTitle( $title );
1137 $pageID =
$rev ?
$rev->getPage() : 0;
1141 $parser->getOutput()->addTemplate( $title, $pageID, $revID );
1154 $t = Title::newFromText( $title );
1159 if (
$t->equals(
$parser->getTitle() ) ) {
1161 return $t->getArticleID();
1165 if ( !
$t->canExist() ||
$t->isExternal() ) {
1170 $linkCache = MediaWikiServices::getInstance()->getLinkCache();
1171 $pdbk =
$t->getPrefixedDBkey();
1172 $id = $linkCache->getGoodLinkID( $pdbk );
1177 if ( $linkCache->isBadLink( $pdbk ) ) {
1183 if (
$parser->incrementExpensiveFunctionCount() ) {
1184 $id =
$t->getArticleID();
1199 $t = Title::newFromText( $title );
1216 $t = Title::newFromText( $title );
1222 return $rev ? MWTimestamp::getLocalInstance(
$rev->getTimestamp() )->format(
'j' ) :
'';
1233 $t = Title::newFromText( $title );
1239 return $rev ? MWTimestamp::getLocalInstance(
$rev->getTimestamp() )->format(
'd' ) :
'';
1250 $t = Title::newFromText( $title );
1256 return $rev ? MWTimestamp::getLocalInstance(
$rev->getTimestamp() )->format(
'm' ) :
'';
1267 $t = Title::newFromText( $title );
1273 return $rev ? MWTimestamp::getLocalInstance(
$rev->getTimestamp() )->format(
'n' ) :
'';
1284 $t = Title::newFromText( $title );
1290 return $rev ? MWTimestamp::getLocalInstance(
$rev->getTimestamp() )->format(
'Y' ) :
'';
1301 $t = Title::newFromText( $title );
1307 return $rev ? MWTimestamp::getLocalInstance(
$rev->getTimestamp() )->format(
'YmdHis' ) :
'';
1318 $t = Title::newFromText( $title );
1324 return $rev ?
$rev->getUserText() :
'';
1340 $titleObject = Title::newFromText( $title );
1341 if ( !( $titleObject instanceof
Title ) ) {
1342 $titleObject =
$parser->mTitle;
1344 if ( $titleObject->areCascadeProtectionSourcesLoaded()
1345 ||
$parser->incrementExpensiveFunctionCount()
1348 $sources = $titleObject->getCascadeProtectionSources();
1349 foreach ( $sources[0] as $sourceTitle ) {
1350 $names[] = $sourceTitle->getPrefixedText();
1352 return implode(
'|', $names );
This list may contain false positives That usually means there is additional text with links below the first Each row contains links to the first and second as well as the first line of the second redirect text
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
$wgAllowDisplayTitle
Allow DISPLAYTITLE to change title display.
$wgRestrictDisplayTitle
For consistency, restrict DISPLAYTITLE to text that normalizes to the same canonical DB key.
$wgAllowSlowParserFunctions
Enable slow parser functions.
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
wfUrlencode( $s)
We want some things to be included as literal characters in our title URLs for prettiness,...
wfExpandUrl( $url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL.
wfFindFile( $title, $options=[])
Find a file.
wfEscapeWikiText( $text)
Escapes the given text so that it may be output using addWikiText() without any linking,...
Various core parser functions, registered in Parser::firstCallInit()
static language( $parser, $code='', $inLanguage='')
Gives language names.
static numberingroup( $parser, $name='', $raw=null)
static rootpagename( $parser, $title=null)
static localurl( $parser, $s='', $arg=null)
static formatnum( $parser, $num='', $arg=null)
static ns( $parser, $part1='')
static protectionexpiry( $parser, $type='', $title='')
Returns the requested protection expiry for the current page.
static pagenamee( $parser, $title=null)
static padleft( $parser, $string='', $length=0, $padding='0')
static fullurle( $parser, $s='', $arg=null)
static revisionmonth( $parser, $title=null)
Get the month with leading zeros from the last revision of a specified page.
static fullpagename( $parser, $title=null)
static revisionid( $parser, $title=null)
Get the id from the last revision of a specified page.
static intFunction( $parser, $part1='')
static pagesinnamespace( $parser, $namespace=0, $raw=null)
static numberofusers( $parser, $raw=null)
static pagesincategory( $parser, $name='', $arg1=null, $arg2=null)
Return the number of pages, files or subcats in the given category, or 0 if it's nonexistent.
static special( $parser, $text)
static nse( $parser, $part1='')
static pagesize( $parser, $page='', $raw=null)
Return the size of the given page, or 0 if it's nonexistent.
static canonicalurl( $parser, $s='', $arg=null)
static basepagenamee( $parser, $title=null)
static subjectspacee( $parser, $title=null)
static numberofedits( $parser, $raw=null)
static numberoffiles( $parser, $raw=null)
static ucfirst( $parser, $s='')
static basepagename( $parser, $title=null)
static numberofpages( $parser, $raw=null)
static lcfirst( $parser, $s='')
static urlFunction( $func, $s='', $arg=null)
static formatRaw( $num, $raw, $language, MagicWordFactory $magicWordFactory=null)
Formats a number according to a language.
static talkspacee( $parser, $title=null)
static bidi( $parser, $text='')
static revisionuser( $parser, $title=null)
Get the user from the last revision of a specified page.
static anchorencode( $parser, $text)
static subjectpagenamee( $parser, $title=null)
static namespacee( $parser, $title=null)
static subjectpagename( $parser, $title=null)
static filepath( $parser, $name='', $argA='', $argB='')
Usage {{filepath|300}}, {{filepath|nowiki}}, {{filepath|nowiki|300}} or {{filepath|300|nowiki}} or {{...
static padright( $parser, $string='', $length=0, $padding='0')
static pad( $parser, $string, $length, $padding='0', $direction=STR_PAD_RIGHT)
Unicode-safe str_pad with the restriction that $length is forced to be <= 500.
static canonicalurle( $parser, $s='', $arg=null)
static cascadingsources( $parser, $title='')
Returns the sources of any cascading protection acting on a specified page.
static numberofactiveusers( $parser, $raw=null)
static plural( $parser, $text='')
static displaytitle( $parser, $text='', $uarg='')
Override the title of the page when viewed, provided we've been given a title which will normalise to...
static pageid( $parser, $title=null)
Get the pageid of a specified page.
static formatDate( $parser, $date, $defaultPref=null)
static gender( $parser, $username)
static urlencode( $parser, $s='', $arg=null)
urlencodes a string according to one of three patterns: (T24474)
static grammar( $parser, $case='', $word='')
static subpagenamee( $parser, $title=null)
static tagObj( $parser, $frame, $args)
Parser function to extension tag adaptor.
static revisionmonth1( $parser, $title=null)
Get the month from the last revision of a specified page.
static rootpagenamee( $parser, $title=null)
static protectionlevel( $parser, $type='', $title='')
Returns the requested protection level for the current page.
static namespacenumber( $parser, $title=null)
static revisionday( $parser, $title=null)
Get the day from the last revision of a specified page.
static subjectspace( $parser, $title=null)
static lc( $parser, $s='')
static talkpagename( $parser, $title=null)
static fullurl( $parser, $s='', $arg=null)
static mwnamespace( $parser, $title=null)
Given a title, return the namespace name that would be given by the corresponding magic word Note: fu...
static matchAgainstMagicword(MagicWordFactory $magicWordFactory, $magicword, $value)
Matches the given value against the value of given magic word.
static pagename( $parser, $title=null)
Functions to get and normalize pagenames, corresponding to the magic words of the same names.
static getCachedRevisionObject( $parser, $title=null)
Fetched the current revision of the given title and return this.
static numberofadmins( $parser, $raw=null)
static numberofarticles( $parser, $raw=null)
static revisionyear( $parser, $title=null)
Get the year from the last revision of a specified page.
static revisionday2( $parser, $title=null)
Get the day with leading zeros from the last revision of a specified page.
static uc( $parser, $s='')
static talkpagenamee( $parser, $title=null)
static revisiontimestamp( $parser, $title=null)
Get the timestamp from the last revision of a specified page.
static subpagename( $parser, $title=null)
static localurle( $parser, $s='', $arg=null)
static defaultsort( $parser, $text, $uarg='')
static fullpagenamee( $parser, $title=null)
static talkspace( $parser, $title=null)
static speciale( $parser, $text)
A factory that stores information about MagicWords, and creates them on demand with caching.
get( $id)
Factory: creates an object representing an ID.
static numberingroup( $group)
Find the number of users in a given user group.
Represents a title within MediaWiki.
hasFragment()
Check if a Title fragment is set.
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
static getDefaultOption( $opt)
Get a given default option value.
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
see documentation in includes Linker php for Linker::makeImageLink or false for current used if you return false $parser
This code would result in ircNotify being run twice when an article is and once for brion Hooks can return three possible true was required This is the default since MediaWiki *some string
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not it can be in the form of< username >< more info > e g for bot passwords intended to be added to log contexts Fields it might only if the login was with a bot password it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable & $code
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation use $formDescriptor instead default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<div ...>$1</div>"). - flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException':Called before an exception(or PHP error) is logged. This is meant for integration with external error aggregation services
Allows to change the fields on the form that will be generated $name
this hook is for auditing only or null if authentication failed before getting that far $username
usually copyright or history_copyright This message must be in HTML not wikitext if the section is included from a template $section
presenting them properly to the user as errors is done by the caller return true use this to change the list i e etc $rev
processing should stop and the error should be shown to the user * false
magicword txt Magic Words are some phrases used in the wikitext They are used for two that looks like templates but that don t accept any parameter *Parser functions(like {{fullurl:...}}, {{#special:...}}) $magicWords['en']
if(!isset( $args[0])) $lang