Skip to content

Commit

Permalink
Merge pull request #1559 from xwp/fix/1504-document-log-data-filter
Browse files Browse the repository at this point in the history
Add documentation to wp_stream_log_data filter
  • Loading branch information
marcinkrzeminski authored Oct 4, 2024
2 parents a51ad95 + bbd0f25 commit fd703ce
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions classes/class-connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,13 @@ 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.
* @see Connector_ACF::log_override()
*
* @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 fd703ce

Please sign in to comment.