Notifications
Clear all
wpDiscuz
7
Posts
2
Users
0
Reactions
1,156
Views
Topic starter
04/05/2020 7:46 pm
Hello,
is there a way to add the name of the author when sharing a comment?
I imagine this is done in class.WpdiscuzHelper.php but I can crack it to work.
Thank you,
Angelo
05/05/2020 12:56 pm
Hi @angelochiacchio,
Please try the following code:
add_filter('wpdiscuz_comment_end', function ($commentOutput, $comment){
$commentOutput = preg_replace('~(<a class="wc_tw"[^>]+href=[\'\"]+[^\'\"]+)(&url[^\'\"]+[\'\"]+)~is', '$1' . urlencode(' author:' . $comment->comment_author) . '$2', $commentOutput);
return $commentOutput;
}, 10, 2);
Put the code in the active theme functions.php file.
Topic starter
05/05/2020 1:17 pm
Thanks guys. Works great.
One last thing. If I tweet the comment I get a ’ instead of a simple '. Is thi sa common issue?
05/05/2020 3:45 pm
Could you please provide us the twitter link where you see such an issue?
Topic starter
05/05/2020 4:33 pm
Ok. Looking forward then 🙂