Extension:Moderation/Hooks/ModerationPending

From Linux Web Expert

Revision as of 23:03, 21 March 2020 by imported>Shirayuki (update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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:
$wgHooks['ModerationPending'][] = 'MyExtensionHooks::onModerationPending';
Called from:File(s): Moderation / lib/ModerationNewChange.php
Function(s): queue

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

Details

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.