wpDiscuz 7 API Documentation

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

wpdiscuz_phrase

This hook can be used for changing the phrase before displaying.

Changelog

since 7.2.0 version

Parameters

1. $phrase (type: string) – the phrase that should be changed
2. $key (type; string) – the key of the phrase
3. $args (type: array) – custom arguments

Usage

add_filter("wpdiscuz_phrase", function ($phrase, $key, $args) {
    if ($key === "wc_user_settings_subscribed_to_replies") {
        $phrase = str_replace("comment", "reply", $phrase);
    }
    return $phrase;
}, 10, 3);

Was this article helpful to you? Yes No