mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-12-23 21:32:49 +00:00
106a63e3b4
Bug: T378207 Change-Id: I62b7a418be4cb3a4a51937ae331a4aad22dc5732
27 lines
606 B
PHP
27 lines
606 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' => $config->get( 'HCaptchaApiUrl' )
|
|
];
|
|
}
|
|
}
|