This hook can be used for doing some action before the wpDiscuz is being loaded.
Changelog
since 7.0.0 version
Parameters
1. $post (type: WP_Post object) – the current post object
2. $currentUser (type: WP_User object) – the user object that is currently logged in
2. $currentUser (type: WP_User object) – the user object that is currently logged in
Usage
add_action("wpdiscuz_before_load", function ($post, $currentUser, $empty) {
if (!empty($currentUser->ID)) {
$this->init_custom_actions($post);
}
}, 10, 3);