summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/NoTitle/NoTitle.php
blob: 6d62fd359f81c125f7383bc0592aaa4776a88b0f (plain)
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
<?php
/*
 *  NoTitle
 *  Adds a magic word that hides the main title heading in a page
 *
 * @file NoTitle.php
 * @author Carlo Cabanilla
 * @author Tony Boyles
 */

if ( !defined( 'MEDIAWIKI' ) ) {
	die( 'This file is an extension to the <a href="https://www.mediawiki.org/">MediaWiki platform</a> and cannot be used standalone.' );
}

# File inclusion and registration:
$wgAutoloadClasses['NoTitle'] = __DIR__ . '/NoTitle.body.php';
$wgMessagesDirs['NoTitle'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['NoTitle'] = __DIR__ . '/NoTitle.i18n.php';
$wgExtensionMessagesFiles['NoTitleMagic'] = __DIR__ . '/NoTitle.i18n.magic.php';

# Hook our events:
$wgHooks['ParserBeforeTidy'][] = 'NoTitle::killTitle';

# Extension Registration:
$wgExtensionCredits['parserhook'][] = array(
	'path'           => __FILE__,
	'name'           => 'NoTitle',
	'version'        => '0.2.0',
	'author'         => array(
		'Carlo Cabanilla',
		'[http://milcord.com/ Tony Boyles, Milcord LLC]'
	),
	'url'            => 'https://www.mediawiki.org/wiki/Extension:NoTitle',
	'descriptionmsg' => 'notitle-desc',
	'license-name'   => 'GPL-3.0+'
);