mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 15:16:50 +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
|
||||
*/
|
||||
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(
|
||||
'PopupsPluginModules'
|
||||
), [
|
||||
'ext.popups.referencePreviews'
|
||||
] );
|
||||
), $others );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue