function wpt_facebook_comment_tweet($id, $comment) { $approved = $comment->comment_approved; $url = $comment->comment_author_url; if ($approved == 1 && strpos($url, '//www.facebook.com') !== false) { wpt_set_comment_tweet($id, 1); } }
function wpt_disqus_comment_tweet($id, $comment) { $approved = $comment->comment_approved; $agent = $comment->comment_agent; if ($approved == 1 && strpos($agent, 'Disqus') !== false) { wpt_set_comment_tweet($id, 1); } }