wpDiscuz 7 API Documentation

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

wpdiscuz_comments_args

This hook can be used to control the default arguments passed to the get_comments() function.

Changelog

Since 7.0.0 version

Parameters

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

Usage

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

Was this article helpful to you? Yes No