mirror of
https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue.git
synced 2024-11-30 11:06:36 +00:00
7f75899995
* refactor: Apply some code cleanup * feat: WIP dynamic nested tabber in codex * feat: Make deeply nested tabbers work * doc: fix comment position --------- Co-authored-by: alistair3149 <alistair3149@users.noreply.github.com>
33 lines
832 B
PHP
33 lines
832 B
PHP
<?php
|
|
|
|
declare( strict_types=1 );
|
|
|
|
namespace MediaWiki\Extension\TabberNeue;
|
|
|
|
use MediaWiki\Hook\ParserFirstCallInitHook;
|
|
use OutputPage;
|
|
use Parser;
|
|
use Skin;
|
|
|
|
class Hooks implements ParserFirstCallInitHook {
|
|
/**
|
|
* @see https://www.mediawiki.org/wiki/Extension:MobileFrontend/BeforePageDisplayMobile
|
|
*
|
|
* @param OutputPage $out
|
|
* @param Skin $sk
|
|
*/
|
|
public static function onBeforePageDisplayMobile( OutputPage $out, Skin $sk ) {
|
|
$out->addModuleStyles( [ 'ext.tabberNeue.mobile.styles' ] );
|
|
}
|
|
|
|
/**
|
|
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ParserFirstCallInit
|
|
*
|
|
* @param Parser $parser
|
|
*/
|
|
public function onParserFirstCallInit( $parser ): void {
|
|
$parser->setHook( 'tabber', Tabber::class . '::parserHook' );
|
|
$parser->setHook( 'tabbertransclude', TabberTransclude::class . '::parserHook' );
|
|
}
|
|
}
|