[wp-hackers] Adding Filters

Russ Gilbert russgilbert at gmail.com
Sat Nov 21 02:42:50 UTC 2009


Newbie mistake, I misinterpreted "the_content" in there. - thanks!

-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Andrew Nacin
Sent: Friday, November 20, 2009 6:42 PM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Adding Filters

>
> add_filter ('get_post_custom_values', 'anti_email_spam', 16);
>

You should read through the Plugin API in the Codex:
http://codex.wordpress.org/Plugin_API.

You don't add a filter to a function; you add it to an API hook that is
built into the WordPress core. the_content() happens to be a function, but
it is also the name of a hook that filters the content returned by that
function, and that's what you're applying the filter to. (
http://adambrown.info/p/wp_hooks/hook/the_content?version=2.8&file=wp-includ
es/post-template.php--
it also is a filter in a few other spots.)
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list