-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathWikiTwidget.php
More file actions
35 lines (27 loc) · 910 Bytes
/
WikiTwidget.php
File metadata and controls
35 lines (27 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/*
introductory material...
*/
if ( ! defined( 'MEDIAWIKI' ) ) die();
# Credits
$wgExtensionCredits['parserhook']['WikiTwidget'] = array(
'name'=>'WikiTwidget',
'author'=>'Amelia Ireland',
'descriptionmsg'=>'wikitwidget-desc',
'version'=>'0.3.2',
'url' => 'https://www.mediawiki.org/wiki/Extension:WikiTwidget',
);
$wgAutoloadClasses['WikiTwidget'] = __DIR__ . "/WikiTwidget.body.php";
$wgMessagesDirs['WikiTwidget'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['WikiTwidget'] = __DIR__ . '/WikiTwidget.i18n.php';
$wgResourceModules['ext.WikiTwidget'] = array(
'localBasePath' => __DIR__,
'remoteExtPath' => 'WikiTwidget',
'scripts' => 'ext.wikitwidget.js'
);
$wgHooks['ParserFirstCallInit'][] = 'wfWikiTwidgetSetup';
function wfWikiTwidgetSetup( Parser $parser ) {
$mm = new WikiTwidget;
$parser->setHook( 'wikitwidget', array($mm, 'createWidget') );
return true;
}