da_r_get_comments_by_reaction
Location:
DaReactions\Data::getCommentsByReaction
Filters the result of retrieving comments for a specific reaction.
Parameters:
$result
(array): The comments data.$reaction_id
(int|string): The ID of the reaction.$limit
(int): The maximum number of results.
Example:
add_filter('da_r_get_comments_by_reaction', function($result, $reaction_id, $limit) { return array_slice($result, 0, $limit); // Limit the number of comments. }, 10, 3);
Use Case:
Paginate or filter comments based on reaction.