* Upgrade jQuery Cookie to v1.2.0.
* (bug 20476) Add a "viewsuppressed" user right to be able to view
suppressed content but not suppress it ("suppressrevision" right).
+* Added a new hook, "OutputPageScriptsForBottomQueue", to add modules to the
+ bottom queue that should be requested in a dedicated <script> request.
=== Bug fixes in 1.24 ===
* (bug 49116) Footer copyright notice is now always displayed in user language
$links: array, intended to hold the result. Must be an associative array with
category types as keys and arrays of HTML links as values.
+'OutputPageScriptsForBottomQueue': Allows adding modules to the bottom queue
+that should be requested in a dedicated <script> request. In most cases you'll
+want to use OutputPage::addModules instead (from another hook) which allows
+ResourceLoader to better combine requests and allows the module load requests
+to be cached better. Typically you'd only use this for user-specific modules.
+$out: OutputPage instance
+&$modules: Array of modules names to add to the bottom queue
+
'PageContentInsertComplete': After a new article is created.
$wikiPage: WikiPage created
$user: User creating the article
// Startup - this will immediately load jquery and mediawiki modules
$links = array();
- $links[] = $this->makeResourceLoaderLink( 'startup', ResourceLoaderModule::TYPE_SCRIPTS, true );
+ $links[] = $this->makeResourceLoaderLink( 'startup', ResourceLoaderModule::TYPE_SCRIPTS, /* $useESI = */ true );
// Load config before anything else
$links[] = Html::inlineScript(
/* $useESI = */ false, /* $extraQuery = */ array(), /* $loadCall = */ $inHead
);
+ $modules = array();
+ wfRunHooks( 'OutputPageScriptsForBottomQueue', array( $this, &$modules ) );
+ if ( $modules ) {
+ $links[] = $this->makeResourceLoaderLink( $modules, ResourceLoaderModule::TYPE_COMBINED,
+ /* $useESI = */ false, /* $extraQuery = */ array(), /* $loadCall = */ $inHead
+ );
+ }
+
return self::getHtmlFromLoaderLinks( $links );
}