Warning: implode() [function.implode]: Invalid arguments passed
It happens when $ret
hasn't been defined. The solution is simple. Right above $tags = get_tags();
, add the following line:
$ret = array();
You can try
echo implode(', ', (array)$ret);
You are getting the error because $ret
is not an array.
To get rid of the error, at the start of your function, define it with this line: $ret = array();
It appears that the get_tags() call is returning nothing, so the foreach is not run, which means that $ret isn't defined.