Skip to content

Commit

Permalink
Feature: add log source filter (#7386)
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubersilva authored May 31, 2024
1 parent a3b8cd1 commit f843046
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/API/Endpoints/Logs/GetLogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ public function getSchema()
}

/**
* @unreleased Add 'givewp_log_source_view' filter
*
* @param WP_REST_Request $request
*
* @return WP_REST_Response
Expand All @@ -157,7 +159,8 @@ public function handleRequest(WP_REST_Request $request)
'id' => $log->getId(),
'log_type' => $log->getType(),
'category' => $log->getCategory(),
'source' => $log->getSource(),
'source' => apply_filters('givewp_log_source_view', $log->getSource(), $log->getContext(),
$log->getId()),
'message' => $log->getMessage(),
'context' => $log->getContext(),
'date' => $log->getDate(),
Expand Down

0 comments on commit f843046

Please sign in to comment.