Skip to content

Commit

Permalink
add documentation to log data filter
Browse files Browse the repository at this point in the history
  • Loading branch information
tharsheblows committed Aug 19, 2024
1 parent 319feb8 commit 836ece2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions classes/class-connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ public function action_links( $links, $record ) {
public function log( $message, $args, $object_id, $context, $action, $user_id = null ) {
$connector = $this->name;

/**
* Override the data logged. Returning false to this filter will stop the data from being logged.
* Examples of this filter in use can be found in some of the custom connectors.
*
* @return array|false An array of the data to be logged or false if it should not be logged.
*/
$data = apply_filters(
'wp_stream_log_data',
compact( 'connector', 'message', 'args', 'object_id', 'context', 'action', 'user_id' )
Expand Down

0 comments on commit 836ece2

Please sign in to comment.