wp_tag_cloud('format=array') does not return array
|Reported by:||andrewflanagan||Owned by:||ryan|
|Severity:||minor||Keywords:||tags, tag cloud, array, has-patch|
wp_tag_cloud('format=array'); will always return "Array" since the array is not returned but it merely attempts to "echo" the array (which in PHP will just output "Array"). I don't think that this is the intended purpose...
I had thought that the purpose of the parameter "format=array" was to get an actual PHP array of all tags. I can get this tag array by using get_terms('post_tag', $args);
I tried to slog through the code a little bit (wp-includes/category-template.php line 310 and on) but it didn't seem to handle the special case of not "echo"ing a result, but merely returning an array object.
Change History (11)
comment:1 andrewflanagan — 6 years ago
- Summary changed from wp_get_tags to wp_tag_cloud('format=array') does not return array