|
MediaWiki master
|
This is a hook handler interface, see docs/Hooks.md. More...
Inherited by MediaWiki\HookContainer\HookRunner.
Public Member Functions | |
| onImageBeforeProduceHTML ( $unused, &$title, &$file, &$frameParams, &$handlerParams, &$time, &$res, $parser, &$query, &$widthOption) | |
| This hook is called before producing the HTML created by a wiki image insertion. | |
This is a hook handler interface, see docs/Hooks.md.
Use the hook name "ImageBeforeProduceHTML" to register handlers implementing this interface.
Definition at line 16 of file ImageBeforeProduceHTMLHook.php.
| MediaWiki\Hook\ImageBeforeProduceHTMLHook::onImageBeforeProduceHTML | ( | $unused, | |
| & | $title, | ||
| & | $file, | ||
| & | $frameParams, | ||
| & | $handlerParams, | ||
| & | $time, | ||
| & | $res, | ||
| $parser, | |||
| & | $query, | ||
| & | $widthOption ) |
This hook is called before producing the HTML created by a wiki image insertion.
You can skip the default logic entirely by returning false, or just modify a few things using call-by-reference.
| null | $unused | Will always be null |
| Title | &$title | Title object of the image |
| File | false | &$file | File object, or false if it doesn't exist |
| array | &$frameParams | Various parameters with special meanings; see documentation in includes/Linker.php for Linker::makeImageLink |
| array | &$handlerParams | Various parameters with special meanings; see documentation in includes/Linker.php for Linker::makeImageLink |
| string | bool | &$time | Timestamp of file in 'YYYYMMDDHHIISS' string form, or false for current |
| string | &$res | Final HTML output, used if you return false |
| Parser | $parser | |
| string | &$query | Query params for desc URL |
| string | &$widthOption | Used by the parser to remember the user preference thumbnailsize |
Implemented in MediaWiki\HookContainer\HookRunner.