Manual:Hooks/wfShellWikiCmd

From Linux Web Expert

wfShellWikiCmd
<translate> Available from <tvar name=1><translate> version <tvar (r97954, codereview)</tvar></translate>
Called when generating a shell-escaped command line string to run a cli script.
<translate> Define function:</translate>
public static function onwfShellWikiCmd( &$script, &$parameters, &$options ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"wfShellWikiCmd": "MediaWiki\\Extension\\MyExtension\\Hooks::onwfShellWikiCmd"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> GlobalFunctions.php
<translate> Interface:</translate> wfShellWikiCmdHook.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:wfShellWikiCmd extensions</tvar>.</translate>


File:OOjs UI icon notice-destructive.svg <translate> Warning:</translate> in 1.19 this hook was named wfShellMaintenanceCmd.

Details

  • &$script: MediaWiki cli script path
  • &$parameters: Array of arguments and options to the script
  • &$options: Associative array of options, may contain the 'php' and 'wrapper' keys