mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-12-12 16:25:14 +00:00
92bc1f3d2f
Changes to the use statements done automatically via script Addition of missing use statements done manually Change-Id: Id44f211320e56bc83e4c8f243369dc4eb562cf37
27 lines
609 B
PHP
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',
|
|
];
|
|
}
|
|
}
|