Code Duplication    Length = 14-20 lines in 3 locations

src/admin/includes/functions.php 3 locations

@@ 2075-2088 (lines=14) @@
2072
2073
			$deactivated_modules = get_site_option( 'wordpoints_breaking_deactivated_modules' );
2074
2075
			if ( is_array( $deactivated_modules ) ) {
2076
				wordpoints_show_admin_error(
2077
					sprintf(
2078
						// translators: 1. Plugin version; 2. List of extensions.
2079
						__( 'WordPoints has deactivated the following extensions because of incompatibilities with WordPoints %1$s: %2$s', 'wordpoints' )
2080
						, WORDPOINTS_VERSION
2081
						, implode( ', ', $deactivated_modules )
2082
					)
2083
					, array(
2084
						'dismissible' => true,
2085
						'option'      => 'wordpoints_breaking_deactivated_modules',
2086
					)
2087
				);
2088
			}
2089
2090
			$incompatible_modules = get_site_option( 'wordpoints_incompatible_modules' );
2091
@@ 2092-2105 (lines=14) @@
2089
2090
			$incompatible_modules = get_site_option( 'wordpoints_incompatible_modules' );
2091
2092
			if ( is_array( $incompatible_modules ) ) {
2093
				wordpoints_show_admin_error(
2094
					sprintf(
2095
						// translators: 1. Plugin version; 2. List of extensions.
2096
						__( 'WordPoints has deactivated the following network-active extensions because of incompatibilities with WordPoints %1$s: %2$s', 'wordpoints' )
2097
						, WORDPOINTS_VERSION
2098
						, implode( ', ', $incompatible_modules )
2099
					)
2100
					, array(
2101
						'dismissible' => true,
2102
						'option'      => 'wordpoints_incompatible_modules',
2103
					)
2104
				);
2105
			}
2106
2107
		} else {
2108
@@ 2107-2126 (lines=20) @@
2104
				);
2105
			}
2106
2107
		} else {
2108
2109
			$incompatible_modules = get_option( 'wordpoints_incompatible_modules' );
2110
2111
			if ( is_array( $incompatible_modules ) ) {
2112
				wordpoints_show_admin_error(
2113
					sprintf(
2114
						// translators: 1. Plugin version; 2. List of extensions.
2115
						__( 'WordPoints has deactivated the following extensions on this site because of incompatibilities with WordPoints %1$s: %2$s', 'wordpoints' )
2116
						, WORDPOINTS_VERSION
2117
						, implode( ', ', $incompatible_modules )
2118
					)
2119
					, array(
2120
						'dismissible' => true,
2121
						'option'      => 'wordpoints_incompatible_modules',
2122
					)
2123
				);
2124
			}
2125
2126
		} // End if ( is_network_admin() ) else.
2127
2128
	} // End if ( user can activate modules ).
2129