wpDiscuz 7 API Documentation

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

wpdiscuz_js_options

This filter can be used for making some changes in the options array that should be returned to the JS.

Changelog

Since 7.0.0 version

Parameters

1. $wpdiscuzOptionsJs (type: array) – the array of the options that should be returned to the JS
2. $options (type: WpdiscuzOptions object) – the wpdiscuz options

Usage

add_filter("wpdiscuz_js_options", function ($wpdiscuzOptionsJs, $options) {
    $wpdiscuzOptionsJs["myOption"] = "myValue";
    return $wpdiscuzOptionsJs;
}, 10, 2);

Was this article helpful to you? Yes No