Update documentation as LanguageGetMagic hook is deprecated.
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Wed, 18 Jan 2012 17:43:08 +0000 (17:43 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Wed, 18 Jan 2012 17:43:08 +0000 (17:43 +0000)
includes/MagicWord.php

index 563d3a5..8559dda 100644 (file)
  * Please avoid reading the data out of one of these objects and then writing
  * special case code. If possible, add another match()-like function here.
  *
- * To add magic words in an extension, use the LanguageGetMagic hook. For
- * magic words which are also Parser variables, add a MagicWordwgVariableIDs
+ * To add magic words in an extension, use $magicWords in a file listed in
+ * $wgExtensionMessagesFiles[].
+ * 
+ * Example:
+ *
+ * $magicWords = array();
+ *
+ * $magicWords['en'] = array(
+ *     'magicwordkey' => array( 0, 'case_insensitive_magic_word' ),
+ *     'magicwordkey2' => array( 1, 'CASE_sensitive_magic_word2' ),
+ * );
+ *
+ * For magic words which are also Parser variables, add a MagicWordwgVariableIDs
  * hook. Use string keys.
  *
  * @ingroup Parser