Index: trunk/extensions/FramedVideo/FramedVideo.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | |
26 | 26 | $dir = dirname(__FILE__) . '/'; |
27 | 27 | $wgExtensionMessagesFiles['FramedVideo'] = $dir . 'FramedVideo.i18n.php'; |
28 | | -$wgExtensionFunctions[] = 'wfFramedVideo'; |
| 28 | +$wgHooks['ParserFirstCallInit'][] = 'wfFramedVideoSetHook'; |
29 | 29 | |
30 | 30 | $wgExtensionCredits['parserhook'][] = array( |
31 | 31 | 'path' => __FILE__, |
— | — | @@ -35,10 +35,9 @@ |
36 | 36 | 'version' => '1.2.1', |
37 | 37 | ); |
38 | 38 | |
39 | | -function wfFramedVideo() { |
40 | | - global $wgParser; |
41 | | - |
42 | | - $wgParser->setHook( 'video', 'renderFramedVideo' ); |
| 39 | +function wfFramedVideoSetHook( $parser ) { |
| 40 | + $parser->setHook( 'video', 'renderFramedVideo' ); |
| 41 | + return true; |
43 | 42 | } |
44 | 43 | |
45 | 44 | function renderFramedVideo( $input, $args, $parser ) { |
Index: trunk/extensions/FormatDates/FormatDates.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | |
19 | 19 | $wgAutoloadClasses['DateParser'] = dirname( __FILE__ ) . '/DateParser.php'; |
20 | 20 | $wgAutoloadClasses['FormattableDate'] = dirname( __FILE__ ) . '/FormattableDate.php'; |
21 | | -$wgExtensionFunctions[] = 'efFormatDates'; |
| 21 | +$wgHooks['ParserFirstCallInit'][] = 'efFormatDatesSetHook'; |
22 | 22 | |
23 | 23 | $wgExtensionCredits['parserhook'][] = array( |
24 | 24 | 'path' => __FILE__, |
— | — | @@ -26,9 +26,9 @@ |
27 | 27 | 'description' => 'Supports refactoring of unlinked dates through the <code><nowiki><date></nowiki></code> tag', |
28 | 28 | ); |
29 | 29 | |
30 | | -function efFormatDates() { |
31 | | - global $wgParser; |
32 | | - $wgParser->setHook( 'date', 'efFormatDate' ); |
| 30 | +function efFormatDatesSetHook( $parser ) { |
| 31 | + $parser->setHook( 'date', 'efFormatDate' ); |
| 32 | + return true; |
33 | 33 | } |
34 | 34 | |
35 | 35 | function efFormatDate( $text, $args, &$parser ) { |
Index: trunk/extensions/FolkTagCloud/FolkTagCloud.php |
— | — | @@ -32,13 +32,13 @@ |
33 | 33 | |
34 | 34 | $wgExtensionMessagesFiles['FolkTagCloud'] = dirname( __FILE__ ) . '/FolkTagCloud.i18n.php'; |
35 | 35 | |
36 | | -$wgExtensionFunctions[] = 'registerFolkTagCloudExtension'; |
| 36 | +$wgHooks['ParserFirstCallInit'][] = 'registerFolkTagCloudExtension'; |
37 | 37 | $wgHooks['smwInitProperties'][] = 'initFolkTagProperty'; |
38 | 38 | |
39 | 39 | # registering extension |
40 | | -function registerFolkTagCloudExtension() { |
41 | | - global $wgParser; |
42 | | - $wgParser->setHook( 'folktagcloud', 'renderFolkTagCloud' ); |
| 40 | +function registerFolkTagCloudExtension( $parser ) { |
| 41 | + $parser->setHook( 'folktagcloud', 'renderFolkTagCloud' ); |
| 42 | + return true; |
43 | 43 | } |
44 | 44 | |
45 | 45 | # initialising predefined property 'FolkTag' |
Index: trunk/extensions/gis/geo.php |
— | — | @@ -41,16 +41,16 @@ |
42 | 42 | exit( 1 ) ; |
43 | 43 | } |
44 | 44 | |
45 | | -$wgExtensionFunctions[] = "wfGeoExtension"; |
| 45 | +$wgHooks['ArticleSaveComplete'][] = 'articleSaveGeo'; |
| 46 | +$wgHooks['ArticleDelete'][] = 'articleDeleteGeo'; |
| 47 | +$wgHooks['ParserFirstCallInit'][] = 'wfGeoSetHook'; |
46 | 48 | |
47 | 49 | /** |
48 | 50 | * Installer |
49 | 51 | */ |
50 | | -function wfGeoExtension () { |
51 | | - global $wgParser, $wgHooks ; |
52 | | - $wgParser->setHook ( 'geo' , 'parseGeo' ) ; |
53 | | - $wgHooks['ArticleSaveComplete'][] = 'articleSaveGeo'; |
54 | | - $wgHooks['ArticleDelete'][] = 'articleDeleteGeo'; |
| 52 | +function wfGeoSetHook( $parser ) { |
| 53 | + $parser->setHook( 'geo', 'parseGeo' ); |
| 54 | + return true; |
55 | 55 | } |
56 | 56 | |
57 | 57 | $wgExtensionCredits['specialpage'][] = array( |
Index: trunk/extensions/EmailAddressImage/EmailAddressImage.php |
— | — | @@ -22,15 +22,10 @@ |
23 | 23 | ); |
24 | 24 | |
25 | 25 | $wgExtensionMessagesFiles['AdvancedRandom'] = dirname(__FILE__) . '/EmailAddressImage.i18n.php'; |
26 | | -$wgExtensionFunctions[] = 'emailAddressImage'; |
| 26 | +$wgHooks['ParserFirstCallInit'][] = 'emailAddressImage'; |
27 | 27 | |
28 | | -# Sets the hook to be executed once the parser has stripped HTML tags. |
29 | | -$wgHooks['ParserAfterStrip'][] = 'emailAddressImage'; |
30 | | - |
31 | | -function emailAddressImage() { |
32 | | - global $wgParser; |
33 | | - |
34 | | - $wgParser->setHook( 'email', 'doAddressImage' ); |
| 28 | +function emailAddressImage( $parser ) { |
| 29 | + $parser->setHook( 'email', 'doAddressImage' ); |
35 | 30 | return true; |
36 | 31 | } |
37 | 32 | |
Index: trunk/extensions/Gnuplot/Gnuplot.php |
— | — | @@ -32,11 +32,11 @@ |
33 | 33 | $wgGnuplotDefaultTerminal = 'set terminal png'; |
34 | 34 | $wgGnuplotDefaultSize = 'set size 0.5,0.5'; |
35 | 35 | |
36 | | -$wgExtensionFunctions[] = "wfGnuplotExtension"; |
| 36 | +$wgHooks['ParserFirstCallInit'][] = 'wfGnuplotSetHook'; |
37 | 37 | |
38 | | -function wfGnuplotExtension() { |
39 | | - global $wgParser; |
40 | | - $wgParser->setHook( "gnuplot", "renderGnuplot" ); |
| 38 | +function wfGnuplotSetHook( $parser ) { |
| 39 | + $parser->setHook( "gnuplot", "renderGnuplot" ); |
| 40 | + return true; |
41 | 41 | } |
42 | 42 | |
43 | 43 | function renderGnuplot( $gnuplotsrc ) { |
Index: trunk/extensions/geoserver/geoserver.php |
— | — | @@ -13,17 +13,17 @@ |
14 | 14 | 'description' => 'Allows geotagging using the <nowiki><geo></nowiki> tag. Saves geodata in a WFS-T server, e.g. geoserver.', |
15 | 15 | ); |
16 | 16 | |
17 | | -$wgExtensionFunctions[] = "wfGeoserverExtension"; |
| 17 | +$wgHooks['ParserFirstCallInit'][] = 'wfGeoserverSetHook'; |
| 18 | +$wgHooks['ArticleSaveComplete'][] = 'articleDeleteGeo'; |
| 19 | +$wgHooks['ArticleDelete'][] = 'articleDeleteGeo'; |
| 20 | +$wgHooks['ArticleEditUpdatesDeleteFromRecentchanges'][] = 'articleSaveGeo'; |
18 | 21 | |
19 | 22 | /** |
20 | 23 | * Installer |
21 | 24 | */ |
22 | | -function wfGeoServerExtension () { |
23 | | - global $wgParser, $wgHooks ; |
24 | | - $wgParser->setTransparentTagHook ( 'geo' , 'parseGeo' ) ; |
25 | | -# $wgHooks['ArticleSaveComplete'][] = 'articleDeleteGeo'; |
26 | | - $wgHooks['ArticleDelete'][] = 'articleDeleteGeo'; |
27 | | - $wgHooks['ArticleEditUpdatesDeleteFromRecentchanges'][] = 'articleSaveGeo'; |
| 25 | +function wfGeoserverSetHook( $parser ) { |
| 26 | + $parser->setTransparentTagHook( 'geo', 'parseGeo' ); |
| 27 | + return true; |
28 | 28 | } |
29 | 29 | |
30 | 30 | global $wgAutoloadClasses; |
Index: trunk/extensions/FootNote/Footnote.php |
— | — | @@ -41,12 +41,12 @@ |
42 | 42 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Footnote', |
43 | 43 | ); |
44 | 44 | |
45 | | -$wgExtensionFunctions[] = "wfFootnote"; |
| 45 | +$wgHooks['ParserBeforeTidy'][] = 'insert_endnotes'; |
| 46 | +$wgHooks['ParserFirstCallInit'][] = "wfFootnoteSetHook"; |
46 | 47 | |
47 | | -function wfFootnote() { |
48 | | - global $wgParser, $wgHooks ; |
49 | | - $wgParser->setHook( "footnote" , 'parse_footnote' ) ; |
50 | | - $wgHooks['ParserBeforeTidy'][] = 'insert_endnotes' ; |
| 48 | +function wfFootnoteSetHook( $parser ) { |
| 49 | + $parser->setHook( 'footnote', 'parse_footnote' ); |
| 50 | + return true; |
51 | 51 | } |
52 | 52 | |
53 | 53 | $footnoteNotes = array() ; |