Skip to content

Instantly share code, notes, and snippets.

@asharirfan
Created September 11, 2019 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asharirfan/26a28d4e07759e02625ca44c1a72a0de to your computer and use it in GitHub Desktop.
Save asharirfan/26a28d4e07759e02625ca44c1a72a0de to your computer and use it in GitHub Desktop.
Template for a new sensor for WP Security Audit Log (WordPress) plugin.
<?php
/**
* Sample sensor.
*
* @package wsal
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Sample sensor class.
*/
class WSAL_Sensors_SampleSensor extends WSAL_AbstractSensor {
/**
* Listening to events using WP hooks.
*/
public function HookEvents() {
// Add action or filter hooks over here to detect events.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment