blob: 233e6ef8636f05d134aab5dee8070f33b32c539e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
class WidgetInitializer {
public static function init() {
// Unsetting required namespace permission rights if using FlaggedRevs
global $wgNamespaceProtection, $wgWidgetsUseFlaggedRevs;
if ( $wgWidgetsUseFlaggedRevs ) {
$wgNamespaceProtection[NS_WIDGET] = [];
}
}
/**
* @param &$parser Parser
* @return bool
*/
public static function initParserFunctions( &$parser ) {
$parser->setFunctionHook( 'widget', 'WidgetRenderer::renderWidget' );
return true;
}
}
|