Explicitly define filepage module position
authorGilles Dubuc <gdubuc@wikimedia.org>
Tue, 26 May 2015 10:11:35 +0000 (12:11 +0200)
committerGilles Dubuc <gdubuc@wikimedia.org>
Tue, 26 May 2015 10:11:35 +0000 (12:11 +0200)
Style modules currently added through addModuleStyles default
to being in the head ("top" position). This is an unhealthy default,
since only critical styles that are needed at pageload should be
in the head. In order to be able to switch the default to "bottom",
existing module positions have to be defined explicitly.

Bug: T97410
Change-Id: Id98b9eb46ef56a43bae99830f7db554c90073407

resources/Resources.php

index b0cd932..355502a 100644 (file)
@@ -39,6 +39,7 @@ return array(
                'group' => 'noscript',
        ),
        'filepage' => array(
+               'position' => 'top',
                'class' => 'ResourceLoaderWikiModule',
                'styles' => array( 'MediaWiki:Filepage.css' ),
        ),