Jump to navigation Jump to search
Available from version 1.22.0
Called when checking if an IP address can use HTTPS
Define function:
public static function onCanIPUseHTTPS( $ip, &$canDo ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"CanIPUseHTTPS": "MyExtensionHooks::onCanIPUseHTTPS"

For MediaWiki ≤1.25:

$wgHooks['CanIPUseHTTPS'][] = 'MyExtensionHooks::onCanIPUseHTTPS';
Called from:File(s): GlobalFunctions.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:CanIPUseHTTPS extensions.


  • $ip: The IP address in human-readable form
  • &$canDo: This reference should be set to false if the client may not be able to use HTTPS