mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
Merge "Cleanup: Remove non-functional hook"
This commit is contained in:
commit
cdfd8d2f37
|
@ -24,8 +24,7 @@
|
|||
"GetPreferences": "PopupsHooks",
|
||||
"UserGetDefaultOptions": "PopupsHooks",
|
||||
"MakeGlobalVariablesScript": "PopupsHooks",
|
||||
"LocalUserCreated": "PopupsHooks",
|
||||
"ResourceLoaderRegisterModules": "PopupsHooks"
|
||||
"LocalUserCreated": "PopupsHooks"
|
||||
},
|
||||
"HookHandlers": {
|
||||
"PopupsHooks": {
|
||||
|
|
|
@ -28,8 +28,6 @@ use MediaWiki\Hook\MakeGlobalVariablesScriptHook;
|
|||
use MediaWiki\MediaWikiServices;
|
||||
use MediaWiki\Preferences\Hook\GetPreferencesHook;
|
||||
use MediaWiki\ResourceLoader\Hook\ResourceLoaderGetConfigVarsHook;
|
||||
use MediaWiki\ResourceLoader\Hook\ResourceLoaderRegisterModulesHook;
|
||||
use MediaWiki\ResourceLoader\ResourceLoader;
|
||||
use MediaWiki\User\Hook\UserGetDefaultOptionsHook;
|
||||
use MediaWiki\User\Options\UserOptionsManager;
|
||||
use OutputPage;
|
||||
|
@ -45,7 +43,6 @@ class PopupsHooks implements
|
|||
GetPreferencesHook,
|
||||
BeforePageDisplayHook,
|
||||
ResourceLoaderGetConfigVarsHook,
|
||||
ResourceLoaderRegisterModulesHook,
|
||||
MakeGlobalVariablesScriptHook,
|
||||
UserGetDefaultOptionsHook,
|
||||
LocalUserCreatedHook
|
||||
|
@ -283,26 +280,4 @@ class PopupsHooks implements
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ResourceLoaderRegisterModules hook handler.
|
||||
*
|
||||
* Provides support for MLEB where needed.
|
||||
*
|
||||
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderRegisterModules
|
||||
*
|
||||
* @param ResourceLoader $resourceLoader
|
||||
*/
|
||||
public function onResourceLoaderRegisterModules( ResourceLoader $resourceLoader ): void {
|
||||
if ( !$resourceLoader->getModule( 'codex-search-styles' ) ) {
|
||||
// We're running an older version of MediaWiki.
|
||||
$resourceLoader->register( [
|
||||
'codex-search-styles' => [
|
||||
'localBasePath' => dirname( __DIR__ ),
|
||||
'remoteExtPath' => 'UniversalLanguageSelector',
|
||||
'styles' => 'resources/codex.mleb.css',
|
||||
]
|
||||
] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue