blob: 79376bb059d6a744fe4596513b55a232f8d3a178 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<?php
/*
* NoTitle
* Adds a magic word that hides the main title heading in a page
*
* @file NoTitle.body.php
* @author Tony Boyles
*/
if ( !defined( 'MEDIAWIKI' ) ) {
die( 'This file is an extension to the <a href="http://www.mediawiki.org/">MediaWiki platform</a> and cannot be used standalone.' );
}
class NoTitle {
public static function killTitle( &$parser, &$text ) {
global $wgOut;
$mw = MagicWord::get( 'MAG_NOTITLE' );
if ( $mw->matchAndRemove( $text ) ) {
$wgOut->addInlineStyle( '.contentHeader, .firstHeading, .subtitle, #siteSub, #contentSub, .pagetitle { display: none; }' );
}
return true;
}
}
|