wpDiscuz 7 API Documentation

  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentation
  4. Filters
  5. wpdiscuz_filter_args
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

wpdiscuz_filter_args

The filter can be used to control the parameters passed to the get_comments() function when either the sorting or load more options are enabled.

Changelog

Since 7.0.0 version

Parameters

$args (type: array) – the array of the arguments passed to the get_comments

Usage

add_filter("wpdiscuz_filter_args", function ($args) {
    $args["orderby"] = "comment_date";
    $args["order"] = "asc";
    return $args;
});

Was this article helpful to you? Yes No