----
<?php
-$magicWords = array();
+$magicWords = [];
-$magicWords['en'] = array(
+$magicWords['en'] = [
// Case sensitive.
- 'mag_custom' => array( 1, 'CUSTOM' ),
-);
+ 'mag_custom' => [ 1, 'CUSTOM' ],
+];
-$magicWords['es'] = array(
- 'mag_custom' => array( 1, 'ADUANERO' ),
-);
+$magicWords['es'] = [
+ 'mag_custom' => [ 1, 'ADUANERO' ],
+];
----
$wgExtensionMessagesFiles['ExtensionNameMagic'] = __DIR__ . '/ExtensionName.i18n.magic.php';
----
<?php
-$magicWords = array();
+$magicWords = [];
-$magicWords['en'] = array(
+$magicWords['en'] = [
// Case insensitive.
- 'mag_custom' => array( 0, 'custom' ),
-);
+ 'mag_custom' => [ 0, 'custom' ],
+];
-$magicWords['es'] = array(
- 'mag_custom' => array( 0, 'aduanero' ),
-);
+$magicWords['es'] = [
+ 'mag_custom' => [ 0, 'aduanero' ],
+];
----
$wgExtensionMessagesFiles['ExtensionNameMagic'] = __DIR__ . '/ExtensionName.i18n.magic.php';
return "custom: var1 is $var1, var2 is $var2";
}
-Note: the 'ParserFirstCallInit' hook is only aviable since 1.12. To work with
+Note: the 'ParserFirstCallInit' hook is only available since 1.12. To work with
an older version, you'll need to use an extension function.
Online documentation (contains more informations):
Magic words: https://www.mediawiki.org/wiki/Manual:Magic_words
Variables: https://www.mediawiki.org/wiki/Manual:Variable
-Parser functions: https://www.mediawiki.org/wiki/Manual:Parser_functions
\ No newline at end of file
+Parser functions: https://www.mediawiki.org/wiki/Manual:Parser_functions