Manual:Hooks/LocalFilePurgeThumbnails

LocalFilePurgeThumbnails
Available from version 1.19.0
Called before thumbnails for a local file a purged.
Define function:
public static function onLocalFilePurgeThumbnails( $file, $archiveName ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"LocalFilePurgeThumbnails": "MyExtensionHooks::onLocalFilePurgeThumbnails"
	}
}
Called from:File(s): LocalFile.php
Interface:LocalFilePurgeThumbnailsHook.php

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

DetailsEdit

  • $file: the File object
  • $archiveName: name of an old file version or false if it's the current one

See alsoEdit