From 120fbac1b2a554f21fd19a634f5e5f653a8319fa Mon Sep 17 00:00:00 2001 From: Erick Hitter <ehitter@gmail.com> Date: Sun, 25 Aug 2013 11:38:50 -0400 Subject: [PATCH] Add some output formatting to the dropdown rendering --- tag-dropdown-widget.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tag-dropdown-widget.php b/tag-dropdown-widget.php index 12bde9e..100f308 100644 --- a/tag-dropdown-widget.php +++ b/tag-dropdown-widget.php @@ -195,9 +195,9 @@ class taxonomy_dropdown_widget_plugin { $css_id = ' id="' . $id . '"'; //Start dropdown - $output = '<select name="taxonomy_dropdown_widget_dropdown_' . $id . '" class="taxonomy_dropdown_widget_dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;"' . ( isset( $css_id ) ? $css_id : '' ) . '>'; + $output = '<select name="taxonomy_dropdown_widget_dropdown_' . $id . '" class="taxonomy_dropdown_widget_dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;"' . ( isset( $css_id ) ? $css_id : '' ) . '>' . "\r\n"; - $output .= '<option value="">' . $select_name . '</option>'; + $output .= "\t" . '<option value="">' . $select_name . '</option>' . "\r\n"; //Populate dropdown $i = 1; @@ -209,7 +209,7 @@ class taxonomy_dropdown_widget_plugin { $current = is_tag() ? is_tag( $term->slug ) : is_tax( $taxonomy, $term->slug ); //Open option tag - $output .= '<option value="' . esc_url( get_term_link( (int)$term->term_id, $taxonomy ) ) . '"' . ( selected( $current, true , false ) ) . '>'; + $output .= "\t" . '<option value="' . esc_url( get_term_link( (int)$term->term_id, $taxonomy ) ) . '"' . ( selected( $current, true , false ) ) . '>'; //Tag name $name = esc_attr( $term->name ); @@ -222,13 +222,13 @@ class taxonomy_dropdown_widget_plugin { $output .= ' (' . intval( $term->count ) . ')'; //Close option tag - $output .= '</option>'; + $output .= '</option>' . "\r\n"; $i++; } //End dropdown - $output .= '</select>'; + $output .= '</select>' . "\r\n"; return $output; } else { -- GitLab