![]() ![]() Here is an example extension implementing a custom _CUSTOM_ behaviour switchĬustom/extension.json - This is minimal, a real extension would fill out more fields. This can also be checked later by testing if $parser -> getOutput () -> getPageProperty ( 'MAGIC_WORD' ) is null or the empty string If no specific effect is defined, the magic word will simply set a page property in the page_props table. The effect of most standard behavior switches is defined in Parser :: handleDoubleUnderscore (). These magic words are listed in MagicWordFactory :: mDoubleUnderscoreIDs and also at Help:Magic words#Behavior switches. These magic words typically do not output any content, but instead change the behavior of a page and/or set a page property. This is why during magic rituals certain words are. However, certain words have more magic properties for the reason that they carry more energy and intention. They can be recognized by their use of double underscores (rather than double braces). Word magic is 'the art of using sacred sounds and symbols, and hidden forces to direct and control energy to produce certain desired effects or marvels.' All words have magic properties. Whenever MediaWiki finds text between double braces ( in messages.īehavior switches (double underscore magic words) īehavior switches are a special type of magic word. ![]() The default magic words are implemented in CoreParserFunctions.php. The mapping between the text strings and the ID is stored in the variable $magicWords in a file that can be loaded using $wgExtensionMessagesFiles. Magic words are a technique for mapping a variety of wiki text strings to a single ID that is associated with a function.īoth variables and parser functions use this technique.Īll text mapped to that ID will be replaced with the return value of the function. Looking for a list of magic words and variables? See Help:Magic words. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |