This filter can be used for changing the arguments passed to wp_list_comments() function.
Parameters
$args (type: array) – the arguments passed to the wp_list_comments() function. Starting from 7.6.67 this includes current_user_ip
Usage
add_filter("wpdiscuz_comment_list_args", function ($args) {
$args["reverse_top_level"] = true;
// Stop guest vote highlighting without disabling voting itself.
$args["current_user_ip"] = "";
return $args;
});
Note
The new current_user_ip argument. It holds the current guest’s filtered IP address and is used for two things: deciding whether the visitor is looking at their own comment’s vote controls, and looking up that guest’s existing votes so they can be highlighted.
It is an empty string for logged-in users and whenever the Show Voting Buttons setting is disabled. An add-on or theme that builds its own comment list arguments must pass it through, or vote highlighting and read-only detection degrade silently instead of raising an error.
Changelog
Since 7.0.0 version
Starting from the 7.6.67 version added the current_user_ip argument.
