Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 1070-1079 (lines=10) @@
1067
						echo '<p>', esc_html( $this->strings['plugin_activated'] ), '</p>';
1068
					}
1069
				}
1070
			} elseif ( $this->is_plugin_active( $slug ) ) {
1071
				// No simpler message format provided as this message should never be encountered
1072
				// on the plugin install page.
1073
				echo '<div id="message" class="error"><p>',
1074
					sprintf(
1075
						esc_html( $this->strings['plugin_already_active'] ),
1076
						'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
1077
					),
1078
					'</p></div>';
1079
			} elseif ( $this->does_plugin_require_update( $slug ) ) {
1080
				if ( ! $automatic ) {
1081
					// Make sure message doesn't display again if bulk activation is performed
1082
					// immediately after a single activation.
@@ 1083-1090 (lines=8) @@
1080
				if ( ! $automatic ) {
1081
					// Make sure message doesn't display again if bulk activation is performed
1082
					// immediately after a single activation.
1083
					if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK.
1084
						echo '<div id="message" class="error"><p>',
1085
							sprintf(
1086
								esc_html( $this->strings['plugin_needs_higher_version'] ),
1087
								'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
1088
							),
1089
							'</p></div>';
1090
					}
1091
				} else {
1092
					// Simpler message layout for use on the plugin install page.
1093
					echo '<p>', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), esc_html( $this->plugins[ $slug ]['name'] ) ), '</p>';