mihail1101
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Plugins
In reply to: [Comments - wpDiscuz] Problem with mycred and Wpdiscuz@gvectorssupportmember, It works! Thanks.
Forum: Plugins
In reply to: [Comments - wpDiscuz] Problem with mycred and Wpdiscuz@gvectorssupportmember, [URL moved by moderator to the special URL field above]
- This reply was modified 4 years, 8 months ago by tobifjellner (Tor-Bjorn “Tobi” Fjellner).
Also i have this code, which i need change.
@wpexpertsio, sy, but i don`t have this setting screen like your.
- This reply was modified 4 years, 8 months ago by mihail1101.
resolved by code
add_filter('wpdiscuz_after_label', 'wpdiscuz_mc_after_label_html', 110, 2); function wpdiscuz_mc_after_label_html($afterLabelHtml, $comment) { $wpdiscuz = wpDiscuz(); $userID = $comment->user_id; if (!$userID && $wpdiscuz->optionsSerialized->isUserByEmail) { $user = get_user_by('email', $comment->comment_author_email); if ($user) { $userID = $user->ID; } } if ($userID) { if (function_exists('mycred_get_users_rank')) { //User Rank $rank = mycred_get_users_rank($userID); if (is_object($rank)) { $src = $rank->logo_url; $title = $rank->title; $afterLabelHtml .= "<img src='$src' alt='$title' />"; } else { $afterLabelHtml .= mycred_get_users_rank($userID, 'logo', 'post-thumbnail', array('class' => 'mycred-rank')); } } } return '<div class="wpdiscuz-mycred-rank-wrap">' . $afterLabelHtml . '</div>'; }
Viewing 5 replies - 1 through 5 (of 5 total)