mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-12-03 12:16:28 +00:00
9f2e976f10
In an attempt to be able to have easier code coverage... Bug: T377750 Change-Id: I556f5f2753fae77df4f34b64bccdb7d68f2825b0
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',
|
|
];
|
|
}
|
|
}
|