Skip to content
Browse files

Fix error caused by array of taxonomies now used for the wrapper HTML…

… class.
  • Loading branch information...
1 parent 9117f85 commit 35f2d9b1e637b31aa0c2f2c08dfcd78ba46f7204 @justintadlock committed
Showing with 8 additions and 2 deletions.
  1. +8 −2 classes/widget-tags.php
View
10 classes/widget-tags.php
@@ -79,8 +79,14 @@ function widget( $sidebar, $instance ) {
$tags = str_replace( array( "\r", "\n", "\t" ), ' ', wp_tag_cloud( $args ) );
/* If $format should be flat, wrap it in the <p> element. */
- if ( 'flat' == $instance['format'] )
- $tags = '<p class="' . sanitize_html_class( "{$instance['taxonomy']}-cloud" ) . ' term-cloud">' . $tags . '</p>';
+ if ( 'flat' == $instance['format'] ) {
+ $classes = array( 'term-cloud' );
+
+ foreach ( $instance['taxonomy'] as $tax )
+ $classes[] = sanitize_html_class( "{$tax}-cloud" );
+
+ $tags = '<p class="' . join( $classes, ' ' ) . '">' . $tags . '</p>';
+ }
/* Output the tag cloud. */
echo $tags;

0 comments on commit 35f2d9b

Please sign in to comment.
Something went wrong with that request. Please try again.