[wp-hackers] applying a filter to when a new post is made
Chuck Guenther
chuckg at blindmuse.com
Mon Aug 9 21:08:36 UTC 2004
Amit Gupta wrote:
> Is there a hook or whatever its called so that I can calla custom
> function of a plugin, whenever a new post is madeor an old one is
> edited, before saving the post content to db?
add_action('publish_post', 'functionName', 0);
add_action('edit_post', 'functionName', 0);
Where the functionName is the function you want to happen when
a post is edited or published. I believe you can pass a $id or
$content type value to this to modify the actual content. I'm
not entirely positive, however.
Hope that answers your question, in short. I'm sure others will
have more advanced knowledge if necessary.
chuckg
--
I am what I am not what I thought I am
http://www.blindmuse.com
More information about the hackers
mailing list