wpDiscuz 7 API Documentation

  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentation
  4. Filters
  5. wpdiscuz_content_modal_content
Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages

wpdiscuz_content_modal_content

This filter can be used to display the content of the newly added tab in “My Content and Settings”.

Changelog

since 7.0.0 version

Parameters

1. $html (type: string) – the content of the newly added tab in “My Content and Settings”
2. $currentUser (type: WP_User object) – the user object that is logged in at the current time
3. $isFirstTab (type: bool) – if it is a first tab or not. If it’s the first tab, it immediately displays the content, if not, the content is not being displayed.

Usage

add_filter("wpdiscuz_content_modal_content", function ($html, $currentUser, $isFirstTab) {
    if (!empty($currentUser->ID)) {
        $html .= "
"; if ($isFirstTab) { $html .= "
Custom Tab Content
"; } $html .= "
"; } return $html; }, 10, 3);

Was this article helpful to you? Yes No