Not widget displays the tag cloud?

Trying to get a widget with my wrapper tags but the function wp_tag_cloud() wants an array to return, I do not understand why. print_r does not output anything else written to check that it works...why the array does not return a function? ...I do not understand?
<?php if(function_exists('wp_tag_cloud')) :?>
 <div class="tags">
 <h4 class="tag_head">Tags Widget</h4>
 <ul class="tags_links">
 <?php $tags = wp_tag_cloud('format=array'); ?>

 <?php print_r($tags);?>

 <?php if(is_array($tags)):?>
 <?php foreach($tags as $tag) :?>
 the <li><a href="#">Kitesurf</a></li>
 <?php endforeach; ?>
 <?php else :?>
 <p>empty</p> 
 <?php endif;?> 
</ul>
</div>
 <?php endif; ?>
March 19th 20 at 08:40
0 answer

Find more questions by tags WordPress