Manual:Hooks/ManualLogEntryBeforePublish

From MediaWiki.org
Jump to navigation Jump to search
ManualLogEntryBeforePublish
Available from version 1.33.0 (Gerrit change 496257)
Lets extensions tag log entries when actions are performed
Define function:
public static function onManualLogEntryBeforePublish( ManualLogEntry $logEntry ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ManualLogEntryBeforePublish": "MyExtensionHooks::onManualLogEntryBeforePublish"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ManualLogEntryBeforePublish'][] = 'MyExtensionHooks::onManualLogEntryBeforePublish';
Called from:File(s): logging/ManualLogEntry.php
Function(s): publish

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

Details[edit]

  • $logEntry: ManualLogEntry object