Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation to wp_stream_log_data filter #1559

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
*
marcinkrzeminski marked this conversation as resolved.
Show resolved Hide resolved
* @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
Loading