diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index f6f8f3289b..bf14a8fc49 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -976,27 +976,56 @@ class WP_Widget_Tag_Cloud extends WP_Widget { function widget( $args, $instance ) { extract($args); - $title = apply_filters('widget_title', empty($instance['title']) ? __('Tags') : $instance['title'], $instance, $this->id_base); + $current_taxonomy = $this->_get_current_taxonomy($instance); + if ( !empty($instance['title']) ) { + $title = $instance['title']; + } else { + if ( 'post_tag' == $current_taxonomy ) { + $title = __('Tags'); + } else { + $tax = get_taxonomy($current_taxonomy); + $title = $tax->label; + } + } + $title = apply_filters('widget_title', $title, $instance, $this->id_base); echo $before_widget; if ( $title ) echo $before_title . $title . $after_title; echo '
- +