Code Duplication    Length = 7-7 lines in 2 locations

includes/admin/emails/abstract-email-notification.php 2 locations

@@ 562-568 (lines=7) @@
559
			// Skip if all email template tags context setup exit.
560
			if ( $this->config['email_tag_context'] && 'all' !== $this->config['email_tag_context'] ) {
561
				if ( is_array( $this->config['email_tag_context'] ) ) {
562
					foreach ( $email_tags as $index => $email_tag ) {
563
						if ( in_array( $email_tag['context'], $this->config['email_tag_context'] ) ) {
564
							continue;
565
						}
566
567
						unset( $email_tags[ $index ] );
568
					}
569
				} else {
570
					foreach ( $email_tags as $index => $email_tag ) {
571
						if ( $this->config['email_tag_context'] === $email_tag['context'] ) {
@@ 570-576 (lines=7) @@
567
						unset( $email_tags[ $index ] );
568
					}
569
				} else {
570
					foreach ( $email_tags as $index => $email_tag ) {
571
						if ( $this->config['email_tag_context'] === $email_tag['context'] ) {
572
							continue;
573
						}
574
575
						unset( $email_tags[ $index ] );
576
					}
577
				}
578
			}
579