[wp-testers] apply_filters()
Karl Wångstedt
maillist at wangstedt.net
Wed May 27 05:28:32 GMT 2009
26 maj 2009 kl. 22.28 skrev Jennifer Hodgdon:
> The function the_excerpt echos its output. Your function doesn't.
> Just calling your KEW_short_excerpt function will not cause its
> output to be printed/echoed anywhere.
Yes, I am aware of that. If I want i to output I use echo
KEW_short_excerpt();. But that's not the thing. The thing is that the
filter gets applied if I use echo inside the function, or if I use
echo apply_filters('_theme_short_excerpt', KEW_short_excerpt()); in
the theme with the filter targeting _theme_short_excerpt.
But if I use return apply_filters('_short_excerpt',$text); in the
function and echo KEW_short_excerpt(); in the theme, the filter does
not get applied.
Karl Wångstedt
----------------------------------
Wångstedt nova
www.wangstedt.net
Karl Wångstedt 0278-61 12 33
Stenhuggarvägen 3g 070-578 13 04
821 41 BOLLNÄS
----------------------------------
Det här brevet skickades med en Macintosh från Apple.
Garanterat virusfri med Mac OS X.
More information about the wp-testers
mailing list