![]() ![]() Here is an example extension implementing a custom _CUSTOM_ behavour 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 When adults teach children about manners, they might remind them to say please by prompting, Whats the magic word This is our introduction to please. If no specific effect is defined, the magic word will simply set a page property in the page_props table. Magic word definition: You use magic to describe something that does things, or appears to do things, by magic. 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. They can be recognized by their use of double underscores (rather than double braces). That word wasn’t really magic, but it allowed us to make magical things happen. (in teaching polite behaviour to children) One of the words please, thank you, or hello. I KNEW they wanted me to say please, but it just seemed so condescending. Any word that has a magical effect when uttered. Whenever MediaWiki finds text between double braces ( in messages.īehavior switches (double underscore magic words)īehavior switches are a special type of magic word. What’s the MAGIC WORD As a kid, I used to hate it when my parents asked me that. 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. Browse the use examples 'what’s the magic word' in the great English corpus. ![]() Check out the pronunciation, synonyms and grammar. Looking for a list of magic words and variables? See Help:Magic words. Magic words are a technique for mapping a variety of wiki text strings to a single ID that is associated with a function. Learn the definition of 'what’s the magic word'. ![]()
0 Comments
Leave a Reply. |