Manual:Hooks/BitmapHandlerCheckImageArea

From Linux Web Expert

Revision as of 06:51, 20 January 2022 by imported>Ciencia Al Poder (Reverted edits by Blocked1976 (talk) to last version by Shirayuki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

BitmapHandlerCheckImageArea
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Called by BitmapHandler::normaliseParams(), after all normalizations have been performed, except for the $wgMaxImageArea check.
<translate> Define function:</translate>
public static function onBitmapHandlerCheckImageArea( $image, &$params, &$checkImageAreaHookResult ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"BitmapHandlerCheckImageArea": "MediaWiki\\Extension\\MyExtension\\Hooks::onBitmapHandlerCheckImageArea"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> media/TransformationalImageHandler.php
<translate> Interface:</translate> BitmapHandlerCheckImageAreaHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:BitmapHandlerCheckImageArea extensions</tvar>.</translate>


Details

  • $image: File
  • &$params: Array of parameters
  • &$checkImageAreaHookResult: null, set to true or false to override the $wgMaxImageArea check result