From 630934d89a5b8550153857b70619b18726761c5e Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Thu, 31 Mar 2016 16:57:56 -0400 Subject: [PATCH] replace case/switch with if/else --- inc/widgets/largo-taxonomy-list.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/inc/widgets/largo-taxonomy-list.php b/inc/widgets/largo-taxonomy-list.php index 4a8a68d4f..ce1445cff 100644 --- a/inc/widgets/largo-taxonomy-list.php +++ b/inc/widgets/largo-taxonomy-list.php @@ -96,18 +96,10 @@ function widget( $args, $instance ) { $tax_items = get_categories($term_args); - switch ( $instance['taxonomy'] ) { - case 'series': - $this->render_series_list( $tax_items, $instance ); - break; - case 'category': - $this->render_term_list( $tax_items, $instance ); - break; - case 'post_tag': - $this->render_term_list( $tax_items, $instance ); - break; - default: - $this->render_term_list( $tax_items, $instance ); + if ( $instance['taxonomy'] === 'series' ) { + $this->render_series_list( $tax_items, $instance ); + } else { + $this->render_term_list( $tax_items, $instance ); } echo '';