diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index 2b1dba354f4..22520d3a576 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -57,6 +57,7 @@ production. * $wgProfileOnly is now deprecated; set the log file in $wgDebugLogGroups['profileoutput'] to replace it. * $wgMaxBacklinksInvalidate was removed; use $wgJobBackoffThrottling instead +* Deprecated ResourceLoaderGetStartupModules hook. === New features in 1.23 === * ResourceLoader can utilize the Web Storage API to cache modules client-side. diff --git a/docs/hooks.txt b/docs/hooks.txt index de4bc3b1e69..80f388bd901 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2096,7 +2096,7 @@ configuration variables to JavaScript. Things that depend on the current page or request state must be added through MakeGlobalVariablesScript instead. &$vars: array( variable name => value ) -'ResourceLoaderGetStartupModules': Run once the startup module is being +'ResourceLoaderGetStartupModules': DEPRECATED. Run once the startup module is being generated. This allows you to add modules to the startup module. This hook should be used sparingly since any module added here will be loaded on all pages. This hook is useful if you want to make code available to module loader diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 005081ce8b0..5ff88d86333 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -238,7 +238,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { public static function getStartupModulesUrl( ResourceLoaderContext $context ) { // The core modules: $moduleNames = array( 'jquery', 'mediawiki' ); - wfRunHooks( 'ResourceLoaderGetStartupModules', array( &$moduleNames ) ); + wfRunHooks( 'ResourceLoaderGetStartupModules', array( &$moduleNames ), '1.23' ); // Get the latest version $loader = $context->getResourceLoader();