r109411 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109410‎ | r109411 | r109412 >
Date:17:43, 18 January 2012
Author:siebrand
Status:ok
Tags:languagegetmagic 
Comment:
Update documentation as LanguageGetMagic hook is deprecated.
Modified paths:
  • /trunk/phase3/includes/MagicWord.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/MagicWord.php
@@ -20,8 +20,19 @@
2121 * Please avoid reading the data out of one of these objects and then writing
2222 * special case code. If possible, add another match()-like function here.
2323 *
24 - * To add magic words in an extension, use the LanguageGetMagic hook. For
25 - * magic words which are also Parser variables, add a MagicWordwgVariableIDs
 24+ * To add magic words in an extension, use $magicWords in a file listed in
 25+ * $wgExtensionMessagesFiles[].
 26+ *
 27+ * Example:
 28+ *
 29+ * $magicWords = array();
 30+ *
 31+ * $magicWords['en'] = array(
 32+ * 'magicwordkey' => array( 0, 'case_insensitive_magic_word' ),
 33+ * 'magicwordkey2' => array( 1, 'CASE_sensitive_magic_word2' ),
 34+ * );
 35+ *
 36+ * For magic words which are also Parser variables, add a MagicWordwgVariableIDs
2637 * hook. Use string keys.
2738 *
2839 * @ingroup Parser

Status & tagging log