mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ImageMap
synced 2024-11-15 10:25:09 +00:00
fd1e4575e0
* 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
21 lines
717 B
PHP
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;
|
|
}
|