[wp-hackers] Plugins interfering on comment_post action?

Ryan Boren ryan at boren.nu
Wed Nov 17 08:25:04 UTC 2004


On Wed, 2004-11-17 at 09:12 +0100, Skybly wrote:
> Is there some reason why add_action wouldn't pass the comment id if it
> is executed a second time? Or am I just doing something wrong? Any
> suggestions?

A plugin's action hook must return the comment ID so that it can be
passed to the next plugin in the chain.  If it is not returned, the next
plugin will be given an empty comment ID.  This is because actions and
filters share the same implementation in WP.  The IDs passed to actions
are treated like text to be filtered and then passed along.  Perhaps
it's time to separate the two and not require actions to return the ID.

Anyway, make sure all activated comment plugins are returning the
comment ID.

Ryan




More information about the hackers mailing list