List of hooks in the WP Security Audit Log plugin

You are here:
Back

Hooks in the WP Security Audit Log plugin allow you to hook into the plugin’s functionality to modify it’s behaviour. This article contains a list of hooks and parameters found in the WP Security Audit Log plugin.

Index of Hooks:

wsal_auditlog_row_user_data

Function

This filter hook runs before displaying the user data of an event on the audit log view. It can be used to filter the user data of each event being displayed on the audit log view.

Parameters

  • $row_user_data – User data to display in the audit log row
  • $event_db_id – Event database ID

Example Code

wsal_event_data_before_log

Function

This filter hook runs before saving an event in the audit log database. It can be used to filter the event data of a filter and take action accordingly.

Parameters

  • $event_id – Event ID
  • $event_data – Array of event data

Example Code

wsal_event_id_before_log

Function

This filter hook runs before saving an event in the audit log database. It can be used to detect event ids and take the required action.

Parameters

  • $event_id – Event ID
  • $event_data – Array of event data

Example Code

wsal_post_meta_updated

Function

This hook runs before the logging of post meta update events, such as event ID 2062 and 2054 (refer to the complete list of WordPress activity log event IDs for more details). This hook can be used to log events of updated post meta from the front-end, since the plugin only keeps a log of post meta updates done via the WordPress admin pages.

Parameters

  • $meta_id – Unique ID of the meta data.
  • $object_id – Post ID to which the meta data belongs to.
  • $old_meta – Array of the meta data containing key & values of old meta data before it is updated.
  • $meta_key – Key of the meta data being updated.
  • $meta_value – Value of the meta data being updated.

Example Code

A general example code which shows how to log a meta data updated event in the WP Security Audit Log plugin.