ProtectedContactPage/includes/ContactPageHooks.php

13 lines
347 B
PHP

<?php
class ContactPageHooks
{
public static function onBeforePageDisplay(OutputPage $out, Skin $skin)
{
// Only inject the recaptcha script on Special:Contact
if ($skin->getRelevantTitle()->prefixedText == "Special:Contact") {
$out->addScriptFile('https://www.google.com/recaptcha/api.js');
}
}
}