[wp-hackers] Problems with shortcode function in plugin
Aaron D. Campbell
aaron at xavisys.com
Mon Dec 29 18:36:12 GMT 2008
You can do something like this:
function whatever($echo=false) {
$output = '';
foreach(){
$output .= "something";
}
if ($echo)
echo $output;
return $output;
}
Ade Walker wrote:
> Aaron,
>
> Thanks for the hint!
>
> Yes, I'm using echo - hence the problem (I've just re-read the Shortcode API
> info on the Codex and found the reference to this).
>
> All I've got to do now is work out how to deal with output which is
> currently echoed during a foreach loop...
>
> Thanks again.
>
> Ade.
>
More information about the wp-hackers
mailing list