Manual:Hooks/BadImage

BadImage
Available from version 1.7.0
Used to determine if an image exists on the 'bad image list'. Return false to when setting $bad value.
Define function:
public static function onBadImage( $name, &$bad ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"BadImage": "MediaWiki\\Extension\\MyExtension\\Hooks::onBadImage"
	}
}
Called from: File(s): GlobalFunctions.php
Interface: BadImageHook.php

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

Details

edit

Defined in ImageFunctions.php

  • $bad: true = image is on bad image list.
  • $name: String
  • return: false = evaluate bad image list, true = use $bad