Merge "Allow Cite to define the reference preview module instead"

This commit is contained in:
jenkins-bot 2024-02-08 16:09:02 +00:00 committed by Gerrit Code Review
commit 15cf983fdb

View file

@ -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 );
}
/**