-
Notifications
You must be signed in to change notification settings - Fork 3
/
HTML5Tags.php
52 lines (41 loc) · 1.32 KB
/
HTML5Tags.php
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/**
* Extension HTML5Tags - llows some extra HTML5 tags in wiki code
* @version 0.1 - 2012/10/27
*
* @link http://www.mediawiki.org/wiki/Extension:HTML5Tags Documentation
*
* @file HTML5Tags.php
* @ingroup Extensions
* @package MediaWiki
* @author Leo Wallentin (Rotsee)
* @license http://www.opensource.org/licenses/BSD-2-Clause BSD
*/
/* Set up extension */
if ( !defined( 'MEDIAWIKI' ) ) {
die( 'Not an entry point.' );
}
if ( version_compare( $wgVersion, '1.18', '<' ) ) {
die( '<b>Error:</b> This version of HTML5Tags requires MediaWiki 1.18 or above.' );
}
define( 'HTML5TAGS_VERSION', '0.1' );
$wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'HTML5 Tags',
'description' => 'html5tags-desc',
'version' => HTML5TAGS_VERSION,
'author' => array( '[http://xn--ssongsmat-v2a.nu Leo Wallentin]', ),
'url' => "http://www.mediawiki.org/wiki/Extension:HTML5Tags",
);
$dir = dirname( __FILE__ ) . '/';
/**
* Message class
*/
$wgExtensionMessagesFiles['HTML5Tags' ] = $dir . 'HTML5Tags.i18n.php';
$wgAutoloadClasses[ 'HTML5Tags' ] = $dir . 'HTML5Tags.body.php';
# Define a setup function
$wgHooks['ParserFirstCallInit'][] = 'wfHTML5TagsParserInit';
function wfHTML5TagsParserInit ( $parser ) {
HTML5Tags::setHooks( $parser );
return true;
}