mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-30 10:25:00 +00:00
Merge "Allow Cite to define the reference preview module instead"
This commit is contained in:
commit
15cf983fdb
|
@ -67,11 +67,17 @@ class PopupsHooks implements
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function getCustomPopupTypes(): array {
|
public static function getCustomPopupTypes(): array {
|
||||||
|
$rl = MediaWikiServices::getInstance()->getService( 'ResourceLoader' );
|
||||||
|
// FIXME: If the module ext.cite.referencePreviews does not exist register reference previews.
|
||||||
|
// This code can be removed once T355194 is complete.
|
||||||
|
$others = $rl->getModule( 'ext.cite.referencePreviews' ) ?
|
||||||
|
[] : [
|
||||||
|
'ext.popups.referencePreviews'
|
||||||
|
];
|
||||||
|
|
||||||
return array_merge( ExtensionRegistry::getInstance()->getAttribute(
|
return array_merge( ExtensionRegistry::getInstance()->getAttribute(
|
||||||
'PopupsPluginModules'
|
'PopupsPluginModules'
|
||||||
), [
|
), $others );
|
||||||
'ext.popups.referencePreviews'
|
|
||||||
] );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue