mediawiki-extensions-Confir.../hCaptcha/includes/Hooks/ResourceLoaderHooks.php
Umherirrender 92bc1f3d2f Use namespaced classes
Changes to the use statements done automatically via script
Addition of missing use statements done manually

Change-Id: Id44f211320e56bc83e4c8f243369dc4eb562cf37
2023-12-11 00:07:55 +01: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',
];
}
}