Extension:Moderation/ModerationPending

From MediaWiki.org
Jump to navigation Jump to search
ModerationPending
Available from version 1.27.0
Called when Extension:Moderation has successfully queued a new edit/upload
Define function:
public static function onModerationPending( array $fields, $id ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ModerationPending": "MyExtensionHooks::onModerationPending"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ModerationPending'][] = 'MyExtensionHooks::onModerationPending';
Called from:File(s): ModerationNewChange.php

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

Details[edit]

This hook is called when Extension:Moderation has successfully saved an intercepted edit into the database.

Parameters:

$fields 
Fields of the newly inserted database row, e.g. [ 'mod_timestamp' => 'something', 'mod_title' => '...', ... ]. See Extension:Moderation/moderation_table for details.
$id 
mod_id of the newly inserted row.