[wp-hackers] Hooks, Actions, Filters
Otto
otto at ottodestruct.com
Thu Jul 30 13:32:56 UTC 2009
On Thu, Jul 30, 2009 at 12:50 AM, Bruno Alexandre<bruno.in.dk at gmail.com> wrote:
> where and how do I know what to expect from that? And what about if I was
> expecting $id (page id)... I don't get where this variable appears from thin
> air :-(
If you look deep enough in the WordPress code, you'll find this line:
$protected_title_format = apply_filters('protected_title_format',
__('Protected: %s'));
That call to apply_filters is what links the internals of WordPress to
your filter function. This bit in particular is what you're wanting:
__('Protected: %s')
That is what gets passed into your function as the first parameter. In
this case, it's a translatable string.
-Otto
Sent from Memphis, TN, United States
More information about the wp-hackers
mailing list