mediawiki-extensions-ImageMap/ImageMap.php
Chad Horohoe fd1e4575e0 Nuking fallback code for MW < 1.12 in most extensions (there's like 5 or 6 left I haven't done). Couple of points:
* 1.11 and below aren't supported anymore, so we don't need to be maintaining back-compat code for it anymore. This is why we branch extensions
* The vast majority of these were using $wgParser. This defeats the purpose of ParserFirstCallInit...allowing you to use parsers other than $wgParser. All these extensions now work in any instance of the Parser, not just $wgParser
2009-09-04 22:22:12 +00:00

21 lines
717 B
PHP

<?php
$dir = dirname(__FILE__) . '/';
$wgExtensionMessagesFiles['ImageMap'] = $dir . 'ImageMap.i18n.php';
$wgAutoloadClasses['ImageMap'] = $dir . 'ImageMap_body.php';
$wgHooks['ParserFirstCallInit'][] = 'wfSetupImageMap';
$wgExtensionCredits['parserhook']['ImageMap'] = array(
'path' => __FILE__,
'name' => 'ImageMap',
'author' => 'Tim Starling',
'url' => 'http://www.mediawiki.org/wiki/Extension:ImageMap',
'description' => 'Allows client-side clickable image maps using <nowiki><imagemap></nowiki> tag.',
'descriptionmsg' => 'imagemap_desc',
);
function wfSetupImageMap( &$parser ) {
$parser->setHook( 'imagemap', array( 'ImageMap', 'render' ) );
return true;
}