Index: trunk/extensions/Chemistry/ChemFunctions.php |
— | — | @@ -43,11 +43,11 @@ |
44 | 44 | |
45 | 45 | $wgExtensionMessagesFiles['ChemFunctions'] = dirname( __FILE__ ) . '/ChemFunctions.i18n.php'; |
46 | 46 | |
47 | | -$wgExtensionFunctions[] = "wfChemFormExtension"; |
| 47 | +$wgHooks['ParserFirstCallInit'][] = 'wfChemFormExtension'; |
48 | 48 | |
49 | | -function wfChemFormExtension() { |
50 | | - global $wgParser; |
51 | | - $wgParser->setHook( "chemform", "RenderChemForm" ); |
| 49 | +function wfChemFormExtension( $parser ) { |
| 50 | + $parser->setHook( "chemform", "RenderChemForm" ); |
| 51 | + return true; |
52 | 52 | } |
53 | 53 | |
54 | 54 | function RenderChemForm( $input, $argv ) { |
Index: trunk/extensions/AmazonPlus/AmazonPlus.php |
— | — | @@ -83,9 +83,8 @@ |
84 | 84 | define( 'AMAZONPLUS_USED', 3 ); |
85 | 85 | |
86 | 86 | # Set up the tag extension |
87 | | -function efAmazonPlusSetup() { |
88 | | - global $wgParser; |
89 | | - $wgParser->setHook( 'amazon', 'efAmazonPlusRender' ); |
| 87 | +function efAmazonPlusSetup( $parser ) { |
| 88 | + $parser->setHook( 'amazon', 'efAmazonPlusRender' ); |
90 | 89 | wfLoadExtensionMessages( 'AmazonPlus' ); |
91 | 90 | return true; |
92 | 91 | } |
Index: trunk/extensions/Citation/Citation.php |
— | — | @@ -13,12 +13,12 @@ |
14 | 14 | $wgHooks['ParserBeforeTidy'][] = 'citation_hooker'; |
15 | 15 | $wgHooks['ParserClearState'][] = 'citation_clear_state'; |
16 | 16 | |
17 | | -$wgExtensionFunctions[] = "wfCitation"; |
| 17 | +$wgHooks['ParserFirstCallInit'][] = "wfCitation"; |
18 | 18 | |
19 | | -function wfCitation() { |
20 | | - global $wgParser ; |
21 | | - $wgParser->setHook( "citation" , 'parse_citation' ) ; |
22 | | - $wgParser->isMainParser = true ; |
| 19 | +function wfCitation( $parser ) { |
| 20 | + $parser->setHook( "citation" , 'parse_citation' ) ; |
| 21 | + $parser->isMainParser = true ; |
| 22 | + return true; |
23 | 23 | } |
24 | 24 | |
25 | 25 | $wgCitationCache = array() ; |
Index: trunk/extensions/Aggregator/Aggregator.php |
— | — | @@ -18,10 +18,14 @@ |
19 | 19 | |
20 | 20 | $wgExtensionFunctions[] = 'wfAggregatorSetup'; |
21 | 21 | |
| 22 | +$wgHooks['ParserFirstCallInit'][] = 'wfAggregatorOnParserFirstCallInit'; |
| 23 | + |
| 24 | +function wfAggregatorOnParserFirstCallInit( $parser ) { |
| 25 | + $parser->setHook( 'aggregator', 'wfAggregatorHook' ); |
| 26 | + return true; |
| 27 | +} |
| 28 | + |
22 | 29 | function wfAggregatorSetup() { |
23 | | - global $wgParser; |
24 | | - $wgParser->setHook( 'aggregator', 'wfAggregatorHook' ); |
25 | | - |
26 | 30 | // Magpie |
27 | 31 | if ( defined( 'MAGPIE_OUTPUT_ENCODING' ) ) { |
28 | 32 | if ( stricmp( MAGPIE_OUTPUT_ENCODING, 'UTF-8' ) ) { |