mediawiki-extensions-Confir.../includes/hCaptcha/Hooks/ResourceLoaderHooks.php
Reedy 9f2e976f10 Attempt to flatten out PHP files in sub extensions
In an attempt to be able to have easier code coverage...

Bug: T377750
Change-Id: I556f5f2753fae77df4f34b64bccdb7d68f2825b0
2024-10-30 01:48:14 +00:00

27 lines
609 B
PHP

<?php
declare( strict_types=1 );
namespace MediaWiki\Extension\ConfirmEdit\hCaptcha\Hooks;
use MediaWiki\Config\Config;
use MediaWiki\ResourceLoader as RL;
class ResourceLoaderHooks {
/**
* Passes config variables to ext.confirmEdit.hCaptcha.visualEditor ResourceLoader module.
* @param RL\Context $context
* @param Config $config
* @return array
*/
public static function getHCaptchaResourceLoaderConfig(
RL\Context $context,
Config $config
) {
return [
'hCaptchaSiteKey' => $config->get( 'HCaptchaSiteKey' ),
'hCaptchaScriptURL' => 'https://js.hcaptcha.com/1/api.js',
];
}
}