[wp-hackers] Missing actions in wp-comments-post.php

Justin Sheckler sheckler at nytimes.com
Mon Aug 28 14:59:27 GMT 2006


Hi everyone

My employer is asking me to write a plugin that substantially alters the
way WP serves pages.  I need a reliable way to handle errors in the
comments posting process.  If you open up wp-comments-post.php, you'll
see a handy do_action() call just before every die(); great... until you
get down to line 34 or so, where suddenly the action calls stop, and the
script is dying w/out any chance to intercept the error condition.

Is there any compelling reason why I shouldn't just add extra
do_action() calls for these cases and submit the patch back to Trac?  I
have been trying to do everything through the plugin call exclusively,
but in this case I don't think I can avoid patching core.  The
conditions I'm trying to trap are a missing name/email address or an
invalid email address.  Or is there some subtlety here that I'm missing?

Thanks
-JKS

-- 
// Justin Kerr Sheckler
// Application Developer
// New York Times digital
// 646-698-8070
// sheckler at nytimes.com



More information about the wp-hackers mailing list