mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ImageMap
synced 2024-11-28 08:00:16 +00:00
baf4d46b33
Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php with shim. Change-Id: Ibfc3f37d9ea5b8e30e5be4310db1c244d6934951
41 lines
1.1 KiB
PHP
41 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* ImageMap extension - Allows clickable HTML image maps.
|
|
*
|
|
* @link https://www.mediawiki.org/wiki/Extension:ImageMap Documentation
|
|
*
|
|
* @file
|
|
* @ingroup Extensions
|
|
* @package MediaWiki
|
|
* @author Tim Starling
|
|
* @copyright (C) 2007 Tim Starling
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
|
|
*/
|
|
|
|
if ( !defined( 'MEDIAWIKI' ) ) {
|
|
die( 'This file is a MediaWiki extension, it is not a valid entry point' );
|
|
}
|
|
|
|
$dir = __DIR__ . '/';
|
|
$wgMessagesDirs['ImageMap'] = __DIR__ . '/i18n';
|
|
$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' => 'https://www.mediawiki.org/wiki/Extension:ImageMap',
|
|
'descriptionmsg' => 'imagemap_desc',
|
|
);
|
|
|
|
/**
|
|
* @param $parser Parser
|
|
* @return bool
|
|
*/
|
|
function wfSetupImageMap( &$parser ) {
|
|
$parser->setHook( 'imagemap', array( 'ImageMap', 'render' ) );
|
|
return true;
|
|
}
|