Displaying custom tag cloud as list results in empty href tags

I don’t know if this is the best solution, but it seems to work.

  1. Change the call to get_tags() so that it gets the tags required, in the order required.
  2. Add a loop that generates the link for each of those tags.
  3. Then generate the tag cloud for those tags.

So I end up with:

add_shortcode('popular_tag_list', 'custom_popular_tags');
function custom_popular_tags() {
    $tags = get_tags(array(
        'number'                    => 30,
        'orderby'                   => 'count',
        'order'                     => 'DESC',
    ));

    foreach ($tags as &$tag) {
        $tag->link = get_tag_link($tag->term_id);
    }

    $args = array(
        'smallest'                  => 1,
        'largest'                   => 1,
        'unit'                      => 'em',
        'format'                    => 'list',
        'separator'                 => "n",
        'show_count'                => 0,
        'echo'                      => false
    );

    $tag_string = wp_generate_tag_cloud( $tags, $args );

    return $tag_string;
}
add_filter ('widget_text', 'do_shortcode');

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)