Help with add_filter for wp_filter_comment()
-
Hi Guys, I am currently having problems trying to influence the wp_filter_comment() function. I want my plugin to intercept the post comment function to change some values.
I currently have this in my plugin file:
function mod_filter_comment($commentdata) { $commentdata['comment_content'] = 'HIA'; return $commentdata; } add_filter('wp_filter_comment', 'mod_filter_comment');
When a new comment is submitted it is passed through the wp_filter_comment() function, but it seems no matter what I put into mod_filter_comment() it doesn’t change the final comment output.
The wp_filter_comment() is called from wp_new_comment() in wp-includes/comment.php – line 391.
Any help would be very much appreciated.
Thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Help with add_filter for wp_filter_comment()’ is closed to new replies.