wpDiscuz 7 API Documentation

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

wpdiscuz_comments_order_by

This hook is used to filter which field will be made for the sorting

Changelog

Added in version 7.0.3

Parameters

1. $orderBy (type: string) – the default field for the sorting

Usage

add_filter("wpdiscuz_comments_order_by", function ($orderBy) {
    return "comment_date";
});

Was this article helpful to you? Yes No