Code Duplication    Length = 20-20 lines in 2 locations

modules/widget-visibility/widget-conditions.php 2 locations

@@ 678-697 (lines=20) @@
675
								break;
676
						}
677
						break;
678
					case 'tag':
679
						// All tag pages.
680
						if ( ! $rule['minor'] ) {
681
							if ( is_tag() ) {
682
								$condition_result = true;
683
							} elseif ( is_singular() ) {
684
								if ( in_array( 'post_tag', get_post_taxonomies() ) ) {
685
									$condition_result = true;
686
								}
687
							}
688
							break;
689
						}
690
691
						// All pages with the specified tag term.
692
						if ( is_tag( $rule['minor'] ) ) {
693
							$condition_result = true;
694
						} elseif ( is_singular() && has_term( $rule['minor'], 'post_tag' ) ) {
695
							$condition_result = true;
696
						}
697
						break;
698
					case 'category':
699
						// All category pages.
700
						if ( ! $rule['minor'] ) {
@@ 698-717 (lines=20) @@
695
							$condition_result = true;
696
						}
697
						break;
698
					case 'category':
699
						// All category pages.
700
						if ( ! $rule['minor'] ) {
701
							if ( is_category() ) {
702
								$condition_result = true;
703
							} elseif ( is_singular() ) {
704
								if ( in_array( 'category', get_post_taxonomies() ) ) {
705
									$condition_result = true;
706
								}
707
							}
708
							break;
709
						}
710
711
						// All pages with the specified category term.
712
						if ( is_category( $rule['minor'] ) ) {
713
							$condition_result = true;
714
						} elseif ( is_singular() && has_term( $rule['minor'], 'category' ) ) {
715
							$condition_result = true;
716
						}
717
						break;
718
					case 'loggedin':
719
						$condition_result = is_user_logged_in();
720
						if ( 'loggedin' !== $rule['minor'] ) {