/** @see WP_Widget::widget */ function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } echo nktagcloud_the_cloud($instance); echo $after_widget; }
/** * The widget * * @param $args TODO */ function widget_nktagcloud($args) { extract($args); echo $before_widget; $option = get_option('nktagcloud'); $config = $option['config']; $title = apply_filters('the_title', $config['title']); // @fixme this is wrong. We should alway print $before_title etc but // remove the <h2> tag if it exists if ($config['hideemptywidgetheader'] == 'Yes' && isset($title) && $title != '' || $config['hideemptywidgetheader'] != 'Yes') { echo $before_title; echo $title; echo $after_title; } echo nktagcloud_the_cloud($config); echo $after_widget; }